-
Notifications
You must be signed in to change notification settings - Fork 228
Description
I am a biginner trying to build a 2 DOF arm and control it with moveit2. Here is my github repo with all the code.
The Setup:
I have demo.launch.py that starts moveit nodes, ros controllers, robot_state_publisher and rviz. I run this command first to start everything. ros2 launch moveit_config demo.launch.py;
Then i have a hello_moveit node which simply reads the current pose using getCurrentPose function, prints it and then calls setPoseTarget with the current pose. I run this node using ros2 launch moveit_config hello_moveit.launch.py command.
What do i expect?
I expect the OMPL planner to do nothing and just print that the target goal already reached.
What actually happens?
The OMPL planner fails with following logs:
[move_group-5] [INFO] [1755981225.897980207] [move_group.moveit.moveit.ros.move_group.move_action]: MoveGroupMoveAction: Received request
[move_group-5] [INFO] [1755981225.898254955] [move_group.moveit.moveit.ros.move_group.move_action]: executing..
[move_group-5] [INFO] [1755981225.907339391] [move_group.moveit.moveit.ros.move_group.move_action]: Planning request received for MoveGroup action. Forwarding to planning pipeline.
[move_group-5] [INFO] [1755981225.907477011] [move_group]: Calling PlanningRequestAdapter 'ResolveConstraintFrames'
[move_group-5] [INFO] [1755981225.907503905] [move_group]: Calling PlanningRequestAdapter 'ValidateWorkspaceBounds'
[move_group-5] [WARN] [1755981225.907509323] [move_group.moveit.moveit.ros.validate_workspace_bounds]: It looks like the planning volume was not specified. Using default values.
[move_group-5] [INFO] [1755981225.907518977] [move_group]: Calling PlanningRequestAdapter 'CheckStartStateBounds'
[move_group-5] [INFO] [1755981225.907532670] [move_group]: Calling PlanningRequestAdapter 'CheckStartStateCollision'
[move_group-5] [INFO] [1755981225.907978829] [move_group.moveit.moveit.planners.ompl.model_based_planning_context]: Planner configuration 'arm' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed.
[move_group-5] [INFO] [1755981225.908042960] [move_group]: Calling Planner 'OMPL'
[move_group-5] [ERROR] [1755981230.913671784] [move_group.moveit.moveit.planners.ompl.planner_manager]: ./src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:265 - arm/arm: Unable to sample any valid states for goal tree
[move_group-5] [WARN] [1755981230.913797637] [move_group.moveit.moveit.planners.ompl.model_based_planning_context]: Invalid goal state
[move_group-5] [ERROR] [1755981231.045804863] [move_group.moveit.moveit.planners.ompl.model_based_planning_context]: Unable to solve the planning problem
[move_group-5] [ERROR] [1755981231.045949337] [move_group]: Planner 'OMPL' failed with error code GOAL_STATE_INVALID
[move_group-5] [ERROR] [1755981231.045972569] [move_group.moveit.moveit.ros.move_group.move_action]: Generating a plan with planning pipeline failed.
[move_group-5] [INFO] [1755981231.045987525] [move_group.moveit.moveit.ros.move_group.move_action]: FAILURE
What debugging have i tried?
- To debug, i saved the current pose in PoseA variable, then i moved the robot arm using rViz "MotionPlanner". After i manually move the arm to a different position in rViz, i then try setPoseTarget to poseA. PoseA should be valid pose because thats what the getCurrentPose returned earlier. But still the planner prints the same error message.
- I tried to set position and orientation tolerance to 0.1 . But that did not work.
- google searched similar issues. The solution there did not help.
Possible solutions to try out:
- This stackexchange question and others suggests that KDL solver and others works well with 6DOF. Add fake joints to increase DOF from 2 to 6 . S i can try out other solvers that works better with 2DOF.
- I can also implement my own IK as its going to be simple for a 2DOF.