Skip to content

Avoid segfault when validating a multidof-only trajectory#691

Merged
v4hn merged 1 commit intomoveit:kinetic-develfrom
v4hn:pr-kinetic-validate-avoid-segfault-with-multidof-only
Dec 7, 2017
Merged

Avoid segfault when validating a multidof-only trajectory#691
v4hn merged 1 commit intomoveit:kinetic-develfrom
v4hn:pr-kinetic-validate-avoid-segfault-with-multidof-only

Conversation

@v4hn
Copy link
Copy Markdown
Contributor

@v4hn v4hn commented Nov 17, 2017

Also warn that MultiDOFJointTrajectory validation is not supported

Fixes #539

Should be backported to indigo.

@bmagyar
Copy link
Copy Markdown
Member

bmagyar commented Nov 20, 2017

I'd swap the order of those 2 checks as if there's no joint trajectory passed there is no way to get the warning about multidof trajectory.

It may be of personal taste but I'd also revamp this file a bit in order to remove all those continue-s. A goto is a goto even if they give it a new name :D

@v4hn v4hn force-pushed the pr-kinetic-validate-avoid-segfault-with-multidof-only branch from 6cb88e0 to 5406a62 Compare December 7, 2017 09:57
@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Dec 7, 2017

I forgot about this request...

You are right about the order of the checks. I swapped them.

It may be of personal taste but I'd also revamp this file a bit in order to remove all those continue-s.

There is only one continue in this function and I very much prefer it over a big if { ...} block around the whole loop content. I would like to keep it as is.

Please have another look.

Also warn that MultiDOFJointTrajectory validation is not supported

Fixes moveit#539
@v4hn v4hn force-pushed the pr-kinetic-validate-avoid-segfault-with-multidof-only branch from 5406a62 to ed7c293 Compare December 7, 2017 10:40
@bmagyar
Copy link
Copy Markdown
Member

bmagyar commented Dec 7, 2017

Another question: shouldn't we just error out when a multidof trajectory arrives? This allows for passing in a bunch of stuff that then gets ignored.

@v4hn
Copy link
Copy Markdown
Contributor Author

v4hn commented Dec 7, 2017

In theory we could error out and tell the user to either submit a patch for working validation or disable validation explicitly. But that would entail that everyone planning with a multi-dof joint has to disable start state validation by hand. This use-case "just worked" before we added validation, so it would break peoples workflow.

I believe the warning is enough in this case to tell the user "hey submit a patch or don't complain if something breaks".

@bmagyar
Copy link
Copy Markdown
Member

bmagyar commented Dec 7, 2017

Also, this topic is probably beyond the scope of this PR.

👍

@bmagyar bmagyar self-requested a review December 7, 2017 12:22
@v4hn v4hn merged commit abd5436 into moveit:kinetic-devel Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants