moveit2 icon indicating copy to clipboard operation
moveit2 copied to clipboard

CheckStartStateBounds does not support REVOLUTE and NOT Continuous type joints

Open chama1176 opened this issue 1 year ago • 2 comments
trafficstars

Description

CheckStartStateBounds does not support REVOLUTE and NOT Continuous type joints

Your environment

  • ROS Distro: Jazzy
  • OS Version: e.g. Ubuntu 24.04
  • Binary build 2.10.0

Steps to reproduce

  • Set the initial posture of the actual robot to a position beyond the urdf limit.
  • Press “plan” button in rviz to plan the trajectory.

Expected behaviour

CheckStartStateBounds is not SUCCESS. And fixed to joint limit in case fix_start_state is true.

Actual behaviour

CheckStartStateBounds is SUCCESS.

Details

In https://github.com/moveit/moveit2/pull/2429, CheckStartStateBounds is refactored. The logic has also been changed so that the check is skipped for non-infinite rotation joints, which are used in most arm joints.

https://github.com/moveit/moveit2/blob/a7fe0df4c565db15710581bdcba1d33d70aa0ddb/moveit_ros/planning/planning_request_adapter_plugins/src/check_start_state_bounds.cpp#L105-L120

chama1176 avatar Jul 22 '24 04:07 chama1176

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.

github-actions[bot] avatar Sep 05 '24 12:09 github-actions[bot]

Looking at the code - yup, this is definitely an issue - the switch statement logic will basically never hit the default case

mikeferguson avatar Oct 10 '24 13:10 mikeferguson

Does this just involve moving the break; in that block up one indentation level?

sea-bass avatar Nov 30 '24 13:11 sea-bass

The original logic was:

  • for each joint model:
    • if REVOLUTE & continuous, call enforceBounds() [OK]
    • else
      • if PLANAR - normalizeRotation [OK]
      • else FLOATING - normalizeRotation [OK]
  • read parameters
  • for each joint model:
    • apply the satisfiesBounds logic

I think we actually just need to pull the "default" case outside the switch statement and do it for all joints?

mikeferguson avatar Nov 30 '24 15:11 mikeferguson