0
$\begingroup$

Rosanswers logo

Hello,

I'm just starting to use ros_control with Gazebo. I adapted the Gazebo/ROS_Control tutorial (with the RRBot) to a 6-dof robot I'm working with. Although the tutorial demo works fine, when I use a JointPositionController with a simplified, 1-dof version of the robot, I get the following output from the controller state:

 header: 
  seq: 1097
  stamp: 
    secs: 18
    nsecs: 139000000
  frame_id: ''
set_point: 2.68690323324e-08
process_value: 1.80636445357e-07
process_value_dot: 4.76481957492e-08
error: 6.28318515341
time_step: 0.001
command: 0.0
p: 0.0
i: 0.0
d: 0.0
i_clamp: 0.0

The gains are voluntarily set to zero to see what's going on without the controller being active. Note the error that says 6.2831 although both set_point and process_value are essentially zero. Shouldn't the error be zero as well or am I missing something? I'm using ROS Hydro and Gazebo 1.9.5


Originally posted by JML on ROS Answers with karma: 26 on 2014-05-28

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Thanks for your answer. I should've been more specific. I'm using a different URDF for my robot, which has revolute joint types instead of continuous. While investigating following your answer, I found out the controller was working fine if my joint was continuous. Turns out the problem was with the revolute type joint limits that were set to <limit lower="-3.1416" upper="3.1416"> which creates an overlap in the acceptable angle range e.g. setting the limits to <limit lower="-3.1416" upper="3.1415"> works fine.


Originally posted by JML with karma: 26 on 2014-06-02

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Adolfo Rodriguez T on 2014-06-02:
Your modifications are in fact creating conditions in which the reported bug does not occur. For revolute joints, the shortest_angular_distance_with_limits method is used. This is the actual method reported to not work in https://github.com/ros/angles/issues/2.

Comment by Adolfo Rodriguez T on 2014-06-02:
If your workaround is good enough for your usecase, please mark your answer as correct to close the question.

Comment by JML on 2014-06-02:
I get a 404 for the link to the bug, but yes, that workaround solves the problem for me. Thanks! Woups, looks like I don't have enough points to mark my own answer as correct.

Comment by Adolfo Rodriguez T on 2014-06-02:
The autolinking feature is broken and appends a trailing

to the URL. If you remove it by hand it should work.

Comment by JML on 2014-06-02:
Got it, thanks.

$\endgroup$

Your Answer

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