Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed default control for orientation in OSC #232

Merged
merged 1 commit into from
Jun 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions robosuite/controllers/osc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down