Arduino topics vs services vs actionlib actions?

asked 2015-04-04 01:27:52 -0600

khitrir gravatar image

updated 2015-04-04 04:15:33 -0600

Say you are connecting via Serial (or Bluetooth or anything really) to an Arduino running some program and you want it to use it to execute commands - for example, Requesting values for certain Variables, Blinking an LED, or sending a move order.

My understanding is that were everything local to one machine ala TurtleSim, a variable request would be a service, blinking an LED could be a service or a topic subscription depending on implementation, and a joystick or controller would publish to a topic.

However, the Arduino tutorials perform all of the above with Topic, with no mention of services.

  • What's best practice when using topics vs services vs actions on Arduino/Serial?
  • When should each type be used. i.e. Does this hold, or does Arduino/Serial communication have its own considerations?
  • If so, What are they?
edit retag flag offensive close merge delete


If there is a Service tutorial for Arduino that I missed, links to same would also be appreciated.

EDIT: There is a ServiceServer.pde in the ros_lib examples that looks about right. Looking into it

khitrir gravatar image khitrir  ( 2015-04-04 01:29:48 -0600 )edit