Skip to content

Conversation

@andrewkaufman
Copy link
Member

Description

There are a few option & flag changes that impact the schema & thus the converter

Checklist

@andrewkaufman andrewkaufman self-assigned this Oct 15, 2025
Comment on lines -38 to +56
set_schema_attribute(scene_prim, "mjc:flag:actuation", not is_disabled(1 << 10, data))
set_schema_attribute(scene_prim, "mjc:flag:autoreset", not is_disabled(1 << 15, data))
set_schema_attribute(scene_prim, "mjc:flag:clampctrl", not is_disabled(1 << 7, data))
set_schema_attribute(scene_prim, "mjc:flag:actuation", not is_disabled(1 << 11, data))
set_schema_attribute(scene_prim, "mjc:flag:autoreset", not is_disabled(1 << 16, data))
set_schema_attribute(scene_prim, "mjc:flag:clampctrl", not is_disabled(1 << 8, data))
set_schema_attribute(scene_prim, "mjc:flag:constraint", not is_disabled(1 << 0, data))
set_schema_attribute(scene_prim, "mjc:flag:contact", not is_disabled(1 << 4, data))
set_schema_attribute(scene_prim, "mjc:flag:damper", not is_disabled(1 << 6, data))
set_schema_attribute(scene_prim, "mjc:flag:equality", not is_disabled(1 << 1, data))
set_schema_attribute(scene_prim, "mjc:flag:eulerdamp", not is_disabled(1 << 14, data))
set_schema_attribute(scene_prim, "mjc:flag:filterparent", not is_disabled(1 << 9, data))
set_schema_attribute(scene_prim, "mjc:flag:eulerdamp", not is_disabled(1 << 15, data))
set_schema_attribute(scene_prim, "mjc:flag:filterparent", not is_disabled(1 << 10, data))
set_schema_attribute(scene_prim, "mjc:flag:frictionloss", not is_disabled(1 << 2, data))
set_schema_attribute(scene_prim, "mjc:flag:gravity", not is_disabled(1 << 6, data))
set_schema_attribute(scene_prim, "mjc:flag:gravity", not is_disabled(1 << 7, data))
set_schema_attribute(scene_prim, "mjc:flag:island", not is_disabled(1 << 18, data))
set_schema_attribute(scene_prim, "mjc:flag:limit", not is_disabled(1 << 3, data))
set_schema_attribute(scene_prim, "mjc:flag:midphase", not is_disabled(1 << 13, data))
set_schema_attribute(scene_prim, "mjc:flag:nativeccd", not is_disabled(1 << 16, data))
set_schema_attribute(scene_prim, "mjc:flag:passive", not is_disabled(1 << 5, data))
set_schema_attribute(scene_prim, "mjc:flag:refsafe", not is_disabled(1 << 11, data))
set_schema_attribute(scene_prim, "mjc:flag:sensor", not is_disabled(1 << 12, data))
set_schema_attribute(scene_prim, "mjc:flag:warmstart", not is_disabled(1 << 8, data))
set_schema_attribute(scene_prim, "mjc:flag:midphase", not is_disabled(1 << 14, data))
set_schema_attribute(scene_prim, "mjc:flag:nativeccd", not is_disabled(1 << 17, data))
set_schema_attribute(scene_prim, "mjc:flag:refsafe", not is_disabled(1 << 12, data))
set_schema_attribute(scene_prim, "mjc:flag:sensor", not is_disabled(1 << 13, data))
set_schema_attribute(scene_prim, "mjc:flag:spring", not is_disabled(1 << 5, data))
set_schema_attribute(scene_prim, "mjc:flag:warmstart", not is_disabled(1 << 9, data))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of this is verified by hand, all by vibe

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few option & flag changes that impact the schema & thus the converter
set_schema_attribute(scene_prim, "mjc:flag:energy", is_enabled(1 << 1, data))
set_schema_attribute(scene_prim, "mjc:flag:fwdinv", is_enabled(1 << 2, data))
set_schema_attribute(scene_prim, "mjc:flag:invdiscrete", is_enabled(1 << 3, data))
set_schema_attribute(scene_prim, "mjc:flag:island", is_enabled(1 << 5, data))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@havess I am fairly confused about how to interpret the island flag now.

From 3.3.6 changelog

The promotion of islanding to default involved removing the enable flag mjENBL_ISLAND and converting it to a disable flag mjDSBL_ISLAND.

So I think

  • It is a disable bit now
  • In MJCF it seems to remain enabled by default
  • In the usd schema it defaults mjc:flag:island = 0
    • Does that mean disabled? Or does it mean "bit unset" and therefor enabled?

I'm probably overthinking this, but I'm flailing about trying to get the tests passing...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a mistake in the schema, we will need to wait for a fix before moving beyond 3.3.6

I have put up #23 in the mean time to get our CI passing again.

@andrewkaufman
Copy link
Member Author

Replaced by #38

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

Successfully merging this pull request may close these issues.

1 participant