User Guide for Gateway Components between SmartSoft and ROS
As is shown in the Overview a reasonable way to communicate between components in ROS and SmartSoft is to use specialized Gateway components. The question is how are such components best structured and implemented? This question is answered in the first part below. The second part describes how the navigation scenario can be started.
Design issues for gateway components between ROS and SmartSoft
The Whitepaper-SmartROS-GW.pdf provides a technical analysis of issues concerning the implementation of gateway components interacting between both frameworks (ROS and SmartSoft). The whitepaper further introduces a step-by-step description on how to create a new gateway component and some pitfalls to be avoided.
Running the navigation scenario with Care-O-bot in Gazebo simulation and navigation components in SmartSoft
Before the scenario can be started the corresponding ROS-SmartSoft gateway components must be compiled as described in the installation instructions.
Now it should be possible to start all relevant components for the navigation scenario as demonstrated in the YouTube-Video.
In the first step, the Care-O-bot inside of the Gazebo simulation has to be started (this tutorial provides additional information). The bash script (below) can be used to start Gazebo and to load ipa-kitchen together with the Care-O-bot into Gazebo.
#!/bin/bash # setup environment variables export ROBOT=cob3-3 export ROBOT_ENV=ipa-kitchen # start roscore manually xterm -e roscore & sleep 3; # launch dashboard for Care-O-bot (in background) after 5s xterm -e "sleep 5; roslaunch cob_experimentation_days dashboard.launch" & # launch gazebo with Care-O-bot roslaunch cob_experimentation_days experimentation_days_sim.launch echo "Script finished, BYE!";
After some load time, a Gazebo window with the Care-O-bot in the ipa-kitchen should appear:
One of the navigation components in SmartSoft is the CDL component (see below). This component considers the shape of the Care-O-bot for collision-free navigation. Currently one shape is predefined, where the tray is in the position down and the manipulator is in the position folded. In addition, further (more bulky) shapes can be defined, which allow to safely navigate e.g. with the tray in the upper position. Such shapes can be exchanged at runtime according to the current scenario.
Hint: The Gazebo simulation with Care-O-bot and the navigation components of SmartSoft can be executed either on the same or on different hosts. In the latter case the gateway components can be executed either on the host running ROS (in particular roscore) or on the host running SmartSoft (in particular the Naming-Service). In the former case, the host running ROS must be configured to find the Naming-Service of SmartSoft (see corba naming-service instructions). In the latter case, the host running SmartSoft must be configured to find the "roscore" (see ros tutorial for multiple machines). Both ways are equally possible.
Now we can start the navigation components in SmartSoft and the gateway components. The easiest way to do this is to use the predefined deployment (see figure below).
To run the deployment open a new console and type in:
$ cd $SMART_ROOT/src/deployments/DeployROSNavigationDemo/src $ ./deployROSNavigationDemo.sh start
Hint: The deployment script starts each component in an individual xterm frame. To enable the xterm in Ubuntu to find custom libraries (like ACE+TAO) it is necessary to remove the s bit from the xterm binary. In order to do this execute: "
sudo chmod -s /usr/bin/xterm" (and run the deployment script again).
Some components should appear (each in a separate console frame). To be able to use the Joystick demo a Logitech Dual Action joystick is required. Otherwise the GoTo scenario can be used without any hardware requirements. The GoTo scenario activates and parametrizes all navigation components (mapper, planner and CDL). To start this scenario, select the smartRobotConsole and choose the menu item 99 (Demos). In the following submenu choose 2 (Planner-CDL GOTO). Now an x/y position (in mm division) can be entered, which is to be approached by the robot. The visualization component shows the simultaneous construction of and localization in a map (SLAM).