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

Tully Foote tfoote at willowgarage.com
Mon Nov 8 23:55:13 UTC 2010


Hi Patrick,

Your use case sounds best for topics.  Topics tend to be best in streaming
applications where reliability is not required and low latency is
important.  Services and actions both incur noteable startup and shutdown
costs for each call, but they both have mechanisms for being robust to
connection failures or reporting mechanisms.

Tully

On Mon, Nov 8, 2010 at 3:42 PM, Patrick Goebel
<patrick at casbs.stanford.edu>wrote:

> 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
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



-- 
Tully Foote
Systems Engineer
Willow Garage, Inc.
tfoote at willowgarage.com
(650) 475-2827
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101108/b2a4f812/attachment-0003.html>


More information about the ros-users mailing list