Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I finally found a solution for my problem!

So, I defined the joint limits in my urdf file. By default Gazebo spawns the robot with inital joint positions of zero. But for one of the joints the lower limit is -3.0718 and the upper limit is -0.0698, so the initial joint position of zero isn't in that range. And that's the reason why the robot starts moving around even if gravity is turned off.

My solution was to add the following command to the spawn node in the launch file: -J [joint_name] [inital_joint_position_value] with a value that is within the range of the joint limits. Also the exact value of one of the limits didn't work, it has to be within the range of the limits! When the simulation starts, this joint "jumps" to the definied initial position and the robot remains stable. I don't know if that is the best solution for my problem, but it works for me right now.

<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen" args="-param robot_description -urdf -model panda -J joint_4 -0.9" />