Use collision-tag meshes/info for collision geoms (primitives, STL/DAE/OBJ) - #264
Use collision-tag meshes/info for collision geoms (primitives, STL/DAE/OBJ)#264saikishor wants to merge 5 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #264 +/- ##
==========================================
+ Coverage 81.20% 81.39% +0.19%
==========================================
Files 30 30
Lines 5123 5203 +80
Branches 558 559 +1
==========================================
+ Hits 4160 4235 +75
- Misses 670 674 +4
- Partials 293 294 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@saikishor to do some initial testing, I was trying to see if I could get this to run in our primary workspace, but I get some pretty quick errors when I try to run any urdf -> mjcf conversion there. I wonder if we need some more tests to handle cases with different types of meshes based on what we find out here. I am trying to look into what the issue is, but if you are curious as well, I am just opening up our workspace on jazzy-devel, checking out this PR for mujoco_ros2_control and running the following. ros2 launch clr_mujoco_config generate_clr_mjcf.launch.pyIn the decomposition section, getting this error Whereas on main, it doesn't try to decompose an |
|
@ndunkelb-nasa can you test it with the last PR #269? Yo see if it happens?. If not, I can take a look and add those cases or verify why it is not working |
|
@ndunkelb-nasa I tried to test it, but I don't have access to |
|
Yeah, that runs all the way through, but still has a bunch of issues after running. In this video, you can see the result of running the generation from main on the left, and the result from running the generation on #269 on the right, then running the output in base mujoco simulate (these both start paused, then I unpause each). Obviously I know that with these changes, I will need to change how the contact disabling and stuff works, but there are a bunch of other problems that you can see in the videos, like new_generation.webmAlso something seems to have been super crazy with the scaling of this as you can see lol (also starts paused then I unpause). collision_scaling.webmThere seems to be quite a few things going on here, which is why I was hoping to test things in smaller chunks and verify functionality, rather than trying to fix 4-5 intertwined things from the final PR.
Hmm, you should definitely be able to run, the package is here, and gets pulled into the ws with submodules from the instructions on the front page of clr_ws, but don't want to necessarily force you to set all that up...Maybe the solution is to make a minimal example that breaks for this new implementation? Unfortunately there seem to be a bunch of issues. |
|
@ndunkelb-nasa sure, thanks for the info. I'll take a look and get back to you |
|
FYI the collision issue with the massive mesh seems to be on our side: NASA-JSC-Robotics/surface_robotics_mockups_description#21 Also @saikishor I'm starting to look at this set of PRs, so I might be putting up some PRs to your branches for your review. (EDIT: and I may have accidentally pushed to your branch first, but I force-pushed it back) |
907ed23 to
3987c58
Compare
No worries. Thanks a lot for taking a look at this. |
scastro-nasa
left a comment
There was a problem hiding this comment.
I've merged my change into here and this branch works standalone now with our setup.
NOTE, however, that the default option remains to use the visual meshes, and I added a --use_collision_tags argument that makes it behave like the original version of this PR. I think this will be preferable as it doesn't break user workflows by default, but rather gives them the option.
Will now move up the stack and review the remaining PRs.
f5a7a8f to
5e8920c
Compare
Description
First of a series of PRs splitting up #209 into smaller, reviewable pieces (see that PR for the original context, motivation, and before/after screenshots). Fixes some of the concerns listed in #120.
This PR makes the URDF→MJCF converter treat
<visual>and<collision>tags independently instead of always deriving collision geometry from whatever mesh was used for rendering:<visual>and<collision>tags (previously only one source was used), and converted to.objas needed.<collision>tag, its mesh/geometry is what drives physics — no longer just a byproduct of the visual mesh.<collision>tag, a collision is synthesized from its<visual>(matching the previous behaviour), so nothing regresses for URDFs that don't define collision geometry.Is this a user-facing behavior change?
Yes — links that define separate collision geometry in their URDF will now get that geometry in the generated MJCF instead of their visual mesh.