How to programatically set joint friction torque?
I have a car model in Gazebo. Each of the 4 wheels has a continuous joint with friction torque in the urdf file. I want to set the friction torque value dynamically in the source code (instead of hardcoded in the urdf) to simulate the brake pedal. How can I do this? Can I use some kind of Gazebo plugin?
P.S I cannot manually apply a reverse torque to the joint because the car will never truly stop if I push the brake pedal. Instead it will shake forward and backward with a low speed forever.