Conversation
0d4b637 to
73230a6
Compare
simonschmeisser
left a comment
There was a problem hiding this comment.
some small first remarks while looking at the code as reference for another PR
| std::string visual_geometry_mesh_url_; | ||
|
|
||
| /** \brief The pose of the visual geometry (mesh). */ | ||
| Eigen::Isometry3d visual_geometry_pose_; |
There was a problem hiding this comment.
| Eigen::Isometry3d visual_geometry_pose_; | |
| Eigen::Isometry3d visual_geometry_pose_ = Eigen::Isometry3d::Identity(); |
then you can skip that later
There was a problem hiding this comment.
If this creates issues with Eigen::Isometry3d being forward declared (but I don't think it is ...) you could also set the value in the constructor and move the constructor to the cpp file (where it actually belongs ...)
| obj->visual_geometry_mesh_url_ = ""; | ||
| obj->visual_geometry_pose_ = Eigen::Isometry3d::Identity(); |
There was a problem hiding this comment.
| obj->visual_geometry_mesh_url_ = ""; | |
| obj->visual_geometry_pose_ = Eigen::Isometry3d::Identity(); |
we did that in the header already, see above
| obj->visual_geometry_mesh_url_ = ""; | ||
| obj->visual_geometry_pose_ = Eigen::Isometry3d::Identity(); |
There was a problem hiding this comment.
| obj->visual_geometry_mesh_url_ = ""; | |
| obj->visual_geometry_pose_ = Eigen::Isometry3d::Identity(); |
same here, strings are always empty when created
73230a6 to
35e7d3b
Compare
|
Requires felixvd/moveit_msgs#1 (or moveit/moveit_msgs#129 ) as well Open Todos:
Seriously though, textured objects now work. The tinting sometimes looks really horrible sometimes just a bit horrible, not sure how to fix that |
branch to pass CI
38dd937 to
d973d8b
Compare
Codecov Report
@@ Coverage Diff @@
## master #2854 +/- ##
==========================================
+ Coverage 61.56% 61.60% +0.04%
==========================================
Files 370 370
Lines 33147 33220 +73
==========================================
+ Hits 20405 20461 +56
- Misses 12742 12759 +17
Continue to review full report at Codecov.
|
Speak for yourself!!! I think they look great. Thanks a lot for pursuing this PR. |
e1b0ec1 to
fdc3b1c
Compare
|
Has this feature been discarded or is still pending? |

Description
Remember this lightning talk?
I finally got around to implementing this. CollisionObjects can now have a visual geometry, and the pick-place demo now picks up a beer bottle from a table:
2021-08-28.visual.geom.32.mp4
The collision geometry is as simple as before. See the new GUI fields on the left:
There are some limitations about this PR:
All meshes need to have the same scale, because they are scaled by the parameter in the Rviz display. This is because I initially thought that adding
visual_geometry_mesh_scaling_factorto eachAttachedBodywould make the constructor too long, since it is already a little ridiculous. But in retrospect, I should have done it. Or added aVisualGeometryobject that bothworld.cppandAttachedBodyobjects use. But I'm low on time, so it is how it is for now.There are no tests, even though it's easy to lose the geometry during copying (thanks for finding the last bug @simonschmeisser ). I also won't have the time to write any ;(
I would merge this because the functionality is useful, but I would prefer the scale to be defined per object. I don't know when I can make this change though, so if anyone feels so inclined, please be my guest. It should be straightforward to follow the changes in this PR and add a per-object scaling factor.
Some other notes:
I split PlanningSceneRender into a visual and collision node, like the rviz Robot. I originally tried to avoid adding another scene node, but changed my mind after trying it. This is definitely the better way.
I am increasingly convinced that the separation into robot and scene is (and creates) cruft and should go. The conversion from
worldobjects toAttachedBodyobjects is probably where it is the most obvious. Unifying them would go a long way to de-cluttering the PlanningScene code base. I would refer to Tesseract's messages (and maybe environment) to improve on this. No need to reinvent the wheel. This has come up before (e.g. Representation of Attached vs Non-Attached objects in planning_scene #1980 ) and relates to the scene graph discussions.The tutorial demo sadly doesn't use this prettier table. Maybe @simonschmeisser will add color for the visual mesh and tackle this some day :)
@simonschmeisser I boldly added your name to a TODO in the code that you seemed most knowledgeable about.
Fixes #2284. Depends on a PR in moveit_msgs and is required for the PR to moveit_tutorials.
Checklist