From 02c6014e237b9556125394bd223bed185581d388 Mon Sep 17 00:00:00 2001 From: mohanksriram Date: Thu, 27 May 2021 10:51:34 +0530 Subject: [PATCH] Fixed default control for orientation in OSC --- robosuite/controllers/osc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/robosuite/controllers/osc.py b/robosuite/controllers/osc.py index 4542de293e..1ed068828e 100644 --- a/robosuite/controllers/osc.py +++ b/robosuite/controllers/osc.py @@ -234,7 +234,7 @@ def set_goal(self, action, set_pos=None, set_ori=None): scaled_delta = self.scale_action(delta) if not self.use_ori and set_ori is None: # Set default control for ori since user isn't actively controlling ori - set_ori = np.array([[0, -1., 0.], [-1., 0., 0.], [0., 0., 1.]]) + set_ori = np.array([[0., 1., 0.], [1., 0., 0.], [0., 0., -1.]]) else: scaled_delta = [] # Else, interpret actions as absolute values @@ -244,7 +244,7 @@ def set_goal(self, action, set_pos=None, set_ori=None): # Set default control for ori if we're only using position control if set_ori is None: set_ori = T.quat2mat(T.axisangle2quat(delta[3:6])) if self.use_ori else \ - np.array([[0, -1., 0.], [-1., 0., 0.], [0., 0., 1.]]) + np.array([[0., 1., 0.], [1., 0., 0.], [0., 0., -1.]]) # No scaling of values since these are absolute values scaled_delta = delta