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

How to troubleshoot "Constraint violated::" errors

asked 2023-04-19 01:57:42 -0500

v3040928092 gravatar image

updated 2023-04-25 09:43:52 -0500

Hello,

I am trying to get basic motion planning working in RViz. Planning fails at random and I see messages like the following:

Constraint violated:: Joint name: 'shoulder', actual value: 0.813020, desired value: 0.813453, tolerance_above: 0.000100, tolerance_below: 0.000100

I could not find any information on:

  • Which file "tolerance_above" and "tolerance_below" settings are configured in
  • How to change them
  • How it's possible that the robot state does not match the joint states returned from the IK solver (which seems to be the source of this error).

My understanding of the planning pipeline is that the goal pose from RViz marker is sent to the move group, it finds an IK plugin to use, asks the IK plugin to return a solution for all of the active joints using the goal pose, then creates a robot state to represent the goal, and sets all the joints to solutions returned by IK. If the IK plugin does limit checking and clamps the solution for each joint to its limits, then I don't see how the goal robot state could end up with different values. In this case different by 0.0004, which honestly I don't even care about (would rather increase tolerance and move on).

Appreciate your help!

Description: https://github.com/01binary/str1ker/t...

MoveIt Config: https://github.com/01binary/str1ker_m...

image description

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2023-04-20 11:21:06 -0500

Mike Scheutzow gravatar image

updated 2023-04-23 08:50:23 -0500

This epsilon is being used to determine if two floating point values are the "same value". You shouldn't need to increase this unless your robot's joint values jump around a lot when the robot arm is theoretically not moving.

I would guess you are seeing this error message because it thinks the first entry in the plan is too far from the robot's current joint values. You are expected to fetch the current state of the robot joints for the planner before it calculates a plan.

More info: the "joint tolerance" parameter is used by a joint_controller to decide when a joint's current (rotation) value is "close enough" to the requested value. This parameter is typically configured on the joint_controller, but there should also be a default if it is unspecified. The joint_tolerance value might be different for each joint. Don't be fooled if the parameter contains the word "goal" - it is referring to the next-step, not the final step of the full trajectory plan.

For example, see the parameter description here

edit flag offensive delete link more

Comments

Where/how am I expected to fetch the current state of the robot joints for the planner?

How do I figure out why the joint values are jumping around when the robot arm is not moving?

v3040928092 gravatar image v3040928092  ( 2023-04-20 15:18:36 -0500 )edit

When using the rviz motion planner plugin, you need to explicitly set the start state.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2023-04-23 07:59:25 -0500 )edit

I tried that, it makes no difference for this error. The error is related to how far the IK solution is from the final resting place of the pose marker. Ideally the IK would report a failure when it can't reach the pose, but in my case I want it to "approximately reach the pose". The approximate solution checkbox doesn't work for that.

v3040928092 gravatar image v3040928092  ( 2023-04-23 22:18:50 -0500 )edit
0

answered 2023-04-28 00:57:05 -0500

v3040928092 gravatar image

updated 2023-04-28 00:59:23 -0500

MoveIt behaves differently when planning by using the RViz plugin versus sending commands to the Move Group topic (or using the Move Group directly through C++ API).

While motion planning requests to the real API let you configure goal tolerances, RViz did not let you do it when using the MoveIt plugin with fake controllers. I added this feature with Read Goal Tolerances from Kinematics Configuration pull request.

Now you can:

  • Enter goal tolerances per move group by using MoveIt Setup Assistant (see joint, position and orientation tolerance spinners)

image description

  • Enter goal tolerances manually by editing kinematics.yaml generated by MoveIt Setup Assistant

image description

It should work when creating a new MoveIt config or editing an existing MoveIt config, and any values you entered manually by editing the .yaml file should be picked by up MoveIt Setup Assistant and carried forward.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2023-04-19 01:57:42 -0500

Seen: 107 times

Last updated: Apr 28 '23