跳转至

Drake 安装指南

系统要求

  • 操作系统: Linux (Ubuntu 24.04+), macOS, Windows (通过WSL2)

https://manipulation.csail.mit.edu/drake.html # Running on your own machine 相关说明: https://drake.mit.edu/installation.html

python3 -m venv venv
source venv/bin/activate
pip install manipulation[all] --extra-index-url https://drake-packages.csail.mit.edu/whl/nightly/

代码仓库: https://github.com/RussTedrake/manipulation 我自己fork的: https://github.com/AB-pixel-pixel/manipulation_course.git

安装方法

方法1: pip(推荐初学者)

pip install drake

方法2: conda

conda install -c conda-forge drake

方法3: 从源码构建

适用于需要定制的高级用户:

git clone https://github.com/RobotLocomotion/drake.git
cd drake
./setup/install_prereqs.sh
bazel build //:install

验证安装

测试安装:

import pydrake.all as pydrake

# 创建一个简单摆
builder = pydrake.diagramBuilder()
plant = builder.AddSystem(pydrake.multibody.Plant())
context = plant.CreateDefaultContext()
print("Drake安装验证成功!")

← 返回目录