Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why does the robot links fall downwards when gravity is disabled and no controllers are used?


I have a model for a robotic arm which I want to move to arbitrary positions by applying random torques on each joint. For this purpose, I have written a service client which calls the ros service ApplyJointEffort. Each effort is applied for a duration of 10s. Now, the problem is I want to maintain each joint at exactly the same position it reached to after the application of the efforts. This works fine for joints which move in the x-y plane, and such a joint stays in the position to which it was driven by the last applied torque. However, the joints which allow motion in the z direction are creating problem, as the links associated with such joints gradually start falling downwards. My initial suspicion was that gravity is the culprit, so I had set gravity to false for all such links. I have also set gravity in all 3 dimensions to 0 in the physics properties. Still, this problem persists, which leads me to believe that somehow gravity is still doing its trick somewhere

Actually, on spawning the robot, its arm its in the vertical position but without controllers and with gravity disabled, again the arm links start drifting downwards. As per my reasoning it should not happen. With controllers the robot maintains its initial vertical position of the arm, but then I suppose seeing the effect of the applied torques will be more difficult, as each time a joint angle changes due to an applied effort, immediately the controller pushes it back to the initial position.

How to check whether gravity is truly disabled or not? Also, is there any way to maintain the joint positions by modifying the controllers? When I interface moveit with gazebo using the same controllers, after each trajectory execution, the robot stays at the new position, and does not return to its initial position. Then why does it not allow the new positions to persist in case of applied torques? Please guide me as to where I am going wrong, and how to achieve the said objective, as I am a beginner in gazebo and ros.