ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

JointPositionController state erroneous error

asked 2014-05-28 05:57:20 -0500

JML gravatar image

updated 2014-05-28 05:59:01 -0500

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

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-06-02 09:30:18 -0500

JML gravatar image

updated 2014-06-02 09:52:12 -0500

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.

edit flag offensive delete link more

Comments

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.

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2014-06-02 10:07:00 -0500 )edit

If your workaround is good enough for your usecase, please mark your answer as correct to close the question.

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2014-06-02 10:08:14 -0500 )edit

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.

JML gravatar image JML  ( 2014-06-02 10:42:28 -0500 )edit

The autolinking feature is broken and appends a trailing

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

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2014-06-02 11:53:03 -0500 )edit

Got it, thanks.

JML gravatar image JML  ( 2014-06-02 12:17:00 -0500 )edit
0

answered 2014-06-02 08:41:52 -0500

Adolfo Rodriguez T gravatar image

Considering that RRbot has continuous joints, the error value is being computed here. It's very likely that floating point computation errors are the culprit. I encountered a similar situation when implementing the joint_trajectory_controller, and I ended up resolving it locally. It might make sense to open an enhancement ticket to the angles package to allow an optional tolerance parameter to the shortest_angular_distance method. This way the issue would get fixed once and for all.

edit flag offensive delete link more

Comments

The issue already exists: https://github.com/ros/angles/issues/2

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2014-06-02 08:54:14 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2014-05-28 05:57:20 -0500

Seen: 484 times

Last updated: Jun 02 '14