Skip to content

Commit 96c7661

Browse files
committed
Update README to use pre-built moveit2 image (docker issue #256)
1 parent d7d2816 commit 96c7661

File tree

1 file changed

+31
-69
lines changed

1 file changed

+31
-69
lines changed

space_robots/README.md

Lines changed: 31 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
1-
# Space ROS Space Robots Demo Docker Image
1+
# Space Robots Demo Docker Image
22

3-
The Space ROS Space Robots Demo docker image uses the moveit2 docker image (*osrf/space-ros-moveit2:latest*) as its base image.
4-
Build instructions for that image can be found in [this README](../moveit2/README.md).
5-
The Dockerfile installs all of the prerequisite system dependencies along with the demos source code, then builds the Space ROS Space Robots Demo.
3+
This folder contains the Dockerfile and scripts required to build the Curiosity Mars rover and Canadarm demos into an image called `space_robots_demo`.
64

7-
This is for Curiosity Mars rover and Canadarm demos.
5+
The Dockerfile installs all of the prerequisite system dependencies along with the demos source code, then builds the demo code.
86

9-
## Building the Demo Docker
7+
The image uses [osrf/space-ros-moveit2:latest](https://hub.docker.com/r/osrf/space-ros-moveit2/tags) as its base image.
108

11-
The demo image builds on top of the `spaceros` and `moveit2` images.
12-
To build the docker image, first ensure the `spaceros` base image is available either by [building it locally](https://github.com/space-ros/space-ros) or pulling it.
9+
**Note:** This demo was moved from the [space-ros/docker](https:/github.com/space-ros/docker) repository. For history prior to the move, search that repo.
1310

14-
Then build the `moveit2` and the `space_robots` demo images:
11+
## Building the Demo Image
1512

16-
```bash
17-
cd ../moveit2
18-
./build.sh
19-
cd ../space_robots
13+
Use the build script provided to build the docker image.
14+
15+
```
2016
./build.sh
2117
```
2218

23-
## Running the Demo Docker
19+
## Running the image container
2420

2521
Run the following to allow GUI passthrough:
2622

@@ -38,86 +34,52 @@ Then run:
3834

3935
### Curiosity Mars rover demo
4036

41-
Launch the demo:
37+
1. Launch the demo in Gazebo:
4238

4339
```bash
44-
ros2 launch curiosity_rover_demo mars_rover.launch.py
40+
ros2 launch curiosity_gazebo curiosity_gazebo.launch.py
4541
```
4642

4743
On the top left corner, click on the refresh button to show camera feed.
4844

49-
### Perform Tasks
50-
51-
#### Setup
52-
45+
2. Launch the ROS 2 control nodes
5346
Open a new terminal and attach to the currently running container:
5447

5548
```bash
56-
docker exec -it <container-name> bash
57-
```
58-
59-
Make sure packages are sourced:
60-
61-
```bash
62-
source ${SPACEROS_DIR}/setup.bash
49+
docker exec -it openrobotics_space_robots_demo bash
6350
```
64-
65-
```bash
66-
source ~/demos_ws/install/setup.bash
67-
```
68-
69-
#### Available Commands
70-
71-
Drive the rover forward
72-
73-
```bash
74-
ros2 service call /move_forward std_srvs/srv/Empty
51+
Within the container, launch the control nodes:
7552
```
76-
77-
Stop the rover
78-
79-
```bash
80-
ros2 service call /move_stop std_srvs/srv/Empty
81-
```
82-
83-
Turn left
84-
85-
```bash
86-
ros2 service call /turn_left std_srvs/srv/Empty
87-
```
88-
89-
Turn right
90-
91-
```bash
92-
ros2 service call /turn_right std_srvs/srv/Empty
53+
ros2 launch curiosity_rover_demo mars_rover.launch.py
9354
```
9455

95-
Open the tool arm:
56+
3. Send commands to the rover
57+
Open a new terminal and attach to the currently running container:
9658

9759
```bash
98-
ros2 service call /open_arm std_srvs/srv/Empty
60+
docker exec -it openrobotics_space_robots_demo bash
9961
```
62+
Within the container, you can now move the rover using the commands in [demos/curiosity_rover/README.md](../curiosity_rover/README.md)
10063

101-
Close the tool arm:
102-
64+
#### Canadarm demo
65+
Run the demo container as shown above:
10366
```bash
104-
ros2 service call /close_arm std_srvs/srv/Empty
67+
./run.sh
10568
```
10669

107-
Open the mast (camera arm)
108-
70+
1. Launch the canadarm demo in Gazebo
10971
```bash
110-
ros2 service call /mast_open std_srvs/srv/Empty
72+
ros2 launch canadarm_gazebo canadarm.launch.py
11173
```
112-
113-
Close the mast (camera arm)
74+
2. Launch the ROS 2 control node
75+
Open a new terminal and attach to the currently running container:
11476

11577
```bash
116-
ros2 service call /mast_close std_srvs/srv/Empty
78+
docker exec -it openrobotics_space_robots_demo bash
11779
```
118-
119-
#### Canadarm demo
80+
Within the container, launch the control node:
12081

12182
```bash
122-
ros2 launch canadarm canadarm.launch.py
83+
ros2 launch canadarm_demo canadarm.launch.py
12384
```
85+
Within the container, you can now move the arm using the commands in [demos/canadarm2/README.md](../canadarm2/README.md)

0 commit comments

Comments
 (0)