Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RobotLink: check if loading mesh failed before creating entity V2 #1597

Conversation

simonschmeisser
Copy link
Contributor

alternative to #1596 which also fixes #1589

I had to split the RobotLink constructor in order to be able to connect to the signal before the mesh loading happens

now unfortunately MoveIt's RobotStateDisplay does not extend upon RobotModelDisplay so that will need to be extended in a follow up

@simonschmeisser simonschmeisser changed the title Robot link check valid mesh2 RobotLink: check if loading mesh failed before creating entity V2 Mar 18, 2021
@simonschmeisser simonschmeisser force-pushed the robot-link-check-valid-mesh2 branch from e1f18d0 to 3e446c4 Compare March 18, 2021 19:38
@simonschmeisser simonschmeisser force-pushed the robot-link-check-valid-mesh2 branch from 3e446c4 to 0aa2998 Compare March 18, 2021 20:14
@rhaschke
Copy link
Contributor

I thought a little more about other alternatives to implement this.
My first idea was to use exceptions, but they would leave the loop in RobotLink (and Robot) creating all geometries (and links).
Also, the current approach only shows the last error message.
What about storing all failures in a string in RobotLink and provide a method to collect (i.e. concatenate) all these failures with a new function in rviz::Robot? This way, a display could show all of them once after instantiation of the robot.
Sorry for coming up with this idea so late.

@simonschmeisser
Copy link
Contributor Author

This actually shows the last error per link, so yes, if your visual and collision meshes are both not found your link will have only one error but if you have multiple links with broken meshes then they will all be displayed as in error. And you can only fix one error at a time, right? (Our second use case besides not crashing is a urdf editor with preview and it would be great to have more feedback there. Currently it just does not display the mesh if you have a typo.)

Your approach with a list of problem strings that might be empty also sounds like a good idea however, I'll think about it

@simonschmeisser
Copy link
Contributor Author

Actually the errors got overridden by successful tf updates so they now have separate sections

grafik

@simonschmeisser
Copy link
Contributor Author

Wouldn't adding such a string break ABI compatibility? What do you think about the current state of this PR?

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.

Unhandled exception when marker contains mesh from unknown package
2 participants