diff --git a/README.md b/README.md index 94d2fe9..4c8a3b6 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/canadarm2/README.md b/canadarm2/README.md new file mode 100644 index 0000000..528535f --- /dev/null +++ b/canadarm2/README.md @@ -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 + ``` diff --git a/canadarm2/canadarm_demo/README.md b/canadarm2/canadarm_demo/README.md deleted file mode 100644 index 627913c..0000000 --- a/canadarm2/canadarm_demo/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Canadarm - - -(This is a temp instruction before the reorg) - -Build and source the ```canadarm``` package: - -``` -ros2 launch canadarm canadarm.launch.py -``` - -To move the arm to an outstretched pose: - -``` -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 -```