-
Notifications
You must be signed in to change notification settings - Fork 92
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
Negative cylinder mesh shapes eat up all (at least, most) of memory #64
Comments
It seems odd to me that the length of the cylinder affects the number of vertices. That doesn't seem necessary. Easiest fix without changing that would be to simply take the I wonder if we can just remove it though, and connect the top and bottom circles directly. |
If you think we should go with the change to std::abs, I can open a pull request for that. I'm not that familiar with this code, so I wouldn't be comfortable doing a more in-depth change to connect the top and bottom circles. |
Understandable. A PR with I suspect the extra circles may be a left-over artefact of common code (apparently adapted from FCL) for rendering cylinders and cones. But |
Computing h_num from a negative cylinder height resulted in a huge number of vertices to be generated, eventually exhausting memory (moveit#64).
#81 has been merged and released into kinetic and melodic, this issue should be fixed. Feel free to reopen if it's not. |
I'm currently looking at ros/robot_model#175 , and ran into what may be a bug. According to the URDF spec, a link with a cylinder can have a negative length and still be well-formed. For most software, this means the cylinder grows in the negative direction from the origin. However, when urdf_to_collada runs across it, it ends up down in geometric_shapes:createMeshFromShape(cylinder), where we have this code:
Essentially, we divide a negative length by a positive number, assign to an unsigned (now a huge positive number), and then push_back millions of items into the vector, exhausting memory. One way to fix this might be to take fabs(h) when calculating h_num, but I'm not sure if that is correct. Any advice here on how we might fix this?
The text was updated successfully, but these errors were encountered: