poistion control on continuous joint strange behavior

asked 2015-07-15 08:12:13 -0600

elsp1991 gravatar image

updated 2015-07-15 08:21:18 -0600

Hello I recently use a position controller in a continuous joint on Indigo and I came across a very strange problem

What I understand is that a continuous joint controller only control the absolute position of a joint. So it supposed to handle the angles in a space [-2pi, +2pi] and even if I command it to 7.5pi it will go to 1.5pi ignoring multiples of 2*pi.

The problem that I found is with a zero command (set_value=0.0) and rotating the joint with my hand the joint holding positions that are multiples of 2 and not 2pi. So I figure that the joint position is expressed in radianspi and not radians.

I also found that if I set a command value of 2*pi (6.28) the joint goes to position 2.0.

So the set_values is expressed in radians and the process value is expressed in radian*pi. I suppose this is a bug or do I miss something?

I Also found in the source code, So maybe is a problem from angles package:

// Compute position error
  if (joint_urdf_->type == urdf::Joint::REVOLUTE)
  else if (joint_urdf_->type == urdf::Joint::CONTINUOUS)
    error = angles::shortest_angular_distance(current_position, command_position);
  else //prismatic
    error = command_position - current_position;
edit retag flag offensive close merge delete