0
$\begingroup$

Rosanswers logo

I am using this ROS package called pid : LINK

At the bottom, you can see the instructions on how to control 2 motors for a differential drive robot. It states that both controllers should listen to the same setpoint topic which publishes the desired velocity.

The question is, why do they need to listen to the same topic? What if the robot goes at some angular velocity which means that 1 wheel spins quicker then the second wheel? Shouldn't two controllers listen to two setpoints?

For example, consider a move_base package which publishes Twist messages to /cmd_vel topic. In order to perform circular path, it will publish both linear.x and angular.z message. From simple math we can find the desired velocities on each wheel which means we have two different setpoint velocities for each wheel. Am I correct?


Originally posted by stevemartin on ROS Answers with karma: 361 on 2019-01-18

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The text I see there says,

The multiple controllers may subscribe to different, or to the same setpoint topic

So you're 100% correct, they don't need to subscribe to the same topic.

The demo that comes with that package (differential_drive_sim.launch) uses the same setpoint for both wheel PID's, but that's unique to that simulation.


Originally posted by AndyZe with karma: 2331 on 2019-01-18

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.