-
Notifications
You must be signed in to change notification settings - Fork 90
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
Hydro devel #25
Hydro devel #25
Conversation
I merged the patch into Indigo (https://github.com/team-vigir/geometric_shapes/tree/indigo-devel) and tested. Unfortunately, I still get the infinite recursion as described in moveit/moveit_ros#567. I'm not sure if things improved (i.e. if it crashes only 5% as opposed to 10% of the time or so :) ). I double checked the code from the PR is indeed used and it still crashes. I can't easily make my test available, but it mainly involves adding a mesh collision object and repeatedly moving it around. |
This causes a process to run out of file handles, where the next fopen call returns nullptr, which is passed into qhull, which segfaults. Fixes moveit/moveit_ros#481 and fixes moveit/moveit_ros#526.
@dornhege I chatted with Ioan today, and will try to get this (and indigo devel) merged and released over the upcoming weekend. |
Sounds good! |
I'm testing this now on Indigo |
It depends, which of the commits you're checking. Nothing speeds things up, technically it should make it slower as triangulation is enabled. |
I'm checking all of the commits. I'm loading each (high res) mesh into my node's planning scene then pushing it over the planning scene topic (using the planning scene monitor) to rviz where I have the PlanningScenePlugin displaying them like in the picture above. Its still not clear to me what was previously broken, I was assuming this PR would increase performance (an issue that I have). I did notice a slight speed up when I first merged just the file handle fix (in the indigo-devel commit), but the other commits in this PR are unclear to me still. Sorry if I'm being slow to understand! |
Sorry, no performance improvements :( |
I've observed incorrect/invisible collisions before in the collision_detection, but are you saying this convex mesh isn't used for that purpose? In an ideal world we'd have a checkbox in the PlanningScene plugin in Rviz that allows us to visualize the convex mesh version of the planning scene... |
I've put my debug code in here: It sends a scaled_bodies marker. Without the patch these look broken. Unfortunately, when padding is used, there is no proper and simple way to produce a correctly padded mesh. The current implementation is not correct, and the planeProjection function that I added is also not fully correct. I have only looked in scaling/padding for removing things from the octomap. That is where this is used. I'm not sure if it is used for collision tests. |
I like that you've made a visualizer for the padded meshes - I'm really into creating effective debug visualizations for MoveIt! components. I'd like to look into this myself but, since I don't have a direct application for it at the moment, can't find time to work on the new feature. But would you be interested in cleaning this up more such that there is an optional feature for publishing this mesh, that is enabled/disabled based on some parameter or flag? Then we could merge this into the main code |
I wouldn't mind cleaning this up at all. My motivation was to visualize what's going on. However, I won't have time/knowledge to do this really properly. I'm basically missing a nice entry point for the visualization. Right now I just hook into the main This should still be fine for debugging purposes, if it is parametrized, i.e., during normal operation it won't matter performance-wise. If you believe that a cleaned-up version of this will be merged, I'll do it. |
@mikeferguson you said:
any progress? I'm ok with merging this PR as I've been running it for a month with no problems. we should also get it merged into the indigo branch @dornhege I'm always happy to merge passive features (that can be turned on) that help improve visualization and debugging. I believe a cleaned-up version of your commit will be merged |
@@ -660,13 +660,35 @@ bool bodies::ConvexMesh::containsPoint(const Eigen::Vector3d &p, bool verbose) c | |||
if (bounding_box_.containsPoint(p)) | |||
{ | |||
Eigen::Vector3d ip(i_pose_ * p); | |||
ip = mesh_data_->mesh_center_ + (ip - mesh_data_->mesh_center_) * scale_; | |||
ip = mesh_data_->mesh_center_ + (ip - mesh_data_->mesh_center_) / scale_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this in sync with the scale of other objects? Not sure division is what we want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be clear: This will scale the mesh UP, i.e. a scale of 1.5 will make it appear 1.5 times larger. This is what we want, right? If I understand what's happening here correctly, it transforms the coordinates to the internally unscaled mesh, thus they need to be scaled down.
I believe the main reason this was never discovered is that the bounding_box check happens before. The bounding_box is already scaled up and thus catches many cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this issue demonstrates a bug due to scale being inverted prior to above fix: moveit/moveit_ros#537
This looks fine to me, but I would feel much better if someone tried this and confirmed it works. My main concern is with the usage of scale -- perhaps I did not understand how it works, but it should be kept in sync with how it is used for other bodies. |
@davetcoleman I have cleaned the visualize_convex_mesh branch and opened moveit/moveit_ros#574. |
Seems everyone who has tested this is happy with the changes -- as we are running out of time before hydro is EOL, I'll merge and release |
Forward port #25 into indigo-devel
ported to indigo-devel here: #34 |
Fixing a couple of things with handling convex meshes. Mainly that qhull only returns proper triangles when called with "Qt".
It might be a good idea to also incorporate this into indigo, which I can't test.