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

OSC_POSE controller coordinate systems #158

Closed
samarth-robo opened this issue Jan 7, 2021 · 1 comment
Closed

OSC_POSE controller coordinate systems #158

samarth-robo opened this issue Jan 7, 2021 · 1 comment

Comments

@samarth-robo
Copy link

samarth-robo commented Jan 7, 2021

Hi, thanks for open-sourcing this library!

I am trying to figure out the coordinate systems used by the OSC_POSE controller. I have control_delta = True. So ideally it is the EEF coordinate system -- Z out of the gripper, Y perpendicular to the gripper motion. But I am not observing that.

I test by applying small translations and rotations continuously and observing the robot motion.

Translation

Setting action = [0.01, 0, 0, 0, 0, 0, -1], [0, 0.01, 0, 0, 0, 0, -1], or [0, 0, 0.01, 0, 0, 0, -1], I observed the following motions:
trans_axes

Rotation

Around X axis, action = [0, 0, 0, np.deg2rad(1), 0, 0, -1]
rot_x

Around Y axis, action = [0, 0, 0, 0, np.deg2rad(1), 0, -1]
rot_y

Around Z axis, action = [0, 0, 0, 0, 0, np.deg2rad(1), -1]
rot_z

  • It seems like the translation axes are different from the rotation axes
  • Neither of them seem to be following the expected EEF coordinate system mentioned in assets/robots/panda/robot.xml. The translation axes seem to be the world axes, and rotation axes are also unexpected.

Relevant code snippets:

controller_configs = load_controller_config(default_controller='OSC_POSE')
# self is derived from SingleArmEnv
while True:
  action = np.array([0.01, 0, 0, 0, 0, 0, -1])  # or other values mentioned above
  obs, _, done, _ = self.step(action)
  self.render()
@samarth-robo
Copy link
Author

It was a fault in my understanding of operational space control. The relative actions are still applied in the world coordinate frame, not the EEF coordinate frame.

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

No branches or pull requests

1 participant