robohive icon indicating copy to clipboard operation
robohive copied to clipboard

Task Space Mapping for Franka Kitchen environments

Open sriramsk1999 opened this issue 1 year ago • 2 comments

Hello,

I am trying to set up a task-space training pipeline for the Franka Kitchen environments.

My understanding is that the input to RoboHive environments is in joint-space. In the teleop script the input to the rpFrankaRobotiqData-v0 environment is simply the normalized qpos.

This does not work for the Franka Kitchen tasks. I have a trained torchRL agent which predicts the actions, qpos and qvel. I found that the env.robot._act_mode is "vel" for the Franka Kitchen environments, so I expected that the action is the normalized qvel i.e. action = env.robot.normalize_actions(qvel).

This does not work and the robot does not move as expected. What am I doing wrong?

.

PS - This seems like a bug in the normalize_actions function. Shouldn't it be:

                        act_rng = (actuator['vel_range'][1]-actuator['vel_range'][0])/2.0

instead of

                        act_rng = (actuator['vel_range'][1]-actuator['pos_range'][0])/2.0

sriramsk1999 avatar Apr 07 '24 17:04 sriramsk1999

Using the qvel directly without normalizing gives close to expected results. Even then, it doesn't exactly follow the same trajectory as the predicted actions, but it comes quite close.

Related: #142

sriramsk1999 avatar Apr 09 '24 16:04 sriramsk1999

I haven't tested in cases you are using it now. This might be a good chance for me to test those. I'm traveling this week. I'll be able to take a look next week.

vikashplus avatar Apr 11 '24 17:04 vikashplus