-
Notifications
You must be signed in to change notification settings - Fork 51
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
Question regarding PID values #187
Comments
no worries. Yes, the PID values are set in the linked file. No, there is no other source for the PID values. Since the communication runs asynchronously, we added a PID controller. This allows for some error when frequencies are not perfectly aligned. Hope this makes somewhat sense. You can run this software without PID and it will run mostly well for open loop control, however, you might find some unsmooth execution as well. |
Thanks for your reply @mhubii. Meanwhile, I tried changing the p value here to p = 1 and running pose planning demo. |
the PID is e.g. invoked here:
a small value for P will introduce lag. If you e.g. replace the code above and set: command_.joint_position = command_target_.joint_position all commands will be directly forwarded. I am, however, beginning to understand your question. The gains are currently multiplied by the sample time (the config file is therefore not the only source). This is probably incorrect:
|
Thanks @mhubii. I replaced the line with
This is a very basic code (and not written very professional because it was intended for test purposes (: ) which moves the robot -5 cm in z direction (world frame). When the lin_vel is set to 0.01 (m/s) we expect the motion to be completed in 5 seconds. However, it takes 50 seconds for the motion to get complete. And if I change the lin_vel to 0.1 (m/s) now the motion gets completed in 5 seconds. |
thanks for sharing the code, will test it out tomorrow, hope we can fix this properly for this driver |
okay the PID values should now make more sense, see e.g.
I ran your code and exactly what you describe happens. Velocity of
When the |
thank you again for pointing this out @OmidRezayof. So what is missing now is a controller that controls the end-effector velocity smoothly. Maybe we close this issue and continue on the somewhat related #178 |
Thank you @mhubii. In a nut shell, bypassing the PID controller as you suggested here will introduce noisy execution and still the motion isn't performed at the correct time. For the P value, I found that for p=12.25 the motion time is nearly 10 times slower, therefore by increasing the commanded speed in the code, I could get the motion to be done in correct timing and smoothly. This is the final code that was working (i.e. move the robot to a cartesian position while keeping the orientation constant). Note that you have to set the velocity exactly 10 times higher than the velocity in m/s:
This (i.e. setting p = 12.25 and commanding the velocity 10 times higher) is definitely not a neat solution but might be a quick solution. |
@mhubii hope you're great. |
hi @OmidRezayof , sounds awesome! Sorry for the late response. Created a branch for you @ Looking forward to the PR! |
Hi! PR created. I'm so sorry but I couldn't figure out how to aim the PR towards the created branch. :( |
when Possible solutions are:
|
Hi @mhubii,
I had a question regarding the PID controller in the filters.cpp file.
So, my understanding from KUKA's FRI is that, by sending an incremental command to the joint positions, the FRI will try its best to get to the desired joint values asap and before the next command arrives. Therefore, if we make sure that the incremental step is small enough for the robot to catch up, why would we need a PID controller?
And also, I'm guessing the PID values were set here and the p value has set to be 10 and i and d are 0? Are the p-i-d values set anywhere else?
The text was updated successfully, but these errors were encountered: