This is a simple demo of controlling the canadarm using spaceROS.
To start the demo, there are few dependencies that need to be installed. The following steps will guide you through the installation process.
- You will need ROS Humble on your host system. If it is not already installed, you can follow the instructions here.
- You will need Gazebo Sim installed on your system. If not, you can follow the instructions here.
- You will need docker installed on your system. If not, you can follow the instructions here.
- Install xterm for running the demo. You can install it using the following command.
sudo apt-get install xterm
- Clone the demo repository
git clone http://github.com/space-ros/demo.git
- cd into the
canadarm2
directorycd canadarm2
- To build and run the demo, we use
./build.sh
. There are different subcommands to build and run the demo. You can see the list of available commands using the following command.# To see the list of available commands ./build.sh help
- To list the avaiable demos for the canadarm2, you can use the following command.
# To list the available demos ./build.sh list # Available demos: # - control-demo # Available subcommands: # - build, clean, run
- To build the demo, you can use the following command.
# To build all the demos for the canadarm2 ./build.sh build # To build a selected demo, for example control-demo ./build.sh build control-demo
- To run the demo, you can use the following command.
# To run the demo ./build.sh run control-demo
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.
-
Control arm of the canadarm
# 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