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

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: ros-users
Subject: [ros-users] Simple head tracking: services or topics?
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.

Thanks!

Patrick Goebel
Behavioral Sciences
Stanford University