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

Why would meshes have the same number of vertex and triangles? #26

Open
Raziel90 opened this issue Mar 25, 2021 · 4 comments
Open

Why would meshes have the same number of vertex and triangles? #26

Raziel90 opened this issue Mar 25, 2021 · 4 comments

Comments

@Raziel90
Copy link

In the collision_utils.py
There is this condition:

       if not len(self.params['verts']) == len(self.params['tris']):
       raise TypeError(bc.FAIL + 'ERROR: number of tris must equal the number of verts in collision mesh.' + bc.ENDC)

As far as I know, unless you reuse some vertices you are going to get 3 times the amount of triangles. I doubt that all of them are going to be reused.

In case I am wrong, how can I convert a mesh to have the same numbers of vertices and triangles?

@djrakita
Copy link
Collaborator

Yes, good catch! You should be able to remove this equality check, and I'm guessing the underlying fcl model should be able to successfully initialize. If not, just let me know. Thanks!

@Raziel90
Copy link
Author

Hi djrakita,
I tried as you suggested, I get a WARNING
WARNING: Mesh collision object not supported in rviz visualization

To verify It was just a matter of visualization I played with the urdf_viewer_with_collision_info.py.
However, I don't see the collision detected on the mesh.
Will it still be detected by the sample generator?
Cheers!

@djrakita
Copy link
Collaborator

Yeah, at the time this code was written a few years ago, rviz didn't have a way to easily render arbitrary meshes (it looks like there are better ways of doing this now). I would recommend either extending the relaxedIK to rviz pipeline to include mesh rendering options (specified here http://wiki.ros.org/rviz/DisplayTypes/Marker#Mesh_Resource_.28MESH_RESOURCE.3D10.29_.5B1.1.2B-.5D) or just calculate and display a bounding volume of your mesh just to verify that your object is transformed to where you want it to be.

@LuciAnge
Copy link

Hi guys,
I update the mesh visualization for collision objects in rviz. Now, I'm able to visualize the mesh of the collision object but the urdf_viewer_with_collision_info.py doesn't show collisions between the robot and the object. How can I solve this problem?
Thank you!

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

No branches or pull requests

3 participants