Ask Your Question
1

Setting individual velocity setpoints in pid control

asked 2019-01-18 04:07:06 -0500

stevemartin gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-01-18 08:50:05 -0500

AndyZe gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-01-18 04:07:06 -0500

Seen: 63 times

Last updated: Jan 18