Hi Patrick, <br><br>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.    <br>

<br>Tully<br><br><div class="gmail_quote">On Mon, Nov 8, 2010 at 3:42 PM, Patrick Goebel <span dir="ltr"><<a href="mailto:patrick@casbs.stanford.edu">patrick@casbs.stanford.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hello ROS Fans,<br>
<br>
I am relatively new to ROS but I have successfully run the navigation<br>
stack on my mobile robot and also have gmapping working with my Hokuyo<br>
laser scanner.  Now I want to turn to something completely different<br>
which is to track a visual target using the pan and tilt servos that<br>
move my robot's head-mounted camera.  I have already done this<br>
successfully using Python outside of ROS and now I would like to try it<br>
with ROS topics and services.<br>
<br>
I am using Dynamixel AX-12+ servos connected to an ArbotiX controller<br>
and I have a ROS node provided by the ArbotiX manufacturer (Vanadium<br>
Labs) that includes a joint controller that subscribes to a JointState<br>
topic called cmd_joints and moves the servos accordingly by talking<br>
directly to the ArbotiX.  The same node also provides SetAngle and<br>
SetSpeed services for the same set of servos.  My question is: is it<br>
better to use the services or the cmd_joints topics to move the servos<br>
for head tracking?  In other words, is one considered better ROS<br>
practice or does one method provide a faster response than the other?<br>
<br>
P.S. I understand that I might also use ROS actions but for this simple<br>
example, I figured I might get by with services or topics.<br>
<br>
Thanks!<br>
<font color="#888888"><br>
Patrick Goebel<br>
Behavioral Sciences<br>
Stanford University<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Tully Foote<br>Systems Engineer<br>Willow Garage, Inc.<br><a href="mailto:tfoote@willowgarage.com">tfoote@willowgarage.com</a><br>(650) 475-2827<br>