Major bug fix by @charlesxu0124 in #38:
- Previously, inside the
relative_env.py
wrapper, theintervene_action
executed by the robot (based on the spacemouse intervention action), was transformed in the wrong direction. It should have been transformed from the base frame to the end-effector frame, since the policy should learn actions in the end-effector frame and the spacemouse provide intervention actions in the robot base frame, but the transformation incorrectly applied was from the end-effector frame to the base frame. This caused experiments where the end-effector was not aligned with the robot base axis to not work.
The changes were made in the following files:
-serl_robot_infra/franka_env/envs/relative_env.py
-serl_robot_infra/franka_env/envs/wrappers.py
The updated code only populates the dictionary info
with the "intervene_action"
key-value pair if an intervention was provided. Otherwise this key does not exist. Other places in the code has been updated to check if "intervene_action"
is in info
before accessing it.