Ask Your Question

Allowed range for each joint

asked 2015-03-27 13:20:11 -0500

dinosaur gravatar image

updated 2015-03-27 14:05:07 -0500

How can I figure out the accessible range of joint positions for each joint on my PR2?

I became confused while going through the tutorial for moving the torso. The tutorial says in one place that the max torso height is 0.2 and in another place that it is about 0.6. Using the torso controller on my simulated PR2 in Gazebo, I can move the torso to 0.3 but it hangs when I try to move it to 0.4.

From the PR2 manual:

On the PR2, "soft limits" stop the joints from reaching the full range of motion to prevent damage to the mechanism. These soft limits, similar to a virtual spring, are specified in the robot's URDF file.

I found a torso urdf file at /opt/ros/hydro/share/pr2_description/urdf/torso_v0/torso.urdf.xacro, here's a snippet:

<xacro:macro name="pr2_torso_v0" params="name parent *origin">
  <joint name="${name}_joint" type="prismatic">
    <axis xyz="0 0 1" />
    <limit lower="0.0" upper="0.33" effort="10000" velocity="0.013"/> <!-- alpha tested velocity and effort limits -->

It looks like the torso range should be from 0.0 to 0.33. However, I can't get my Gazebo PR2 to move its torso as low as 0.0, it just goes as low as it can, then hangs. The upper limit seems to be accurate, though. I can move it to 0.33 but not 0.34. I suspect I'm looking at the wrong URDF file.

So several questions here:

  1. Where can I find my PR2's URDF file?
  2. Does the simulated PR2 in Gazebo have its own URDF file?
  3. Is there ever a case where a URDF file is not present? In that case, what determines the allowed range? Will the range be exactly the same for a simulated PR2 as for a physical PR2?
  4. How can I write code that uses the URDF file to avoid telling the robot to move into physically impossible positions?
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-30 12:03:26 -0500

David Lu gravatar image

pr2_description is the correct package to find the URDF file. The built URDF should be found in /robot_description on the parameter server. It should be the same for simulation and real usage.

Beyond what's written in the URDF, you should check what controller the joint is using, as that's often what controls what the practical limits are.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2015-03-27 13:20:11 -0500

Seen: 1,009 times

Last updated: Mar 30 '15