Clone wiki

robobo-programming / ros / Robobo-Services

This wiki moved

Please use the new location: https://github.com/mintforpeople/robobo-programming/wiki


Robobo Services

Robobo provides a set of ROS services in order to command the robot.

Ninve command/actuation services are available:

  • /robot/moveWheels: Moves the wheels of the Robobo base.
  • /robot/resetWheels: Resets the encoders of the wheels to 0.
  • /robot/movePanTilt: Moves the Pan and/or Tilt mechanisms of the Robobo base.
  • /robot/talk: Says a text using the Text-to-Speech engine of the robot.
  • /robot/playSound: Plays a sound from a predefined set of sounds.
  • /robot/setCamera: Selects the camera, front or back.
  • /robot/setEmotion: Changes the emotion (face) of the robot.
  • /robot/setLed: Changes the color of one led of the Robobo base.
  • /robot/setSensorFrequency: Changes the notification frequency of all the sensors (topics) of the Robobo robot.

The complete list of services can be obtained with the "rosservice list" command, which is also a powerfull tool to explore and try the different services.

It is importat to note that, in general, any new call to one particular service will inmeditelly cancel a previous unfished order. So, for expample, if we call '/robot/moveWheels' when a previous movement command is not finished, Robobo will start executing the new command, thus changing the movement without stopping.


/robot/moveWheels

Service of type 'robobo_msgs/MoveWheels' that commands the robot to move the wheels at a specified 'speed' during some 'time'.

When the requested movement command finishes moving, a notification is published in the topic '/robot/unlock/move', so that clients can know when a movement has finished. In order to use this functionality, clients must provide a unique 'blockid' for each MoveWheels request, and monitor the '/robot/unlock/move' topic until an unlock message is published with the specified 'blockid'.

Arguments

  • lspeed: Speed of the left wheel in the range 0..100.
  • rspeed: Speed of the right wheel in the range 0..100.
  • time: Duration of the movement in milliseconds.
  • blockid: A unique 'blockid' for end-of-movement notification at /robot/unlock/move topic.

/robot/resetWheels

Service of type 'robobo_msgs/ResetWheels' to reset the wheels encoders positions to 0. After calling this service both encoders (topic /rovot/wheels) will start again in position 0.

Arguments

No arguments.


/robot/movePanTilt

Service of type 'robobo_msgs/MovePanTilt' that commands the robot to move the smartphone holder in the vertical (tilt) and horizontal (pan) axis.

Allows to move the pan, the tilt, or both with one call. Each of the movement commands is only executed if its unlockId is greater than 0. So, if you only want to move the pan, let the 'tiltUnlockid = 0', and if you only want to move the tilt, let 'panUnlockId = 0'.

Arguments

  • panPos: Angle to position the pan at. Range: 11 .. 343.
  • panSpeed: Movement speed for the pan mechanism. Range: 0 .. 100.
  • panUnlockId: A unique 'blockid' for end-of-movement notification at /robot/unlock/move topic. Must be greater that 0 to move.
  • tiltPos: Angle to position the tilt at. Range: 26 .. 109.
  • tiltSpeed: Movement speed for the tilt mechanism. Range: 0 .. 100.
  • tiltUnlockId: A unique 'blockid' for end-of-movement notification at /robot/unlock/move topic. Must be greater that 0 to move.

At the end of each movement (pan and tilt) an unlock message with 'unlockId = panUnlockId' or 'unlockId = tiltUnlockId' will be published in '/robot/unlock/move' to notify the end of the movement event.


/robot/talk

Service of type 'robobo_msgs/Talk' that commands the robot to say a text using Text-to-Speech (TTS).

Whe the robot finishes 'talking' a message is published in the '/robot/unlock/talk' topic to notify interesed suscribers. This can be used to, for example, enque one talk command after another.

Arguments

  • text: Text to be spoken.

/robot/playSound

Service of type 'robobo_msgs/PlaySound' that commands the robot to play an 'emotion sound' from a set of predefined sounds.

Arguments

  • sound: Sound to play. Possible values are: moan, purr, angry, approve, disapprove, discomfort, doubtful, laugh, likes, mumble, ouch, thinking, various.

/robot/setCamera

Service of type 'robobo_msgs/SetCamera' that commands the robot to change the active camera streamed to '/robot/camera/image/compressed' topic. It is possible to change the camera 'on the fly'.

Arguments

  • camera: '1' for the front camera or '2' to select the back camera.

/robot/setEmotion

Service of type 'robobo_msgs/SetEmotion' that commands the robot to change the face shown in the screen.

Arguments

  • emotion: String representing the new emotion. Possible values are: happy, laugthing, sad, angry, surprised, normal.

/robot/setLed

Service of type 'robobo_msgs/SetLed' that commands the robot to change the color of one LED of the base.

Arguments

  • id: String representing the 'id' of the led to change color. Possible values are: Front-C, Front-R, Front-RR, Front-L, Front-LL, Front-C, Back-R, Back-L, all.
  • color: String representing the color color. Posible values are: white, red, blue, cyan, magenta, yellow, green, orange, off.

/robot/setSensorFrequency

Service of type 'robobo_msgs/SetSensorFrequency' that commands the robot to change the frequency of notification of all the sensors of the robot.

Sensor notifications are only sent when there are changes, this service modifies the thresholds used to filter notifications in order to reduce network bandwidth. A higher notification frequency reduces the filter thresholds, and completely eliminates them at MAX value. Furtermore, in some sensors, high frequencies also modify the maximum number of messages per seconds of a particular sensor. Again, MAX runs the sensors at full speed.

Arguments

  • frequency: String representing the frequency, one of: 'LOW', 'NORMAL', 'HIGH' or 'MAX' (MAX is the default at startup).

Updated