Skip to content

Conversation

RussTedrake
Copy link
Contributor

@RussTedrake RussTedrake commented Jan 12, 2025

The franka_kitchen model has rgba values outside of the normal range https://github.com/Farama-Foundation/Gymnasium-Robotics/blob/2d1c1f95ecd9179849248a5bced308d43775e732/gymnasium_robotics/envs/assets/kitchen_franka/kitchen_assets/item_assets/oven_asset.xml#L23 . MuJoCo lets them throught, but Drake throws a Runtime error in Rgba.

This PR truncates the range so that the parser is more forgiving.

+@SeanCurtis-TRI for feature review please.
Related to https://github.shared-services.aws.tri.global/robotics/anzu/issues/13763 .


This change is Reviewable

The franka_kitchen model has rgba values outside of the normal range
https://github.com/Farama-Foundation/Gymnasium-Robotics/blob/2d1c1f95ecd9179849248a5bced308d43775e732/gymnasium_robotics/envs/assets/kitchen_franka/kitchen_assets/item_assets/oven_asset.xml#L23 .
MuJoCo lets them throught, but Drake throws a Runtime error in
Rgba.

This PR truncates the range so that the parser is more forgiving.
@RussTedrake RussTedrake added priority: medium release notes: none This pull request should not be mentioned in the release notes labels Jan 12, 2025
@jwnimmer-tri
Copy link
Collaborator

All components should be in the range [0 1].

-- https://mujoco.readthedocs.io/en/stable/XMLreference.html#asset-material

The model file is broken.

Why not PR a fix to the model file so that it doesn't use values outside of what the spec says?

The fact that the MuJoCo parser accepts this a bug in their parser, not in ours.

@RussTedrake
Copy link
Contributor Author

@RussTedrake RussTedrake deleted the mujoco_rgba branch January 18, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium release notes: none This pull request should not be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants