[ros-users] Joystick to move PR2 forward done w/ Topics, Services or Actionlib

Adam Leeper aleeper at stanford.edu
Tue Nov 16 01:37:47 UTC 2010


Hi Jack-

You can look in the pr2_teleop package to see the implementation of sending
velocity messages to the base, which uses Twist messages.

For modularity, your driving node should accept something generic, like a
Twist message, which would be used to prescribe a velocity and angular
velocity for the base. The drive node should parse this and issue driving
commands to your diff drive. Your control node should determine desired base
velocities and publish them as a Twist message. The advantage of using such
an interface is that then any other node, such as a teleop node, can simply
publish Twist messages to the drive node.

I believe the base controller on the pr2 has some time interval over which
each Twist message applies its velocities before it times out; you have to
send continuous Twist messages to keep the robot moving, which is a good
safety measure. Someone else can probably address that better than me
though.

Hope this helps,
Adam


Adam Leeper
Stanford University
aleeper at stanford.edu
719.358.3804


On Mon, Nov 15, 2010 at 5:11 PM, Jack Pien <jack at jackpien.com> wrote:

> Hi,
>
> I am looking for the "best practice" way to simply have a ROS "control"
> node tell another ROS "drive" node to send RS232 commands to have my
> diff-drive robot drive forward, left, right, backwards via continous
> servos.
>
> Would you suggest have the "control" node communicate simple drive
> commands to the "drive" node as topics, services, or should I take a
> closer look at how to use the actionlib?
>
> IE: when you use the joystick to command the PR2 to simply move forward
> (no path planning or localization), how is this done.
>
> Thanks
> Jack
> ---
> http://www.facebook.com/pages/Daido-Robotics/152889668088971 - "Like" to
> follow or contribute to Daido Robotics efforts.
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101115/f782e52c/attachment-0003.html>


More information about the ros-users mailing list