ROBOTIS-GIT / open_manipulator

OpenManipulator for controlling in Gazebo and Moveit with ROS
http://emanual.robotis.com/docs/en/platform/openmanipulator/
Apache License 2.0
325 stars 146 forks source link

Unable to sample any valid states for goal tree. (Moveit2 - Humble) #250

Closed Aki1608 closed 1 year ago

Aki1608 commented 1 year ago

Hi,

I want to simulate the arm in gazebo/rviz. I am following the official "humble" documents for moveit. What I am trying is to import the urdf file of "open_manipulator" and create an ".srdf" file. And then in Rviz, move it to a location by giving x,y,z coordinate.

When I try with the "panda robot" as per the documentation, I can able move the arm but when I try it with "open_manipulator" arm, I get error: Unable to sample any valid states for goal tree.

Exact error: `move_group-3] [INFO] [1683876548.668132620] [moveit_move_group_default_capabilities.move_action_capability]: Received request

[move_group-3] [INFO] [1683876548.673412943] [moveit_move_group_default_capabilities.move_action_capability]: Planning request received for MoveGroup action. Forwarding to planning pipeline. [move_group-3] [INFO] [1683876548.675096050] [moveit.ompl_planning.model_based_planning_context]: Planner configuration 'open_manipulator_arm' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed. [move_group-3] [ERROR] [1683876553.681650117] [ompl]: ./src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:252 - open_manipulator_arm/open_manipulator_arm: Unable to sample any valid states for goal tree [move_group-3] [WARN] [1683876553.681779365] [moveit.ompl_planning.model_based_planning_context]: Timed out [move_group-3] [INFO] [1683876554.756590153] [moveit.ompl_planning.model_based_planning_context]: Unable to solve the planning problem [move_group-3] [INFO] [1683876554.757411913] [moveit_move_group_default_capabilities.move_action_capability]: Timeout reached`

The pose that I am giving is in the range of "open_manipulator" arm. I tried many different poses but I am still getting same error. In rviz, it is working properly without any error.

What can be the error here? Is it related to ompl planner or the srdf that I am creating with moveit2 humble version?

You can find my ".srdf" file below. (since .srdf file extension is not supported here, I have changed the extension to .txt) open_manipulator_x _srdf.txt

I am using the moveit.py file (attached below) to give the location to the arm. moveit_cpp.txt

I am not sure why I cant move the arm to a point with the script but in Rviz I can do that very easily.

So, I am using Ubuntu 22.04 and ROS2 Humble. I installed moveit2 using this link (from official document). I build it from source.

Aki1608 commented 1 year ago

This problem was happening because of the DoF is 4 for manipulator but the moveit is designed for solving IK for 6 DoF. I just added 2 virtual link which solved my issue.