|
| 1 | +Moveit2 Image |
| 2 | +============= |
| 3 | + |
| 4 | +The MoveIt2 Docker image uses the Space ROS docker image (openrobotics/spaceros:latest) as its base image, which you can build, following `this <https://space-ros.github.io/docs/rolling/Tutorials/First-Time-Building.html>`_ tutorial. The MoveIt2 Dockerfile installs all of the prerequisite system dependencies to build MoveIt2 (and Moveit2 tutorials) and then pulls and builds the latest MoveIt2 and Moveit2 tutorials source code. |
| 5 | + |
| 6 | +Cloning the repository |
| 7 | +---------------------- |
| 8 | + |
| 9 | +Move into your Space ROS workspace: |
| 10 | + |
| 11 | +.. code-block:: console |
| 12 | +
|
| 13 | + cd spaceros_ws |
| 14 | +
|
| 15 | +Clone the docker repository: |
| 16 | + |
| 17 | +.. code-block:: console |
| 18 | +
|
| 19 | + git clone https://github.com/space-ros/docker |
| 20 | +
|
| 21 | +Building the MoveIt2 Image |
| 22 | +-------------------------- |
| 23 | + |
| 24 | +To build the docker image, run: |
| 25 | + |
| 26 | +.. code-block:: console |
| 27 | +
|
| 28 | + cd docker/moveit2 |
| 29 | + ./build.sh |
| 30 | +
|
| 31 | +The build process will take about 30 minutes, depending on the host computer. |
| 32 | + |
| 33 | +Running the MoveIt2 Docker Image in a Container |
| 34 | +----------------------------------------------- |
| 35 | + |
| 36 | +After building the image, you can see the newly-built image by running: |
| 37 | + |
| 38 | +.. code-block:: console |
| 39 | +
|
| 40 | + docker image list |
| 41 | +
|
| 42 | +The output will look something like this: |
| 43 | + |
| 44 | +.. code-block:: console |
| 45 | +
|
| 46 | + REPOSITORY TAG IMAGE ID CREATED SIZE |
| 47 | + openrobotics/moveit2 latest 6edb2edc9643 10 hours ago 15.5GB |
| 48 | + openrobotics/spaceros latest 629b13cf7b74 12 hours ago 7.8GB |
| 49 | + nvidia/cudagl 11.4.1-devel-ubuntu20.04 336416dfcbba 1 week ago 5.35GB |
| 50 | +
|
| 51 | +The new image is named openrobotics/moveit2:latest. |
| 52 | + |
| 53 | +There is a run.sh script provided for convenience that will run the spaceros image in a container. |
| 54 | + |
| 55 | +.. code-block:: console |
| 56 | +
|
| 57 | + ./run.sh |
| 58 | +
|
| 59 | +Upon startup, the container automatically runs the entrypoint.sh script, which sources the MoveIt2 and Space ROS environment files. You'll now be running inside the container and should see a prompt similar to this: |
| 60 | + |
| 61 | +.. code-block:: console |
| 62 | +
|
| 63 | + spaceros-user@8e73b41a4e16:~/moveit2# |
| 64 | +
|
| 65 | +Running MoveIt2 Tutorials |
| 66 | +------------------------- |
| 67 | + |
| 68 | +Run the following command to launch the MoveIt2 tutorials demo launch file: |
| 69 | + |
| 70 | +.. code-block:: console |
| 71 | +
|
| 72 | + ros2 launch moveit2_tutorials demo.launch.py rviz_tutorial:=true |
| 73 | +
|
| 74 | +You should see lots of console output and the rviz2 window appear: |
| 75 | + |
| 76 | +.. image:: ../images/rviz2-window.png |
| 77 | + |
| 78 | +You can now follow the `MoveIt2 Tutorial documentation <https://moveit.picknik.ai/main/doc/tutorials/quickstart_in_rviz/quickstart_in_rviz_tutorial.html>`_ |
| 79 | + |
| 80 | +Running the MoveIt2 Move Group C++ Interface Demo |
| 81 | +------------------------------------------------- |
| 82 | + |
| 83 | +To run the Move Group C++ Interface Demo, execute the following command: |
| 84 | + |
| 85 | +.. code-block:: console |
| 86 | +
|
| 87 | + ros2 launch moveit2_tutorials move_group.launch.py |
| 88 | +
|
| 89 | +.. image:: ../images/move-group-demo.png |
| 90 | + |
| 91 | +Then, you can follow the `Move Group C++ Interface Demo documentation <https://moveit.picknik.ai/humble/doc/examples/move_group_interface/move_group_interface_tutorial.html>`_ |
| 92 | + |
| 93 | +Running the Space ROS Space Robots Demos |
| 94 | +---------------------------------------- |
| 95 | + |
| 96 | +Once you have tested that MoveIt2 works, you are ready to run some of the other `Space ROS space robot demos <https://space-ros.github.io/docs/rolling/Demos/Canadarm.html>`_ |
0 commit comments