[ros-users] Simple head tracking: services or topics?

Patrick Goebel patrick at casbs.stanford.edu
Mon Nov 8 23:42:22 UTC 2010

Hello ROS Fans,

I am relatively new to ROS but I have successfully run the navigation 
stack on my mobile robot and also have gmapping working with my Hokuyo 
laser scanner.  Now I want to turn to something completely different 
which is to track a visual target using the pan and tilt servos that 
move my robot's head-mounted camera.  I have already done this 
successfully using Python outside of ROS and now I would like to try it 
with ROS topics and services.

I am using Dynamixel AX-12+ servos connected to an ArbotiX controller 
and I have a ROS node provided by the ArbotiX manufacturer (Vanadium 
Labs) that includes a joint controller that subscribes to a JointState 
topic called cmd_joints and moves the servos accordingly by talking 
directly to the ArbotiX.  The same node also provides SetAngle and 
SetSpeed services for the same set of servos.  My question is: is it 
better to use the services or the cmd_joints topics to move the servos 
for head tracking?  In other words, is one considered better ROS 
practice or does one method provide a faster response than the other?

P.S. I understand that I might also use ROS actions but for this simple 
example, I figured I might get by with services or topics.


Patrick Goebel
Behavioral Sciences
Stanford University

More information about the ros-users mailing list