Skip to content

Commit

Permalink
Adjust rotation operation to work on linux build's scipy as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Balint-H committed Aug 29, 2024
1 parent 96fae9c commit 24418ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions myosuite/envs/myo/myochallenge/bimanual_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ def __center_box_mesh(self):
self.obj_size0 = self.sim.model.geom_size[self.obj_gid].copy()
self.obj_vert_addr = np.arange(self.sim.model.mesh(self.obj_mid).vertadr,
self.sim.model.mesh(self.obj_mid).vertadr + self.sim.model.mesh(0).vertnum)

r = R.from_quat(self.sim.model.geom(self.obj_gid - 1).quat, scalar_first=True)
q = self.sim.model.geom(self.obj_gid - 1).quat
r = R.from_quat([q[1], q[2], q[3], q[0]])
self.sim.model.mesh_vert[self.obj_vert_addr] = r.apply(self.sim.model.mesh_vert[self.obj_vert_addr])
self.sim.model.mesh_normal[self.obj_vert_addr] = r.apply(self.sim.model.mesh_normal[self.obj_vert_addr])
self.sim.model.geom(self.obj_gid - 1).quat = [1, 0, 0, 0]
Expand Down

0 comments on commit 24418ff

Please sign in to comment.