Strange Tool Flip in Descartes

asked 2017-07-07 06:31:14 -0500

jbeck28 gravatar image

I've been trying to plan a path through a pretty dense cartesian path, and I've noticed that throughout the trajectory, the tool will occasionally flip 2pi radians. I'm wondering if anyone has any ideas as to why this might be? Here's a link to a video of the problem: https://goo.gl/photos/KTuKRfcz9V7NPU2b7

I'm also wondering if there's any way to speed up the visualization, as it takes quite a long time to view the entire simulation.

Thanks in advance, Josh

edit retag flag offensive close merge delete

Comments

joint flips are typically an IK problem. I don't know exactly how you've configured things, but that would be something to check.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-07 07:09:40 -0500 )edit

I have tried using KDL, but I've found that trac ik generally chooses a more natural configuration so I've begun using that. Is there anything in particular I could provide that would help narrow down the cause?

jbeck28 gravatar image jbeck28  ( 2017-07-07 07:14:10 -0500 )edit

I'm surprised this works for you. Descartes used to absolutely require an IKFast plugin (as it needs all solutions for each pose to properly plan). Is that not the case any more?

Also: IKFast solves in microseconds. Trac_IK is millisecondS work.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-07 07:16:15 -0500 )edit

Are you re-using any part of the demo setups, or is this a completely new setup? I think your video shows an IRB 2400, correct? There is a descartes IK plugin for that, no?

gvdhoorn gravatar image gvdhoorn  ( 2017-07-07 07:18:04 -0500 )edit

I didn't realize that IKFast was so necessary. I just changed the solver in kinematics.yaml and it had massively increased success rate. I found that with IKfast it would only be able to plan a path perhaps 20% of the time for the same set of poses, so it also seemed very non-repeatable.

jbeck28 gravatar image jbeck28  ( 2017-07-07 08:45:57 -0500 )edit

I modified a few launch files and made a moveit config for the IRB2400, I mostly reused the second descartes tutorial, just made some changes to parse in a predefined set of poses, and changed which robot to load.

jbeck28 gravatar image jbeck28  ( 2017-07-07 08:46:45 -0500 )edit

I believe there is an ikfast plugin for that robot. Though, with IKFast, don't I need to plan with respect to tool0 instead of my defined toolFrame?

jbeck28 gravatar image jbeck28  ( 2017-07-07 08:47:31 -0500 )edit

There is a descartes specific IKFast plugin for ABB IRB 2400 in ros-industrial-consortium/godel. See godel_irb2400. I'm not sure what the status is. I'd ask on the issue tracker.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-07 08:50:15 -0500 )edit

I've downloaded that, very impressed with the blending demo, as that's effectively what I'm trying to accomplish except on a more complex surface than a plano. I'm a bit confused, however, as the kinematics.yaml file still seems to specify KDL, rather than IKfast. Sorry if that's a silly confusion.

jbeck28 gravatar image jbeck28  ( 2017-07-07 10:27:04 -0500 )edit

Check: youtube/cMZaxKsQdhg. Godel does doubly curved surfaces as well. If you're interested, send a message to the ROS-Industrial mailing list.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-07 10:29:26 -0500 )edit

re: kinematics.yaml: Godel does not use Moveit for the tool path planning, so kinematics.yaml is not used.

gvdhoorn gravatar image gvdhoorn  ( 2017-07-07 10:30:08 -0500 )edit

Based on that video, I'm most certainly going to look into Godel to achieve what I need, that looks very very close to what I'm trying to do. Thank you very much!

jbeck28 gravatar image jbeck28  ( 2017-07-07 11:05:20 -0500 )edit

I'm a little confused by your statement about Godel not using Moveit. I was able to make Descartes use Trac IK by modifying the kinematics.yaml file, so I'm a little surprised to hear that Godel doesn't work the same way. Any insight would be much appreciated.

jbeck28 gravatar image jbeck28  ( 2017-07-07 11:06:02 -0500 )edit

To update this, I generated an IKFast plugin for my robot, with my tool on the end of the arm, and verified the Collada URDF had been properly generated... still have the same issue of the tool flipping. If I reduce the range of motion on joint 4 in the URDF I can get the joint not to flip.

jbeck28 gravatar image jbeck28  ( 2017-08-01 13:52:19 -0500 )edit

But that is a bandaid I'm not happy with. If anyone has any other input I would love to hear it. @gvdhoorn perhaps you have some other ideas? Thank you for your help so far!

jbeck28 gravatar image jbeck28  ( 2017-08-01 13:55:30 -0500 )edit

@jbeck28 Did you find a solution? I'm seeing a similar problem with my robot using IKFast. The adapter in the example config increases J6 range of motion, not sure how this would solve the problem.

machinekoder gravatar image machinekoder  ( 2020-10-23 06:35:52 -0500 )edit