Robotics StackExchange | Archived questions

better ways to calculate the cartesian path for move_group

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..

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

Asked by xibeisiber on 2020-08-12 09:15:51 UTC

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".

Asked by gvdhoorn on 2020-08-13 02:54:47 UTC

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.

Asked by xibeisiber on 2020-08-13 05:48:24 UTC

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

Asked by gvdhoorn on 2020-08-13 05:54:00 UTC

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

Asked by xibeisiber on 2020-08-13 05:59:14 UTC

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?

Asked by gvdhoorn on 2020-08-13 06:26:00 UTC

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.

Asked by xibeisiber on 2020-08-13 07:49:29 UTC

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.

Asked by gvdhoorn on 2020-08-13 08:26:43 UTC

Answers

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.

Asked by achille on 2020-08-12 15:45:59 UTC

Comments

thanks! I will check this.

Asked by xibeisiber on 2020-08-13 01:43:10 UTC