Skip to content

Robocasa dev#792

Merged
snasiriany merged 17 commits intomasterfrom
robocasa-dev
Feb 12, 2026
Merged

Robocasa dev#792
snasiriany merged 17 commits intomasterfrom
robocasa-dev

Conversation

@Abhiram824
Copy link
Member

@Abhiram824 Abhiram824 commented Jan 15, 2026

What this does

Changes to make robosuite compatible with latest updates to robocasa features

@Abhiram824 Abhiram824 changed the title Robocasa dev (WIP) Robocasa dev Jan 17, 2026
# then, switched to self.env.sim.model.get_xml() which does not create this issue
# however, that leads to subtle changes in the physics, such as fixture doors being harder to close
# so, reverting back to self.env.model.get_xml()
self._current_task_instance_xml = self.env.model.get_xml()
Copy link
Contributor

Choose a reason for hiding this comment

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

this may be a potentially big change and affect existing users. @Abhiram824 can you make it a flag and use self.env.sim.model.get_xml() by default? we should toggle the flag to use self.env.model.get_xml() only for robocasa for now. others can follow suit it they'd like

self.env.hard_reset = True
self.reset()
self.env.hard_reset = reset_mode
if self.env.hard_reset is not True:
Copy link
Contributor

Choose a reason for hiding this comment

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

can you quickly investigate why we have this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Im not 100% sure (I think you might've made this change), but it looks like logic is that we dont need the extra reset in the VisualizationWrapper because we already call reset right before we start collecting demonstrations.

I personally think we should undo this change though

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed that if we can remove it, that would be best. Could you test that undoing this will still work for us?

Copy link
Member Author

Choose a reason for hiding this comment

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

it still works, I reverted the code

Comment on lines 209 to 215
forward_jnt = None
forward_jnt_axis = None
for jnt in self.joint_names:
if "joint_mobile_forward" in jnt:
forward_jnt = jnt
forward_jnt_axis = self.sim.model.jnt_axis[self.sim.model.joint_name2id(jnt)]
break
Copy link
Contributor

Choose a reason for hiding this comment

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

@Abhiram824 can you give some context for what's happening in this code block?

Good to also write some comments in the code to give other users context.

Did forward_jnt_axis change at some point?

Copy link
Member Author

@Abhiram824 Abhiram824 Jan 28, 2026

Choose a reason for hiding this comment

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

This is the main change between our branch and master branch. Basically previously in the Omron xml, the forward joint moved along the y axis (left to right). But with Kevins change to master it now moves along the x-axis (forward-backward).

Previously, when the forward joint moved along the y-axis, the code reordered the action, but with the latest changes there is no need to reorder the action.

All this code does is dynamically check which axis the forward joint is moving along, so that we know whether or not to reorder the action.

This is needed for playback because our datasets use the xmls with the old forward axis convention. I cannot simply change the xmls in our datasets because the state arrays (which contain joint qpos) will be corrupted.

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like a bit of a hack, because it's explicitly looking for a joined named joint_mobile_forward. Since this is pretty specific code, I would create a separate function for this, just for the purposes of "post-processing" the action to be action = np.copy([action[i] for i in [1, 0, 2]]) instead. This will be cleaner!

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree that its very ugly, but for the time being i dont think there is much we can do about it. I will move it to a different function though

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

Copy link
Contributor

@snasiriany snasiriany left a comment

Choose a reason for hiding this comment

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

leaving clarification questions and comments

@snasiriany
Copy link
Contributor

Code looks good, left some minor comments. Let's also get a review from @kevin-thankyou-lin

@Abhiram824
Copy link
Member Author

Code looks good, left some minor comments. Let's also get a review from @kevin-thankyou-lin

Ill address your comments within 1-2 hours and ping him to review as well!

Copy link
Contributor

@kevin-thankyou-lin kevin-thankyou-lin left a comment

Choose a reason for hiding this comment

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

LGTM

@snasiriany snasiriany merged commit 6c10ef2 into master Feb 12, 2026
2 checks passed
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.

3 participants