Using a different robot
This page explains how to use a robot other than ServiceBot in ServiceSim.
Build ServiceSim from source
Follow the install from source instructions on the Installation page.
Choose a robot
Choose the robot you want to use, in our example we'll use the Segway RMP210.
Make sure the robot you choose has a URDF description package, in our case, it is located here:
Install the robot description
For simplicity, let's add the robot description into the ServiceSim workspace so everything can be installed with the same command:
cd ~/ws/src git clone https://github.com/StanleyInnovation/segway_v3 cd segway_v3 rm -rf !(segway_description) cd ../.. catkin_make_isolated --install
Take a look at the description package's
launchdirectory. There should be a
.launchfile there which, at a minimum, sets the
robot_descriptionparameter. I our case, that is:
Create a new competition launch file
Create a new
And put the following contents:
<launch> <arg name="robot" default="true" /> <arg name="custom" default="false" /> <arg name="custom_prefix" default="" /> <include file="$(find segway_description)/launch/description.launch" /> <include file="$(find servicesim_competition)/launch/competition.launch"> <arg name="custom" value="$(arg custom)"/> <arg name="custom_prefix" value="$(arg custom_prefix)"/> </include> <group if="$(arg robot)"> <arg if="$(arg custom)" name="launch_file" default="$(arg custom_prefix).launch" /> <arg unless="$(arg custom)" name="launch_file" value="$(find servicesim)/launch/spawn_urdf.launch"/> <include file="$(arg launch_file)" /> </group> </launch>
- Launch Gazebo running the competition software
- Launch the
- Spawn the
segwaymodel into the world
This will not:
- Launch any controllers for the robot
- Work with the example solution
Install and run
Build and install as usual:
Launch the new competition file:
roslaunch servicesim servicesim_segway.launch
You'll see the Segway inside the competition instead of ServiceBot:
The Segway meshes don't have nice textures, so we can turn on transparency and joint visuals to inspect that it was correctly loaded:
Test the competition
You can follow the instructions on the Walkthrough page and check that the competition logic is working.
Since this example doesn't load any controllers for the robot, this can be tested in "god mode" by teleporting the robot inside Gazebo.
Try using the command line to ask for a new task, pick-up and drop the guest.
(Optional) Change robot name
You can see that the Segway is called
servicebotin the simulation. If it's desired to change the robot's name, you can change the
robot: nameproperty on the
config.yamlfile and then generate a custom scenario as described on the Scenario generation page.