Ask Your Question
0

better ways to calculate the cartesian path for move_group

asked 2020-08-12 09:15:51 -0600

xibeisiber gravatar image

Hi all,

I wonder if there are better ways to calculate the cartesian path other than the computeCartesianPath() of move_group.

Instead of letting move_group pass random samples of target pose within tolerance to the ik solver, now I call the ik solver directly, which can increase the efficiency of finding solutions.

I think computeCartesianPath() does the same trick, i.e. passing random samples of target pose to ik solver, right? But it seems this function also does other things like calculating the velocity, finally generating a trajectory (type moveit_msgs::RobotTrajectory). Therefore if I call the ik solver directly here, I also need to calculate the velocity and enclose them as moveit_msgs::RobotTrajector, seems a lot of work..

trac_ik seems to have a cartesian path planner, but I can't find the source code of this part in https://bitbucket.org/traclabs/trac_i...

edit retag flag offensive close merge delete

Comments

Instead of letting move_group pass random samples of target pose within tolerance to the ik solver

Could you point to where you believe this is happening? IIUC, computeCartesianPath(..) uses linear interpolation with slerp between two poses with a given step-size.

I'm not aware of it doing anything "random".

gvdhoorn gravatar image gvdhoorn  ( 2020-08-13 02:54:47 -0600 )edit

Sorry, I didn't state it very clearly. I mean when moveit tries to get the ik solution of these interpolation points, it passes these points plus a random noise within tolerance, rather than pass the exact interpolation points to the iksolver. Like I posted here.

xibeisiber gravatar image xibeisiber  ( 2020-08-13 05:48:24 -0600 )edit

It would still be good if you could link to the code.

gvdhoorn gravatar image gvdhoorn  ( 2020-08-13 05:54:00 -0600 )edit

one possible place in the code is here. line 414-506. Not sure if other place also does that.

xibeisiber gravatar image xibeisiber  ( 2020-08-13 05:59:14 -0600 )edit

That would be moveit_core/constraint_samplers/src/default_constraint_samplers.cpp; L414 to L506 in ros-planning/moveit.

Please try to always link to the Github repository.

As far as I can tell, constraint samplers are not used in computeCartesianPath(..). Could you point to the lines in computeCartesianPath(..) which you believe are using the constraint sampler? Or any other place where it adds randomness?

gvdhoorn gravatar image gvdhoorn  ( 2020-08-13 06:26:00 -0600 )edit

quote: "As far as I can tell, constraint samplers are not used in computeCartesianPath(..)."

Then I might be wrong, sorry for that. I thought computeCartesianPath(..) also uses it to solve ik of interpolation points.

xibeisiber gravatar image xibeisiber  ( 2020-08-13 07:49:29 -0600 )edit

I'm not claiming you're wrong immediately. Afaict, in the end setFromIK(..) is used (here), which ends up here. This can be passed a constraint callback I believe (in the constraint argument), but I'm not sure whether that ends up in/with the file you link to.

Perhaps @v4hn can add something here.

gvdhoorn gravatar image gvdhoorn  ( 2020-08-13 08:26:43 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-08-12 15:45:59 -0600

achille gravatar image

If you have access to the analytical IK solutions, I recommend Descartes, which builds a grid and searches it. Otherwise, I've seen people roll their own. That typically depends on the robot and the complexity of the cartesian paths.

edit flag offensive delete link more

Comments

thanks! I will check this.

xibeisiber gravatar image xibeisiber  ( 2020-08-13 01:43:10 -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

3 followers

Stats

Asked: 2020-08-12 09:15:51 -0600

Seen: 166 times

Last updated: Aug 12 '20