How to setup ROS2 Humble + Moveit Humble via Docker in M1 Macbook

2MC·2022년 8월 29일
0

Robot Arm

목록 보기
1/1
post-thumbnail

step to install moveit+ros via docker

  1. install wget via brew
brew install wget
  1. Download the Docker script
wget https://raw.githubusercontent.com/abake48/moveit2_tutorials/how-to-docker-ubuntu/_scripts/start-docker.sh -O ~/.local/bin/start-docker.sh
  1. make it executable.
chmod +x ~/.local/bin/start-docker.sh
  1. Run the script.
There are 3 parameters for the script:
  • name_of_the_container : this is the name you wish to give the created container. For this guide, we will be naming the container moveit2-humble.

  • name_of_the_image : if you are creating a fresh Docker container, provide the name of the Docker image here. For this guide, we will be using the image moveit/moveit2:humble-source. Further explanation of this parameter is provided in the Further Reading section.

  • using_gpu : if true, the Docker will be run using Nvidia GPU drivers. By default, this value is true.

For example

start-docker.sh moveit2-humble moveit/moveit2:humble-source [true/false]
  1. Whenever you wish to reenter your container, you can run the following command
start-docker.sh moveit2-humble

source: [How to Set Up MoveIt 2 Docker Containers in Ubuntu](https://moveit.picknik.ai/humble/doc/how_to_guides/how_to_setup_docker_containep

Download Source Code of MoveIt and the Tutorials

Move into your Colcon workspace and pull the MoveIt tutorials source:

cd ~/ws_moveit2/src
git clone https://github.com/ros-planning/moveit2_tutorials -b main

Next we will download the source code for the rest of MoveIt:

vcs import < moveit2_tutorials/moveit2_tutorials.repos

Build your Colcon Workspace

The following will install from Debian any package dependencies not already in your workspace. This is the step that will install MoveIt and all of its dependencies:

sudo apt update && rosdep install -r --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y

And setup ros humble enviroment

source /opt/ros/<distro>/setup.bash

Increase docker resource size

The next command will configure your Colcon workspace:

cd ~/ws_moveit2
MAKEFLAGS="-j1 -l1" colcon build --parallel-workers 1
# MAKEFLAGS="-j1 -l1" : use raise cmake error even parallel-workers
# --parallel-workers 1 : use RAM size under 32gb
profile
Awesome Developer

0개의 댓글