[ros-users] how to use pr2_controller_manager with a different robot

Wim Meeussen meeussen at willowgarage.com
Wed Sep 8 15:25:05 UTC 2010


I replied to your questions inline.

> Thanks Stu. I should have replied to Wim's email that I got something
> working using a custom ROS node and a hacked version of Cartesian Pose
> Controller.
> I have a question though: Is there a significant speed difference between
> setting up several realtime state publishers as shown below (twist, 2x Pose
> stamped, JointState, Float array) compared to making a custom message type
> and sending it out on one publisher? The current publish rate is 10Hz but I
> am thinking of increasing that to 30Hz+.

This is probably something you want to experiment with on your
hardware, but I'd think the difference will be very small, especially
at the low rates you are sending messages.

> Also... are the real-time publishers below doing anything different than
> regular publishers, given that they aren't actually working in part of the
> pr2_controller manager? It seems I didn't have to call ros::spinOnce()
> anywhere to get those to work, but I ended up having to call ros::spinOnce()
> every 100ms anyway to get the incoming pose commands to update.

>From a normal node you don't want to use the realtime publishers. They
will add extra overhead (an extra thread, extra copies, extra memory),
and you get no benefits at all. You even have a higher probability of
dropping messages. When using the realtime publisher you didn't have
to call spinOnce because each realtime publisher adds a thread that
calls spin for you.


Wim Meeussen
Willow Garage Inc.

More information about the ros-users mailing list