Home | Tutorials | Wiki | Issues
Ask Your Question
0

Control a differental drive robot without ROS

asked 2015-12-13 00:35:27 -0500

Anand George gravatar image

Hi, First of all, I'm a newbie in this field. I want to control a differential drive robot(polaris2dx), basically, I need to move the robot to a specific location with a given pose. How can I apply different velocities to each link/joint(so as to apply different velocities to each wheel). Can anyone provide me an example plugin for this. Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-12-14 15:51:06 -0500

chapulina gravatar image

Gazebo ships with a DiffDrivePlugin example. Unfortunately, it isn't very well documented. But it is used in the pioneer2dx model, so you can try it out and then adapt it to your needs. You can test using it like this:

  1. Open Gazebo and insert the pioneer2dx from the left panel's insert tab. The model loads the plugin, which will listen to pose messages on topic ~/pioneer2dx/vel_cmd.

  2. To test sending commands, you'll need a publisher. You can modify the stand-alone publisher example by changing the topic to ~/pioneer2dx/vel_cmd and the pose to whatever you want.

edit flag offensive delete link more

Comments

It worked. Thank you. Actually I need to control each wheel separately. How can I do that? Is there any need to include the subscriber/publisher in a plugin to do this task?

Anand George gravatar imageAnand George ( 2015-12-15 04:24:47 -0500 )edit

If you want to use hardcoded values, you can add your logic to the OnUpdate function in the plugin.

chapulina gravatar imagechapulina ( 2015-12-15 10:48:44 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-12-13 00:31:23 -0500

Seen: 460 times

Last updated: Dec 14 '15