Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

Orbit target passes through heightmaps #2049

Closed
osrf-migration opened this issue Sep 18, 2016 · 9 comments
Closed

Orbit target passes through heightmaps #2049

osrf-migration opened this issue Sep 18, 2016 · 9 comments
Labels
bug Something isn't working major rendering

Comments

@osrf-migration
Copy link

Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Depending on the height of the heightmap, it may end up orbiting about a point far behind the surface of the heigthmap.

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


It also passes through some meshes, it looks like it depends on the distance between the user camera and the target. Clipping related?

It happens to the work-cell model for the ARIAC competition.

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


The problem with terrains seems to be coming from the logic here:

https://github.com/osrf/gazebo/blob/216b3d4d0c6076ab65c7f608a8b1748c7f6e5c7f/gazebo/rendering/Scene.cc#L1182

Terrains are only checked if there are no other models intersected by the ray. So if there is something behind a mountain, or a ground plane under the terrain, that gets hit instead.

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


For other meshes, I managed to narrow it down to a problem when checking for intersection against a triangle here:

https://github.com/osrf/gazebo/blob/216b3d4d0c6076ab65c7f608a8b1748c7f6e5c7f/gazebo/rendering/Scene.cc#L1144

Take the monkey wrench for example:

wrench1.gif

Some triangles pass the Ogre::Math::intersects check, while other triangles don't. I think there might be an error on the logic in Scene::MeshInformation when assigning vertices and indices.

I'm going to increase this to major, because it becomes quite difficult to navigate around complex meshes.

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


  • changed priority from "minor" to "major"

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


We could replace the some of the logic in Scene::FirstContact with RayQuery::SelectMeshTriangle and see if that helps. There's quite a bit of duplicate code there.

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


+1 to that

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


see pull request #2688

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


It looks like pull request #2688 fixed both the heightmap case and the monkey wrench case. I'll close this but please do reopen / ticket a new issue if you see the orbit target passing through some mesh.

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


  • changed state from "new" to "resolved"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working major rendering
Projects
None yet
Development

No branches or pull requests

1 participant