Tuning PID in Gazebo
I have a two-wheeled robot being controlled by a diff_drive_controller
(node base_node
) whose output cmd
s 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:
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?