Position constraints with JointPlanner [closed]

asked 2012-08-13 22:47:48 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello,

I would like to ask if it is possible to set position constraints for Joint Planner. I tried to set constraints (shown in code below) and planning with joint planner failed - with RPYIKTaskSpacePlanner planner success. Planning without constraints was success in both (joint and rpyikTask) planners. Timeout was set to 30s and I was calling planner service instead of move_arm server.

thanks for your help.

Planning log (level: INFO):

[ INFO] [1344933811.813118228]: Starting with 1 states
[ INFO] [1344933841.831155436]: Created 222 states
[ INFO] [1344933841.831249585]: No solution found after 30.018482 seconds
[ERROR] [1344933841.831272145]: Could not find solution for request

Constraint:

    arm_navigation_msgs::PositionConstraint position_constraint;
position_constraint.header.stamp = ros::Time::now();
position_constraint.header.frame_id = "base_link";
position_constraint.link_name = "r2_tip_link";
position_constraint.position.x = 0.8;
position_constraint.position.y = -1.0;
position_constraint.position.z = 1.0;
position_constraint.constraint_region_shape.type = arm_navigation_msgs::Shape::BOX;
position_constraint.constraint_region_shape.dimensions.push_back(5.0);
position_constraint.constraint_region_shape.dimensions.push_back(5.0);
position_constraint.constraint_region_shape.dimensions.push_back(2.0);
position_constraint.constraint_region_orientation.x = 0.0;
position_constraint.constraint_region_orientation.y = 0.0;
position_constraint.constraint_region_orientation.z = 0.0;
position_constraint.constraint_region_orientation.w = 1.0;
position_constraint.weight = 0.0;
position_constraint.target_point_offset.x = 0;
position_constraint.target_point_offset.y = 0;
position_constraint.target_point_offset.z = 0;

mp.request.motion_plan_req.path_constraints.position_constraints.push_back(position_constraint);
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-04-06 01:52:16.258371

Comments

When I did following update it works (I hope): put joint_state_group_->updateKinematicLinks(); before if (!path_constraint_evaluator_set_.decide(kinematic_state_, false)) { ROS_DEBUG("Path constraints violated"); return false; } in ompl_ros_joint_state_validity_checker in function isValid.

voop gravatar imagevoop ( 2012-08-20 04:53:12 -0600 )edit