what is difference output between effort_controller and velocity_controller in joint_trajetory_controller
When I use effortcontroller/jointtrajetorycontrollers and velocitycontroller/jointtrajetorycontrollers with moveit, I notice that they all use PID to map position and velocity error to velocity(effort) command. So I look up the source code in ros controllers. I found the output commands of the two controllers will be same under the same input moveit planned waypoints. Is it approperiate to send the same commands to merely different interfaces (I suspect the effort controllers cannot revise the effort error just through mapping position and velocity error, it is just an open-loop toruqe control) ? Otherwise, could someone show me the correct method to use them ?
Asked by Enigm_A on 2023-03-08 06:06:28 UTC
Answers
I found the output commands of the two controllers will be same under the same input moveit planned waypoints.
I don't understand what you mean by "be the same". The output values have different units for effort_controllers and velocity_controllers: one is joint-torque, and the other is joint-velocity. If you input a desired joint position, it's almost impossible that these two different controllers will output the same numerical values.
There is only one trivial case where your statement is kind of true: if you input a torque ("effort") to an effort_controller, or you input a velocity to a velocity_controller, then the controller doesn't have to do much, and the code being executed will be the same. But even for this situation, the actual numerical values will be different.
Asked by Mike Scheutzow on 2023-03-10 08:46:53 UTC
Comments
Thanks for your kindly response. I am afraid that I have solved the problem. But, I still want to share some of my viewpoints with you.
- Fristly, "be the same" is actually the commands generated by the effort controller and velocity controller in joint_trajetory_controller under the same PID parameters, current and desired states. I notice that the velocity controller and effort controller call the same interface to generated mapped PID commands, which has been proved resonable.
- Secondly, it is clear that the effort_controller and velocity_controller in joint_trajetory_controller have same mapping method. When you have to send commands to different hardware interface, you just need to adjust the PID paramaters to adapt your interface.
Thanks again for your answer.
Asked by Enigm_A on 2023-03-10 21:55:53 UTC
Comments