Tuning PID in Gazebo

asked 2020-05-09 00:47:42 -0600

pomelilola gravatar image

I have a two-wheeled robot being controlled by a diff_drive_controller (node base_node) whose output cmds are written to the setpoints of two PID controllers (package pid); the PID controllers' control efforts are then written to the robot's motors (controlled by node fw_node). There is also a hardware_interface::RobotHW subclass written in C++ that read()s encoder state and write()s the setpoints to the PID controllers.

Here is my rqt_graph output of the above nodes and topics:

image description

How would I tune these PID controllers in Gazebo? From my understanding, the joints specified in the diff_drive_controller configuration (left_wheel and right_wheel parameters) correspond to the joints defined in the robot URDF. This implies that the diff_drive_controller outputs directly to the simulated joint states, effectively removing the hardware interface from the equation.

If this is true, then does there exist a way to integrate the above PID controllers into the simulated robot so that I can tune them?

edit retag flag offensive close merge delete