moveit / moveit2

:robot: MoveIt for ROS 2
https://moveit.ai/
BSD 3-Clause "New" or "Revised" License
1.04k stars 512 forks source link

MoveIt Servo includes a default `joint_limit_margins` that only works with a 7dof arm #2843

Closed EzraBrooks closed 1 month ago

EzraBrooks commented 4 months ago

Description

The default value for joint_limit_margins in Servo is [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], which leads to it crashing confusingly for any arm with greater or fewer dofs than 7.

https://github.com/moveit/moveit2/blob/c72ac1bfc4fad1288bc0e5361c16edaaf8b90a01/moveit_ros/moveit_servo/config/servo_parameters.yaml#L327-L334

Your environment

Steps to reproduce

Expected behaviour

Either:

The default value should be auto-populated as a vector of the same length as the active move group that contains 0.1 in each index,

or

No default value should be set, and the user should be informed that they must set joint_limit_margins.

Actual behaviour

Servo crashes with an error message telling you that you must have the same number of elements in joint_limit_margins and your active move group. Since you didn't set joint_limit_margins, it isn't present in the "parameters YAML file" mentioned in the error message, so this is a bit confusing.

Backtrace or Console output

(sorry, would include as text, but was sent as a screenshot to me)

image

dohyeoklee commented 3 months ago

Are you still suffering from this issue? For me, I also got the same kind of error, so I changed the source code and re-build it. (I use ur5 so I changed [0.1,0.1,0.1,0.1,0.1,0.1,0.1] to [0.1,0.1,0.1,0.1,0.1,0.1]) It actually solved the problem but another error came out. So I re-installed everything from ubuntu to moveit. (original: ubuntu 22.04, ros2 iron, moveit2 from source build -> alternative: ubuntu 22.04, ros2 humble, ros2 middleware as cyclone dds, moveit2 from binary install, ros2 control install) It still causes joint_margin error, but everything works perfect. (no crash) From my guess, the joint_margin error itself is not the cause of this issue, it's just the result. So I recommend you to re-install and change some install methods.

github-actions[bot] commented 1 month ago

This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.