ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

RRTConnect/TRAC IK fails only on Distance solve_type

asked 2017-11-09 11:15:06 -0500

rivertam gravatar image

updated 2017-11-09 11:15:39 -0500

So I'm trying to change the solve_type to "Distance" as opposed to "Speed" for TRAC IK. RRTConnect and TRAC IK acknowledge the change, but I'm getting an error in the console and a failed compute solve. (it doesn't fail with Speed, and the target position I'm trying is essentially the start position).

The error is as follows:

Error:   RRTConnect: Unable to sample any valid states for goal tree
     at line 215 in /tmp/binarydeb/ros-kinetic-ompl-1.2.1/src/ompl/geometric/planners/rrt/src/RRTConnect.cpp

The code I'm using to solve is as follows:

    planning_interface::MotionPlanRequest req;
    planning_interface::MotionPlanResponse res;

    geometry_msgs::PoseStamped pose;
    pose.header.frame_id = "world";
    pose.pose.position.x = messageTarget.x();
    pose.pose.position.y = messageTarget.y();
    pose.pose.position.z = messageTarget.z();

    pose.pose.orientation.w = 1;

    std::vector<double> tolerancePose(3, 0.01);
    std::vector<double> toleranceAngle(3, 0.01);

    req.workspace_parameters.min_corner.x = -50;
    req.workspace_parameters.min_corner.y = -50;
    req.workspace_parameters.min_corner.z = -50;
    req.workspace_parameters.max_corner.x = 50;
    req.workspace_parameters.max_corner.y = 50;
    req.workspace_parameters.max_corner.z = 50;
    req.group_name = "arm";
    req.start_state.joint_state = this->getCurrentJointState(true);
    moveit_msgs::Constraints poseGoal =
            kinematic_constraints::constructGoalConstraints("ee_link", pose, tolerancePose, toleranceAngle);

    planning_interface::PlanningContextPtr context =
            this->plannerInstance->getPlanningContext(this->planningScene, req, res.error_code_);


Again, it works with "Speed" but not with "Distance".

My kinematics.yml file looks like this:

  solve_type: Distance
  kinematics_solver: trac_ik_kinematics_plugin/TRAC_IKKinematicsPlugin
  kinematics_solver_timeout: 10

I wouldn't mind changing to a different planner (if I could figure out how), but I think TRAC IK is right for our application.

Is there a way I can fix it? Am I not including the right information in the request?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-11-09 15:15:57 -0500

rivertam gravatar image

My problem was actually that my timeout was too high. I suppose MoveIt! or OMPL somewhere down the line has its own timeout that TRAC_IK was violating because it thought it had more time. Removing the timeout parameter makes the error go away (though the solve is incorrect, but I'm still working on that; any input would be nice)

edit flag offensive delete link more



I suppose MoveIt! or OMPL somewhere down the line has its own timeout

that is most likely the regular planning request timeout, which is 5 seconds by default.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-10 01:13:23 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-11-09 11:15:06 -0500

Seen: 881 times

Last updated: Nov 09 '17