ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

services are declared in .srv and functionality defined in .cpp

refrer .srv files for more info.

check srv folder for services declared. turtlesim code

in turtle.cpp

  set_pen_srv_              = nh_.advertiseService("set_pen", &Turtle::setPenCallback, this);
  teleport_relative_srv_ = nh_.advertiseService
                                      ("teleport_relative", &Turtle::teleportRelativeCallback, this);
  teleport_absolute_srv_ = nh_.advertiseService
                                      ("teleport_absolute", &Turtle::teleportAbsoluteCallback, this);