Robotics StackExchange | Archived questions

Why are there so many formats to input PID gains for different controllers??

As per the title, why are there so many different formats to input PID gains in a yaml file ?? Shouldn't something as big as ros be standardized?? Also can anyone link me the correct format for velocity_controllers/JointPositionController ?

Asked by PumpkinIcedTea on 2022-02-07 07:45:13 UTC

Comments

Answers

You meand these?

void velocity_controllers::JointPositionController::setGains (const double & p,
        const double &  i,
        const double &  d,
        const double &  i_max,
        const double &  i_min,
        const bool &  antiwindup = false 
    )   

You can see some examples of YAML there, e.g.:

waist_yaw_position_controller:
  type: effort_controllers/JointPositionController
  joint: waist_yaw
  pid: {p: 100.0, i: 0.01, d: 10.0}

Asked by ljaniec on 2022-02-07 08:41:56 UTC

Comments

Yeah I tried this and I still got the error that no p values are specified

Asked by PumpkinIcedTea on 2022-02-07 09:32:37 UTC

Please add error logs, your project/code and anything else which could help there? Vague questions will give you blurry answers.

Asked by ljaniec on 2022-02-07 09:41:26 UTC

I'm really sorry but I can't provide much info as I am working for a company and this is their confidential product.. I tried to use the format found in the file above but got the error no p value specified. However I verified that its reading the P values via rqt_gui. Either way, the robot just explodes also lol

Asked by PumpkinIcedTea on 2022-02-07 09:45:19 UTC

That sounds a bit extreme, lol. You can try to use ROS CLI to track the messages from rqt_gui maybe? Just to see what format is it. If you cannot show the project it will be harder, but the error part in the terminal would be fine, I think..? Regarding the explosion - maybe it is URDF with incorrect configured interface with JointPositionController?

Asked by ljaniec on 2022-02-07 10:13:20 UTC