Skip to content

Commit 68af007

Browse files
committed
Fixes #34: Created new MoveIt2 Image instructions, added instructions for the Canadarm and Curiosity Mars Rover demos, and updated First-Time Build Tutorial
1 parent 0ad2383 commit 68af007

File tree

9 files changed

+512
-43
lines changed

9 files changed

+512
-43
lines changed

source/Demos.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Demos
22
=====
33

44
There are currently two Space ROS demonstration applications.
5-
The first demo uses `MoveIt2 <https://moveit.ros.org/>`_ and a model of the `Canadarm manipulator <https://en.wikipedia.org/wiki/Canadarm>`_ along with the Space ROS base image.
5+
Both demos uses the `MoveIt2 <https://moveit.ros.org/>`_ docker image. The Canadarm demo uses a model of the `Canadarm manipulator <https://en.wikipedia.org/wiki/Canadarm>`_ along with the Space ROS base image.
66
In this demo, MoveIt2 is used to plan the motion for the Canadarm, which is running in simulation.
77
The second demo shows the `Mars Curiosity rover <https://mars.nasa.gov/msl/home/>`_ in simulation, presenting multiple ROS 2 services to allow the user to directly control the rover.
88
The following pages go into detail to show you how to run these demo applications.
@@ -11,5 +11,6 @@ The following pages go into detail to show you how to run these demo application
1111
:titlesonly:
1212
:maxdepth: 2
1313

14+
Demos/MoveIt2
1415
Demos/Canadarm
1516
Demos/Mars-Rover

source/Demos/Canadarm.rst

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,45 @@
11
Canadarm Demo
22
=============
33

4-
TODO:
4+
Build the Space ROS & MoveIt2 Docker Images
5+
-------------------------------------------
6+
7+
If you haven't already, follow `these <https://space-ros.github.io/docs/rolling/Demos/MoveIt2.html>`_ instructions for building the MoveIt2 docker image, and `these <https://space-ros.github.io/docs/rolling/Tutorials/First-Time-Building.html>`_ instructions for the spaceros image. These are the base images for the Canadarm and Curiosity Mars rover demos. The Dockerfile installs all of the prerequisite system dependencies along with the demos source code, then builds the Space ROS Space Robots Demo.
8+
9+
Space ROS Space Robots Demo Docker Image
10+
----------------------------------------
11+
12+
Build the ``space_robots`` image:
13+
14+
.. code-block:: console
15+
16+
cd ../space_robots
17+
./build.sh
18+
19+
Running the Demo Docker
20+
-----------------------
21+
22+
Run the following to allow GUI passthrough:
23+
24+
.. code-block:: console
25+
26+
xhost +local:docker
27+
28+
Then run:
29+
30+
.. code-block:: console
31+
32+
./run.sh
33+
34+
Depending on the host computer, you might need to remove the ``--gpus all`` flag in ``run.sh``, which uses your GPUs.
35+
36+
Running the Canadarm Demo
37+
-------------------------
38+
39+
Run the following command:
40+
41+
.. code-block:: console
42+
43+
ros2 launch canadarm canadarm.launch.py
44+
545
6-
Describe how to run the Canadarm demo.
7-
This may be simply a link to the demo repo that provides the instructions.

source/Demos/Mars-Rover.rst

Lines changed: 117 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,121 @@
11
Mars Rover Demo
22
===============
33

4-
TODO:
4+
Build the Space ROS & MoveIt2 Docker Images
5+
-------------------------------------------
6+
7+
If you haven't already, follow `these instructions <https://space-ros.github.io/docs/rolling/Demos/MoveIt2.html>`_ for building the MoveIt2 docker image, `and these instructions <https://space-ros.github.io/docs/rolling/Tutorials/First-Time-Building.html>`_ for the spaceros image. These are the base images for the Canadarm and Curiosity Mars rover demos. The Dockerfile installs all of the prerequisite system dependencies along with the demos source code, then builds the Space ROS Space Robots Demo.
8+
9+
Space ROS Space Robots Demo Docker Image
10+
----------------------------------------
11+
12+
Build the ``space_robots`` image:
13+
14+
.. code-block:: console
15+
16+
cd ../space_robots
17+
./build.sh
18+
19+
Running the Demo Docker
20+
-----------------------
21+
22+
Run the following to allow GUI passthrough:
23+
24+
.. code-block:: console
25+
26+
xhost +local:docker
27+
28+
Then run:
29+
30+
.. code-block:: console
31+
32+
./run.sh
33+
34+
Depending on the host computer, you might need to remove the ``--gpus all`` flag in ``run.sh``, which uses your GPUs.
35+
36+
Running the Mars Rover Demo
37+
---------------------------
38+
39+
Launch the demo:
40+
41+
.. code-block:: console
42+
43+
ros2 launch mars_rover mars_rover.launch.py
44+
45+
On the top left corner, click on the refresh button to show camera feed.
46+
47+
Perform Tasks
48+
^^^^^^^^^^^^^
49+
50+
Setup
51+
~~~~~
52+
53+
Open a new terminal and attach it to the currently running container:
54+
55+
.. code-block:: console
56+
57+
docker exec -it <container-name> bash
58+
59+
Make sure packages are sourced:
60+
61+
.. code-block:: console
62+
63+
source ~/spaceros/install/setup.bash
64+
65+
.. code-block:: console
66+
67+
source ~/demos_ws/install/setup.bash
68+
69+
Available Commands
70+
~~~~~~~~~~~~~~~~~~
71+
72+
Drive the rover forward:
73+
74+
.. code-block:: console
75+
76+
ros2 service call /move_forward std_srvs/srv/Empty
77+
78+
Stop the rover:
79+
80+
.. code-block:: console
81+
82+
ros2 service call /move_stop std_srvs/srv/Empty
83+
84+
Turn left:
85+
86+
.. code-block:: console
87+
88+
ros2 service call /turn_left std_srvs/srv/Empty
89+
90+
Turn right:
91+
92+
.. code-block:: console
93+
94+
ros2 service call /turn_right std_srvs/srv/Empty
95+
96+
Open the tool arm:
97+
98+
.. code-block:: console
99+
100+
ros2 service call /open_arm std_srvs/srv/Empty
101+
102+
Cloes the tool arm:
103+
104+
.. code-block:: console
105+
106+
ros2 service call /close_arm std_srvs/srv/Empty
107+
108+
Open the mast (camera arm):
109+
110+
.. code-block:: console
111+
112+
ros2 service call /mast_open std_srvs/srv/Empty
113+
114+
Close the mast (camera arm):
115+
116+
.. code-block:: console
117+
118+
ros2 service call /mast_close std_srvs/srv/Empty
119+
120+
5121
6-
Describe how to run the Mars rover demo.
7-
This may be simply a link to the demo repo that provides the instructions

source/Demos/MoveIt2.rst

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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>`_
Binary file not shown.

source/Getting-Started/Building-From-Source.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Building Space ROS from Source
2+
13
Building Space ROS from Source
24
==============================
35

0 commit comments

Comments
 (0)