moveit / moveit_tutorials

A sphinx-based centralized documentation repo for MoveIt
https://moveit.github.io/moveit_tutorials/
BSD 3-Clause "New" or "Revised" License
475 stars 692 forks source link

[ERROR] RRTConnect: Motion planning start tree could not be initialized! When use the function setStartState #765

Closed QNXLQ closed 1 year ago

QNXLQ commented 1 year ago

Description

Please help with this issue: [ERROR] RRTConnect: Motion planning start tree could not be initialized!

In the work space, only have one 6-DOF robot.

And I set two pose A and B which the robot can be arrived and aren't singularity pose, the path won't pass any singularity cause they close.

When I started, the robot current sate is [0,0,0,0,0,0], and I want to use moveit::planning_interface::MoveGroupInterface::setStartState(const robot_state::RobotState &start_state) to change the start state of move group to calculate the path between A and B, here is the part of my code:

std::vector<double> poseA = {jA1, jA2, jA3, jA4, jA5, jA6}, poseB = {jB1, jB2, jB3, jB4, jB5, jB6}; robot_state::RobotState StartState("manipulator"); StartState.setStateValues(poseA); StartState.update(); move_group.setStartState(StartState); move_group.setJointValueTarget(poseB); moveit::planning_interface::MoveItErrorCode::Plan path; if(move_group.plan(path).val==1)... ...

The code compile successful but when run the code, an error happened: [ERROR] RRTConnect: Motion planning start tree could not be initialized!

How to fix it? I only want to do the planification but don't need to execute the path.

Your environment

Expected behaviour

In the API reference page, the description of the function "setStartState" is: "If a different start state should be considered instead of the current state of the robot, this function sets that state." I thought it should be allow change the start state if is different to current state.

welcome[bot] commented 1 year ago

Thanks for reporting an issue. Because we're a volunteer community, providing a pull request with suggested changes is always welcomed.

QNXLQ commented 1 year ago

was my fault, wrong size of joints positions. Strange that could run to the part of plan, should be stop because memory leak