0
$\begingroup$

Rosanswers logo

Hi all,

I have a couple of problems with using the Joint Spline Trajectory Controller on the PR2. I used the controller through the provided action interface and followed this tutorial: http://www.ros.org/wiki/pr2_controllers/Tutorials/Moving%20the%20arm%20using%20the%20Joint%20Trajectory%20Action

Here are my questions:

  1. For the continuous joints, in a few cases, the joint rotates towards the direction of the larger angle instead of the smaller one. The angles I am sending to the controller are normalized. How can I make sure I am rotating about the smaller angle?

  2. The state publisher does not seem to normalize the angle of the continuous joints. Is that the correct behavior?

Best, Juergen


Originally posted by JuergenHess on ROS Answers with karma: 86 on 2012-02-13

Post score: 0


Original comments

Comment by sglaser on 2012-02-13:
For #1, does this happen for the first point in your trajectory, or only for intermediate points?

Comment by JuergenHess on 2012-02-14:
It happens for intermediate points. I think that I can recall a case where it also happend for the first one but I am not sure. I did not look out for that at the time.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Given two consecutive joint angles a and b, if b > a, the controller will move in the positive direction, and if b < a it will move in the negative direction. It does not normalize the angles, nor does it choose the shorter angular distance to travel.

This interpretation allows you to command trajectories that move joints through more than 180 degrees, which would be impossible if the controller normalized angles or picked the direction implicitly.

To get the behavior you want, you should "denormalize" the joint angles of your trajectory before sending it to the controller.


Originally posted by sglaser with karma: 649 on 2012-02-14

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by JuergenHess on 2012-02-15:
Thanks for the clarification. I changed my joint trajectory accordingly. It works fine.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.