Ask Your Question

Unable to plan motion for panda hand

asked 2018-06-09 07:42:44 -0600

Ridhwanluthra gravatar image

Here is the relevant code

  moveit::planning_interface::MoveGroupInterface hand_group("hand");

  const robot_state::JointModelGroup* joint_model_group =

  moveit::core::RobotStatePtr current_state = hand_group.getCurrentState();

  std::vector<double> joint_group_positions;
  current_state->copyJointGroupPositions(joint_model_group, joint_group_positions);

  joint_group_positions[0] = 0.2;
  joint_group_positions[1] = 0.2;


  bool success = (hand_group.plan(my_plan) == moveit::planning_interface::MoveItErrorCode::SUCCESS);
  if (success)

The error that I am getting is:

[ INFO] [1528546088.759251274]: Loading robot model 'panda'...
[ INFO] [1528546088.879916832]: Loading robot model 'panda'...
[ INFO] [1528546089.928447024]: Ready to take commands for planning group panda_arm.
[ INFO] [1528546091.680119770]: Ready to take commands for planning group hand.
[ WARN] [1528546093.292230343]: Fail: ABORTED: No motion plan found. No execution attempted.

thank you in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-10 10:38:44 -0600

v4hn gravatar image

There is multiple things wrong with this question / code.

  1. Please write in full sentences and explain what you want to achieve and what moveit configuration you use. Also include links to the repositories. Otherwise nobody understands what you mean.

I believe you are using and .

I have no idea what you are trying to achieve.

The code is overly redundant and can be reduced to less lines of code.

  1. you apparently try to control the hand group of the robot, which consists of two prismatic joints defined here. As can be seen in the line pointed out in the link, the upper joint limits of both are 0.04m. You specify a target position of 0.2m per joint. The gripper cannot open that wide, so the plan request fails. You probably see an output like "No valid goal state sampled" in the terminal where you started moveit.

  2. You don't need current_state at all - nor do you need a moveit::core::RobtState anywhere. You could just specify your target as hand_group.setJointValueTarget(std::vector<double> {0.04,0.04}) or similar.

  3. The way you use plan and move suggests you expect move to execute the plan you generated before. This is not the case. As a matter of fact the logic you implement here is equivalent to just calling move() without plan before.

edit flag offensive delete link more


I don't understand point 3: I believe he was following the MoveIt! tutorials (this). Why is move not using the generated plan?

aPonza gravatar image aPonza  ( 2018-09-27 07:31:37 -0600 )edit

my_plan in that code is never actually used for moving the robot, only for visualisation using moveit_visual_tools.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-27 07:39:06 -0600 )edit

I see, he should have called hand_group.execute(my_plan); to move according to the planned plan. Thanks!

aPonza gravatar image aPonza  ( 2018-09-27 08:02:47 -0600 )edit

As far as I understand, hand_group.execute(my_plan); is used for Cartesian paths. I have used point 2 with success with move() afterwards, and as stated before, MoveIt! tutorials present a similar code. I don't think the code is equivalent to just calling move() without plan before as point 3 suggests.

Edit 17/07/2019 After reading the class documentation I found that:

move() = plan(new_plan) + execute(new_plan) so point 3 is correct. It is important to notice that move() creates and executes a new plan every time, therefore plan(my_plan) is a different path which can be the same occasionally.

It is also worth noting that execute(some_plan) will not allow the control of velocity and acceleration if used with a real robot as stated here.

byque gravatar image byque  ( 2019-07-10 10:08:08 -0600 )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: 2018-06-09 07:42:44 -0600

Seen: 708 times

Last updated: Jun 10 '18