在 macOS Sonoma 上本地安装 Drake

问题描述 投票:0回答:1

我是一名学生,有兴趣在我的 Macbook 上本地运行机器人操作课程中的代码,而不是使用 Deepnote。我的机器使用 Apple M3 芯片和 macOS Sonoma 14.5,我运行以下命令进行安装:

mamba create -n robotic_manipulation python=3.12
mamba activate robotic_manipulation
pip install manipulation==2024.04.22 --extra-index-url https://drake-packages.csail.mit.edu/whl/nightly/
pip install notebook

然后,为了确保

meshcat
正常工作,我运行了
brew install zmq

此后,我在本地启动了一个

jupyter notebook
实例,并尝试在
intro.ipynb
[source] 中运行导入的第一个单元格。但是,我遇到了这个错误跟踪:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
AttributeError: `itemset` was removed from the ndarray class in NumPy 2.0. Use `arr[index] = value` instead.

The above exception was the direct cause of the following exception:

ImportError                               Traceback (most recent call last)
ImportError: initialization failed

The above exception was the direct cause of the following exception:

ImportError                               Traceback (most recent call last)
File ~/miniforge3/envs/robotic_manipulation/lib/python3.12/site-packages/pydrake/visualization/_model_visualizer.py:28
     23 from pydrake.multibody.tree import (
     24     FixedOffsetFrame,
     25     FrameIndex,
     26     default_model_instance,
     27 )
---> 28 from pydrake.planning import RobotDiagramBuilder
     29 from pydrake.systems.analysis import Simulator

ImportError: initialization failed

The above exception was the direct cause of the following exception:

ImportError                               Traceback (most recent call last)
Cell In[1], line 11
      9 from pydrake.systems.framework import DiagramBuilder, EventStatus, LeafSystem
     10 from pydrake.systems.rendering import MultibodyPositionToGeometryPose
---> 11 from pydrake.visualization import MeshcatPoseSliders
     13 from manipulation import running_as_notebook
     14 from manipulation.meshcat_utils import StopButton, WsgButton

ImportError: initialization failed

有人知道解决这个问题的方法吗?

drake
1个回答
0
投票

最后,我采用以下方法解决了我的问题:

mamba create -n robotic_manipulation python=3.12
mamba activate robotic_manipulation
pip install manipulation numpy==1.26.4 notebook

我必须指定在

numpy==1.26.4
之后安装
manipulation
,因为由于某种原因,
numpy==2.0.0rc2
pip install manipulation
过程中被拉出。另外,默认情况下,
notebook
不是
manipulation
的安装要求,但对于那些像我一样想要学习机器人操作课程的人,请确保将其添加到所需软件包列表中。

© www.soinside.com 2019 - 2024. All rights reserved.