Gazebo Joint Type DOF being Violated

asked 2020-06-16 13:45:29 -0500

hillripper21 gravatar image

I am trying to insert a robot into gazebo. To simplify matters and try to isolate the problem I have boiled it down to just a few links/joints.

I have a link (rectangle with inside cut out) that is fixed to the gazebo world frame that is 1m above the ground. Spawning this in = no problem. I add another link (square) positioned inside the 1st link and define a prismatic joint to constrain the motion of this 2nd link in the y-axis. Everything works as expected, the 2nd link moves back and forth from end to end of the 1st link when I apply a force.

Now the problem arises when trying to add another robot arm link which is related to the square via a revolute joint in the z axis. It spawns in correctly, but once physics is enabled the 2nd and 3rd link go flying off the world. I don't understand how this is possible if the square is constrained as a prismatic joint. It seems to me like the link moves in every direction suddenly.

I thought the link/joint structure emulates a tree, adding a revolute joint to a link that is already constrained by a prismatic joint should not remove that prismatic constraint? Here is the structure: Frame (fixed to world) ---- prismatic joint ----> Square link ------ revolute joint ----> robot arm

I have tried disabling gravity, enabling self-collisions and playing around with mass/inertia. When I enable the inertia box, it looks okay, it is roughly the same size as my joints.

What is going on? How can parts just fly off under these conditions I don't understand what forces or mechanisms could be causing this. I ensured the robot arm is not colliding with anything, I moved it down far enough so that it is not directly touching anything. I am using meshes for the visual and collisions. Unfortunately I cannot post pics due to privacy.

Thank you.

edit retag flag offensive close merge delete

Comments

Hi! I believe it would be better to ask your question on the Gazebo equivalent of ROS answers. In addition, I would suggest you to include the sdf file that you are using: this would greatly help people to understand your setup and consequently to provide more specific suggestions.

ffusco gravatar image ffusco  ( 2020-06-17 04:27:30 -0500 )edit