Ros2 robot changes direction when stuck
Hi,
I have built a four wheel robot with ros2 foxy. The setup is as follows:
- Controller is ros2_controller controlled by a joystick
- Raspberry pi connected via serial to esp32 with motor controller to control 4 motors individually
- Single Battery connected to esp32, motor controller, raspberry pi. Pi and esp32 both has its own 5v step down regulator
- Using differential drive controller method with remapping wheels to work as skid steer
Everything seems ok. However, when the robot is stuck or in full speed, it stops for a moment and then reverses direction. This means 1. Forward becomes reverse, left becomes right 2. It no longer has speed control from joystick. Even a small joystick movement makes robot go in full throttle 3. Restarting launch file works once or twice. Repeats just lose connection and robot is no longer connected to joystick or development machine. In this case, i need to restart robot.
Any idea if this is a hardware or ros2 controller or any other issues?