-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pid controller not working in read and write #45
Comments
I think you're on the right track with implementing the PWM in These two lines are suspicious:
You shouldn't be making the call to PID controllers yourself. That gets done automatically by ros_control. Take a look here:
|
@AndyZe wrote:
not saying it's correct in this case, but there are actually closed loop
|
Well, gavanderhoorn may well be right. I guess there is no issue with calling your own PID controllers directly. It's just a bit unusual. Another issue:
Shouldn't it be |
I think you would also need to scale the PID controller output carefully so it is in the range of 0-255. It might be that the output of your PID controllers is tiny, like 0-1. |
I have integrated the ros pid controllers in the read and write functions of the hardware interface of my robot like this:
But when i run this hardware interface with diff drive controller and publish the cmd_vel command in twist topic. The output power which is pwm in this case is not properly comming.
I asked this question in ros forum they said its not the way to use the pid controllers.
If no what is the correct method to use the pid controllers in the hardware interface with ros control boiler plate?
Plate-form: ros noetic, ubuntu 20.04.
Here i've used the read and write functions from the serial library i've used. which does the reading and writing tasks from arduino nano connected to the raspberry pi where i'm running this, where encoder data is being read and pwm to dc motors has been sent.
The text was updated successfully, but these errors were encountered: