Based from ROS2ArdiunoBridge by Josh Ewans (applied ROS2 example in this repo)and modified into ESP32 using sample code from Curie_Res, video-explanation here.
Update: added imu sensor reading functions based on machinelearningsite.com and lastminuteengineers.com
left motor forward/Backward - 32/33
right motor forward/Backward - 25/26
left encoder CLK - 17
left encoder DT - 16
right encoder CLK - 19
right encoder DT - 18
left IR_in - 13
left IR_out - 14
right IR_in - 04
right IR_out - 27
IMU SCL - 21
IMU SDA - 22
diff_controller.h - PID calculation
derivative_kick
initialization
tuning_changes