Robotics StackExchange | Archived questions

How to troubleshoot "Constraint violated::" errors

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:

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/tree/master/description

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

image description

Asked by v3040928092 on 2023-04-19 01:57:42 UTC

Comments

Answers

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

Asked by Mike Scheutzow on 2023-04-20 11:21:06 UTC

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?

Asked by v3040928092 on 2023-04-20 15:18:36 UTC

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

Asked by Mike Scheutzow on 2023-04-23 07:59:25 UTC

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.

Asked by v3040928092 on 2023-04-23 22:18:50 UTC

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.

Asked by v3040928092 on 2023-04-28 00:57:05 UTC

Comments