0
$\begingroup$

Rosanswers logo

I have a basic question w.r.t IK and collison aware motion planning. This is the pipeline to my knowledge.

  1. A Geometric pose(X,Y,Z and rotation) target is received.
  2. The pose is fed to the IK solver,which gives the corresponding joint values for achieving the target pose.
  3. The joint values are fed to the Motion planner(Moveit-OMPL),which plans a joint-space plan along with timings and velocities at each point.
  4. The joint space plan is executed by the robot.

If this is accurate, How does the IK ensures that the joint angle value obtained in step 2 ( angles corresponding the target pose) are collision free? Does the IK give multiple solution for the planner to try or does the planner keep polling the IK for joint values until the joint target angles obtained don't result in collision.

P.S Can someone explain what does "Use-Collision-Aware IK" checkbox in the Rviz does?


Originally posted by Anirudh_s on ROS Answers with karma: 47 on 2017-07-04

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The pose is fed to the IK solver,which gives the corresponding joint values for achieving the target pose.

Depending on whether you use setJointValueTarget or setPoseTarget IK is performed before the planning or (in the latter case) as part of the planning.

How does the IK ensures that the joint angle value obtained in step 2 ( angles corresponding the target pose) are collision free?

MoveIt maintains the planning scene and hands the IK plugin a function to do collision checking on that scene. If the plugin does not find a non-colliding scene, it might restart or return false. It is up to the caller whether to give up or re-run IK with different settings when the plugin returns false.

--- update to comment below

As indicated above, things are different depending on the request you perform.

The RViz panel, performs IK on its own before forwarding any request to MoveIt. The "Use-Collision-Aware IK" check seems to be used only once here. Each IK response resulting from a request by the interactive marker is fed into this function and solutions for which it returns false are marked as invalid. I believe, the RViz plugin continuously reruns IK anyway as long as you drag around the marker, so I don't think it reruns on failed ik requests. (Didn't look through the whole code base here).

If you use the setJointValueTarget functions, the function will return false it didn't find a solution. Because the MoveGroupInterface is not aware of the PlanningScene, it does not perform collision checking. However, it will forward the generated target joint state to the move_group/ ompl and these will fail because of a collision. So if you use this interface, you should be aware that it's your responsibility to ensure collision-free joint states, e.g. by checking against a PlanningScene you maintain within your node.

If you use setPoseTarget instead, the interface will actually create constraint regions around your requested configuration and forward these to the move_group instead of a joint configuration. On the other side the move_group creates a ompl_interface::ConstrainedGoalSampler and hands it to OMPL. In this case it's up to the planning library how often it will call for a valid joint goal. If this fails too often, OMPL will actually complain about it on the command line I believe.


Originally posted by v4hn with karma: 2950 on 2017-07-04

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Anirudh_s on 2017-07-04:
But what is the default behaviour in moveit? Does it re-run until a valid collision free solution is received. Is OMPL engaged by moveit once this function returns true? Also is this function enabled/disabled by "Use-Collision-Aware IK" checkbox in the Rviz?

Comment by v4hn on 2017-07-05:
I just updated the answer. I hope I addressed your comment sufficiently well.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.