HorizonRobotics / SocialRobot

Apache License 2.0
71 stars 20 forks source link

Embodied Teacher #99

Closed Jialn closed 4 years ago

Jialn commented 4 years ago

This PR is aimed to implement embodied teacher that support demonstrations by teacher's movements. The demonstrations could be generated by an existing teacher policy or by human control interface.

Teacher policy can be obtained by training on the same environment by enabling the flag "is_training_for_teacher_policy".

Demonstrations from human is through keyboard now, might be suit for algorithms like imitation learning or few-shot learning. I also have some thoughts recently of how to make the agent learn new tasks or human intentions without reward from a few demonstrations. I've added some tricks to make the keyboard controlling a little bit more friendly, kinds of like playing a game. It's simple to do local-motion (move around by key "WASD") and open or close gripper (by key "E"), but unnatural to control the robot arm (by "IJKL" now).

Maybe we can use other devices for the robot arm, like mouse for the xy axis and keybo for z, or a camera/kinect to track human arm and set the movements to the robot arm. I'm not quite sure now, welcome to share your opinion for this.

Jialn commented 4 years ago

an simple example of stacking cube by keyboard stack3