robot teleporting to origin with broken joints
Hi all,
From time to time, all the links of my robot teleport to the origin... I have seen the following issue on GitHub, but I don't know if it is related : https://github.com/osrf/gazebo/issues...
On my robot, I am not using revolute2 joints. And the issue only occurs when the car is turning and driving at 3 m/s. It also happens when I tune the PIDs of the wheels. What am I doing wrong ? I am using Gazebo 9.0 with ROS Melodic on Ubuntu 18.04.
The code: urdf, and control is available here: https://github.com/AntoineRichard/rac...
To reproduce the issue:
roslaunch racecar_description racecar_empty.launch
roslaunch racecar_control spawn_racecar_with_controller.launch namespace:=racecar
rosrun rqt_gui rqt_gui
In the rqt_gui add a publisher plugin: using the upper navigation tabs open the plugins tab, and open the publisher plugin. Then add /racecar/cmd_drive topic, have it publishing at 20Hz. In the drive set the velocity to 1 and put a in the steering_angle: sin(i/10)
Thanks,
Antoine
Is there a chance you're sending
nan
orinf
values by accident?As far as I am aware I do not. I checked the messages sent by ROS.
I couldn't replicate the problem locally. Can you provide the steps I'd follow to do to see the issue?
roslaunch racecar_description racecar_empty.launch roslaunch racecar_control spawn_racecar_with_controller.launch namespace:=racecar rostopic pub -r 50 /racecar/cmd_drive "use auto complete" and set the "speed" to 5 or 10 and the "steering angle" to 0.5 or 1.0. It should break.
I pulled the latest changes and tested it locally with speed 10 and steering angle 0.5. SI'm not seeing any issues
The very last push seems to fix the issue. The problem came from the type of controllers I had set for the hinges. I used EffortJointControllers which were sending very violent commands (through the internal PID). When I switched to a PositionJointController the only thing that could break the car was playing with the solver settings but that is expected I guess. Thanks a lot for the help :). If you are interested I'll be releasing a bunch of racetracks in a month or so when I can find the time.