Gazebo | Ignition | Community
Ask Your Question

How to stop a robot from going out of its joint limits?

asked 2016-01-29 17:31:37 -0500

balakumar-s gravatar image

I have a KUKA LBR model and I have set its joint limits but the problem is these joint limits affect only the ros_controller and when I just spawn the robot, it goes beyond its limit and I am not able to get it back to an allowed angle.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-31 11:34:09 -0500

dcconner gravatar image You need to set the hard limits in the urdf file, and make sure the joint is not set to continuous.

It sounds like you only have "safety limits" set, or the limits for the ros_controller set and not the physical limits.

See this example from

Note the difference between lower/upper hard limits of revolute joint, and the soft_*_limits.

 <joint name="back_bkx" type="revolute">
<origin rpy="0 0 0" xyz="0 0 0.05"/>
<axis xyz="1 0 0"/>
<parent link="mtorso"/>
<child link="utorso"/>
<dynamics damping="0.1" friction="0"/>
<limit effort="300" lower="-0.523599" upper="0.523599" velocity="12"/>
<safety_controller k_position="100" k_velocity="100" soft_lower_limit="-10.5236" soft_upper_limit="10.5236"/>


edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-01-29 17:31:37 -0500

Seen: 3,281 times

Last updated: Jan 31 '16