You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using the python binding for moveit2 library, but unfortunately I am unable to make the trajectory planning stable and it often shows the error "Unable to solve the planning problem" or timeout (over 20s) as follows:
Besides, the robot is a 5-DOF robot arm with addition 1 DOF for gripper.
moveit_controller-1] [INFO] [1733616772.991477379] [moveit_controller]: Target pose: geometry_msgs.msg.Pose(position=geometry_msgs.msg.Point(x=0.0, y=0.12, z=0.07), orientation=geometry_msgs.msg.Quaternion(x=-0.7071067811865476, y=0.0, z=0.0, w=0.7071067811865476))
[moveit_controller-1] [INFO] [1733616772.991932086] [moveit_controller]: Update current joint degrees: {'link1_to_base_link': 0.0, 'link2_to_link1': 0.0, 'link3_to_link2': 0.0, 'link4_to_link3': 0.0, 'link5_to_link4': 0.0, 'link6_to_link5': 0.0}
[moveit_controller-1] [INFO] [1733616772.993141512] [moveit_controller]: Current pose: geometry_msgs.msg.Pose(position=geometry_msgs.msg.Point(x=-0.0005580000000000001, y=0.32107, z=0.041141000000000004), orientation=geometry_msgs.msg.Quaternion(x=0.0, y=0.0, z=0.0, w=1.0))
[moveit_controller-1] [INFO] [1733616772.994579686] [moveit_controller]: Planning trajectory
[moveit_controller-1] [INFO] [1733616772.994876643] [moveit_controller]: Calling PlanningRequestAdapter 'ResolveConstraintFrames'
[moveit_controller-1] [INFO] [1733616772.995129184] [moveit_controller]: Calling PlanningRequestAdapter 'ValidateWorkspaceBounds'
[moveit_controller-1] [INFO] [1733616772.995151500] [moveit_controller]: Calling PlanningRequestAdapter 'CheckStartStateBounds'
[moveit_controller-1] [INFO] [1733616772.995191994] [moveit_controller]: Calling PlanningRequestAdapter 'CheckStartStateCollision'
[moveit_controller-1] [WARN] [1733616772.995374200] [moveit_2119459007.moveit.planners.ompl.planning_context_manager]: Cannot find planning configuration for group 'manipulator' using planner 'RRTConnectkConfigDefault'. Will use defaults instead.
[moveit_controller-1] [INFO] [1733616772.996140903] [moveit_2119459007.moveit.planners.ompl.model_based_planning_context]: Planner configuration 'manipulator' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed.
[moveit_controller-1] [INFO] [1733616772.996362339] [moveit_controller]: Calling Planner 'OMPL'
[moveit_controller-1] [ERROR] [1733616792.998795001] [moveit_2119459007.moveit.planners.ompl.planner_manager]: ./src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:252 - manipulator/manipulator: Unable to sample any valid states for goal tree
[moveit_controller-1] [ERROR] [1733616793.001731750] [moveit_2119459007.moveit.planners.ompl.planner_manager]: ./src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:252 - manipulator/manipulator: Unable to sample any valid states for goal tree
[moveit_controller-1] [ERROR] [1733616793.003247415] [moveit_2119459007.moveit.planners.ompl.planner_manager]: ./src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:252 - manipulator/manipulator: Unable to sample any valid states for goal tree
[moveit_controller-1] [ERROR] [1733616793.003307984] [moveit_2119459007.moveit.planners.ompl.planner_manager]: ./src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:252 - manipulator/manipulator: Unable to sample any valid states for goal tree
[moveit_controller-1] [WARN] [1733616793.003438425] [moveit_2119459007.moveit.planners.ompl.planner_manager]: ./src/ompl/tools/multiplan/src/ParallelPlan.cpp:138 - ParallelPlan::solve(): Unable to find solution by any of the threads in 20.006969 seconds
[moveit_controller-1] [ERROR] [1733616793.038515293] [moveit_2119459007.moveit.planners.ompl.model_based_planning_context]: Unable to solve the planning problem
[moveit_controller-1] [ERROR] [1733616793.038612219] [moveit_controller]: Planner 'OMPL' failed with error code FAILURE
I couldn't find any APIs to set the goal constraints easily, though I noticed that there is a kinematic_constraints where there is a constructJointConstraint function, however I think that's different from the capability provided from MoveGroupInterface where I just need to set a scalar.
Therefore, I managed to change all my code to C++ version with all API available to use. Surprisingly, I found the planning goes well, I tested it on the same script, where multiple tries always succeed to find a trajectory result.
Then, I realized that the Python API is a bit different from C++ part. It uses MoveGroupInterface in C++, but in Python, it uses PlanningComponent.
I also tried to set the goal tolerance to 0 in C++ implementation. The planning become unable to generate reliable plan and often failed. (the code to set goal tolerance is below)
I think the inability to generate a reliable plan in Python API is due to the lack of similar API support on goal tolerance. Is it something in the roadmap, or is it something that due to the design philosophy in Python API so it won't be supported in this way?
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.
Description
I was using the python binding for moveit2 library, but unfortunately I am unable to make the trajectory planning stable and it often shows the error "Unable to solve the planning problem" or timeout (over 20s) as follows:
Besides, the robot is a 5-DOF robot arm with addition 1 DOF for gripper.
I couldn't find any APIs to set the goal constraints easily, though I noticed that there is a kinematic_constraints where there is a
constructJointConstraint
function, however I think that's different from the capability provided from MoveGroupInterface where I just need to set a scalar.Therefore, I managed to change all my code to C++ version with all API available to use. Surprisingly, I found the planning goes well, I tested it on the same script, where multiple tries always succeed to find a trajectory result.
I also take a look the default tolerance value by
The output is as below, where there is default goal tolerance 1e-4:
Then, I realized that the Python API is a bit different from C++ part. It uses
MoveGroupInterface
in C++, but in Python, it uses PlanningComponent.I also tried to set the goal tolerance to 0 in C++ implementation. The planning become unable to generate reliable plan and often failed. (the code to set goal tolerance is below)
I think the inability to generate a reliable plan in Python API is due to the lack of similar API support on goal tolerance. Is it something in the roadmap, or is it something that due to the design philosophy in Python API so it won't be supported in this way?
Some refs:
Thank you very much.
ROS Distro
Jazzy
OS and version
Ubuntu 24.04
Source or binary build?
Source
If binary, which release version?
No response
If source, which branch?
main
Which RMW are you using?
None
Steps to Reproduce
Follow the Python guide, and use a 5-DOF robot URDF
Expected behavior
It should be able to set goal tolerance to make planning more reliable.
Actual behavior
I couldn't find the api related to goal tolerance on Python.
Backtrace or Console output
No response
The text was updated successfully, but these errors were encountered: