setting jump_threshold to 0 may be part of the issue, see here for a description of that argument.
Also, are any of your waypoints in collision with he obstacle?
Originally posted by jrgnicho with karma: 486 on 2018-09-17
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by akosodry on 2018-09-18:
@jrgnicho Thanks for the reply. I tried the jump_threshold to be 0.1 and also 100000 but it did not change the outcome. I updated the second image in my post with the waypoint numbers. Every waypoint is reachable and all of them are outside of the obstacle territory. BUT
Comment by akosodry on 2018-09-18:
BUT moving on a straight line from waypoint 16 to waypoint 17 is not possible since there is the obstacle (wood cube). BUT i expected (maybe wrongly) that compute_cartesian_path
can cleverly return a plan that bypasses the obstacle when moving from wp16 to wp17. Any tips,ideas? Thanks
Comment by gvdhoorn on 2018-09-18:\
BUT i expected (maybe wrongly) that compute_cartesian_path
can cleverly return a plan that bypasses the obstacle when moving from wp16 to wp17. Any tips,ideas? Thanks
No, that is not how it works.
computeCartesianPath(..)
does not "plan" (ie: come up with paths itself), it's simple linear ..
Comment by gvdhoorn on 2018-09-18:
.. interpolation between the waypoints, similar to how a traditional industrial robot controller would do it (ie: go through your obstacle).
So you'll have to make sure that linear interpolation between your waypoints works (or accept that only part of the interpolation will be successful).
Comment by akosodry on 2018-09-18:
@gvdhoorn Thanks for the reply. Can you recommend then what solution can be implemented to go from waypoint 16 to waypoint 17 (see the images in the post)? Should i manually add wpoints to bypass the obstacle? What is the meaning of avoid_collisions = true then?
Comment by akosodry on 2018-09-18:
Or using computeCartesianPath
is not the right way to solve the described problem?
Comment by gvdhoorn on 2018-09-18:
According to the documentation:
Collisions are avoided if avoid_collisions
is set to true. If collisions cannot be avoided, the function fails.
If due to robot kinematics there are configurations of your robot that allow computeCartesianPath(..)
to "work around" collisions, then it will ..
Comment by gvdhoorn on 2018-09-18:
.. use those.
If all of the solutions for a waypoint are still in collision, "the function fails", as the documentation states.
http://docs.ros.org/kinetic/api/moveit_ros_planning_interface/html/classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#afd29c4dc55b10564102cf393cd38c71d
Comment by gvdhoorn on 2018-09-18:
Interpolation != planning.
Afaik there are no "Cartesian planners" readily available as ROS pkgs (but I could be wrong of course, do search around), so it might require some work-arounds.
Adding additional waypoints should work.
Comment by akosodry on 2018-09-18:
Okey! This helped me a lot! Thanks! But instead of manual wp addition+computeCartesianPath isnt there a more clever way to do the complete coverage of the surface with obstacles?
Comment by akosodry on 2018-09-18:
@gvdhoorn For example i read about the Descartes cartesian path-planner
. Does it suit better in the problem?
Comment by gvdhoorn on 2018-09-18:
You could see whether tesseract can help here.
Note though: this is a guess and will require you to do things differently (ie: no MoveIt commander).
Comment by akosodry on 2018-09-18:
Yea i naively thought on a moveit commander based method :) I will extend my script with wp addition and see what will the computeCartesianPath
do. Thank you for the help!!
Comment by jrgnicho on 2018-09-18:
Instead of adding waypoints you could break up your trajectory into linear and free motion segments where you move linearly from the start position to the waypoint closest to the obstacle, then you "plan" from that point to the next point past the obstacle with a start-to-goal planner such as OMPL
Comment by jrgnicho on 2018-09-18:
and then you again move linearly from that point to the end of your trajectory.
Comment by akosodry on 2018-09-18:
@jrgnicho Thanks for the reply! Its sounds very good!!
Comment by akosodry on 2018-09-18:
@jrgnicho can you recommend which planner is the most suited for the described problem? there are quite a lot: KPIECE, RRT, RRTConnect, SPARS and so on.... (in the moveit setup assistant it is possible to choose the default planner)
Comment by jrgnicho on 2018-09-18:
@akosodry I believe the one planner I tend to use is RRTConnectkConfigDefault