Skip to content

Commit

Permalink
Add documentation for canadarm2 demos
Browse files Browse the repository at this point in the history
related to space-ros/space-ros#178

 - Add README.md for Canadarm2 demo
 - Update Main README.md of the demos repository
  • Loading branch information
franklinselva committed Sep 10, 2024
1 parent 5a30311 commit ae7dce4
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 29 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ Please refer to the [dockerfile repo](https://github.com/space-ros/docker/tree/m

## Demos

1. [Curiosity Rover](curiosity_rover/README.md)
1. [Canadarm2](canadarm2/README.md)
2. [Curiosity Rover](curiosity_rover/README.md)
49 changes: 49 additions & 0 deletions canadarm2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Curiosity Rover - Demo

This is a simple demo of controlling the canadarm using spaceROS.

### Installation

To start the demo, there are few dependencies that need to be installed. The following steps will guide you through the installation process.

1. You will need ROS Humble on your host system. If it is not already installed, you can follow the instructions [here](https://docs.ros.org/en/humble/Installation.html).
2. You will need Gazebo Sim installed on your system. If not, you can follow the instructions [here](https://gazebosim.org/docs/all/getstarted/).
3. You will need docker installed on your system. If not, you can follow the instructions [here](https://docs.docker.com/get-docker/).
4. Install xterm for running the demo. You can install it using the following command.
```bash
sudo apt-get install xterm
```

### How to run the demo

1. Clone the demo repository
```bash
git clone http://github.com/space-ros/demo.git
```
2. cd into the `canadarm2` directory
```bash
cd canadarm2
```
3. To build and run the demo, we use `Makefile`. Run the following command to build the docker image and run the container.
```bash
# To see the list of available commands
make help
# To build and run the demo
make run
```

This will start the demo in one terminal and gazebo in another terminal. To control the canadarm2, we provide ros2 services for the demo. You can control the rover using the following services.

1. Control arm of the canadarm

```bash
# To open an arm in outstretched position
ros2 service call /open_arm std_srvs/srv/Empty
# To move the arm to its default close pose of all zeros
ros2 service call /close_arm std_srvs/srv/Empty
# To move the arm to a random pose
ros2 service call /random_arm std_srvs/srv/Empty
```
28 changes: 0 additions & 28 deletions canadarm2/canadarm_demo/README.md

This file was deleted.

0 comments on commit ae7dce4

Please sign in to comment.