ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

What is the difference between "group.execute" and "group.move"?

asked 2021-09-15 01:45:29 -0500

omeranar1 gravatar image

updated 2021-09-15 03:36:39 -0500

fvd gravatar image

I LOVE ROS

Hi, I have two options to move my robot with MoveIt:

Option 1

moveit::planning_interface::MoveGroupInterface::Plan plan;
kPyGlobals.move_group_end->setJointValueTarget( goals );
kPyGlobals.move_group_end->plan( plan );
kPyGlobals.move_group_end->execute( plan );

Option 2

kPyGlobals.move_group_end->setJointValueTarget( goals );
if ( syn == Synctype::SYNC )
    kPyGlobals.move_group_end->move();
else if ( syn == Synctype::ASYNC )
    kPyGlobals.move_group_end->asyncMove();

Normally I use option 1 because I want to use the created plan for later.

But what is the difference between these two options?

edit retag flag offensive close merge delete

Comments

I am glad that you love ROS. What is your question?

fvd gravatar image fvd  ( 2021-09-15 01:59:11 -0500 )edit

what is the difference between these two options

omeranar1 gravatar image omeranar1  ( 2021-09-15 02:12:52 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-09-15 03:13:34 -0500

fvd gravatar image

As you noticed, using plan and execute rather than only move, you can inspect, store and change the planning result. For example, you could:

  • plan a motion ahead of time and execute it later
  • store a series of motions that end at the start position and execute them repeatedly without replanning
  • retime your resulting trajectory(ies)

With plan, you can also use setStartState to plan motions that do not begin at the current state of the robot. This is not possible with move.

edit flag offensive delete link more

Comments

thank you so much

omeranar1 gravatar image omeranar1  ( 2021-09-15 03:17:20 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-09-15 01:45:29 -0500

Seen: 397 times

Last updated: Sep 15 '21