Robotics StackExchange | Archived questions

Control a differental drive robot without ROS

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.

Asked by Anand George on 2015-12-13 01:31:23 UTC

Comments

Answers

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.

Asked by chapulina on 2015-12-14 16:51:06 UTC

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?

Asked by Anand George on 2015-12-15 05:24:47 UTC

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

Asked by chapulina on 2015-12-15 11:48:44 UTC