0

德雷克在 Colab 上。安装和设置问题。

我使用了附录 A.3 中Colab 暂存器链接中的安装和设置代码运行欠驱动机器人书的示例。我相信 Colab 在云端执行代码,所以我不需要在我的机器上进行任何设置。我在 Ubuntu 16.04 LTS 上使用 Firefox 66.0.2(64 位)。

为了方便起见,我尝试运行的 Colab 暂存器代码复制如下:

# Install drake and the underactuated source repo (only if necessary) and set up the path.  Run this first!
try:
  import pydrake
  import underactuated
except ImportError:
  !curl -s https://raw.githubusercontent.com/RussTedrake/underactuated/master/scripts/setup/jupyter_setup.py > jupyter_setup.py
  from jupyter_setup import setup_underactuated
  setup_underactuated()
# Note: On Google's Colaboratory, this will take a minute, but should only need to reinstall once every 12 hours.
# Colab will ask you to "Reset all runtimes"; say no to save yourself the reinstall.

import os
underactuated_src_dir = os.path.dirname(os.path.dirname(os.path.abspath(underactuated.__file__)))

这是我得到的错误:

/bin/bash: underactuated/scripts/setup/ubuntu/16.04/install_prereqs: No such file or directory


NameErrorTraceback (most recent call last)

<ipython-input-1-2d88a7eca137> in <module>()
     10 
     11 import os
---> 12 underactuated_src_dir = os.path.dirname(os.path.dirname(os.path.abspath(underactuated.__file__)))

NameError: name 'underactuated' is not defined

说明说我应该在运行教科书中的任何示例之前运行它,因此我无法在 Colab 上运行任何示例。

4

0 回答 0