1.打开终端,下载docker-compose.yml
wget https://raw.githubusercontent.com/ros-planning/moveit2_tutorials/main/.docker/docker-compose.yml
2.启动容器,(you may need to hyphenate docker-compose if using compose V1)
DOCKER_IMAGE=humble-tutorial docker compose run --rm --name moveit2_container gpu
(可以将 humble-tutorial 替换为其他镜像名称,可以用 moveit2_container 替换容器名称。当你停止(或退出)容器时,--rm 参数将移除容器,不然你可以在磁盘上保留修改后的容器,并使用 docker start moveit2_container 启动该容器。)
3.进入工作区目录下的 Docker 容器,并完成了"围绕对象规划 "和 "使用 MoveIt 任务构造函数拾取和放置 "教程。继续尝试使用启动命令,如 ros2 launch moveit2_tutorials demo.launch.py
ros2 launch moveit2_tutorials demo.launch.py