|Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.|
Create Your Own ServiceDescription: how to create your own service
Keywords: rocon concert solution service
Tutorial Level: BEGINNER
Concert Service is a programmed workflow in a multi-robot-device human ecosystem. This tutorial guides how to create your own service with roslaunch.
A concert service generally consists of the following files.
.service(required) : meta information of service. It describes what this service is and contains pointer to other files like launcher, or interactions.
launcher(required) : service instance launcher. The supported launcher type is roslaunch at the moment.
.parameters(optional) : service public parameters. It can be overridden from solution to customise the service.
.interactions(optional) : Interactions to use service.
xml format of service meta information.
1 name: <service name> 2 description: <service description> 3 author: <service author> 4 priority: 1-10000 # Priority constants are set in scheduler_msgs.Request.XXX_PRIORITY. This should reflect high priority. 5 launcher_type: <service launcher type(roslaunch, shadow, or etc)> 6 launcher: <resource tuple to start service instance> #service manager parses this info based launcher_type and start service instance. 7 icon: <package_name>/<icon> 8 interactions: <package_name>/<interactions> 9 parameters: <package_name>/<parameters>
Administration : concert_service_admin/admin
Teleoperation : concert_service_teleop/teleop
Indoor 2D Map Preparation : concert_service_indoor_2d_map_prep/indoor_2d_map_prep
Service parameters are loaded in rosparam service namespace that can be used to configure service itself, and interaction parameters. /services/<service_name>/ by default.
Please refer to the Rocon Interactions Tutorial to form interactions for service.
TODO: Describe how to use service param as interactions param
Add Service Into Your Solution
Once service is ready, you can customise solution configurations to use your service. Please refer to Customise Service Configuration Tutorial to add your service. Check chatter_concert and turtle_concert as example.