HorizonRobotics / SocialRobot

Apache License 2.0
71 stars 20 forks source link

Update keyboard demo generation and add action wrapper #116

Closed Jialn closed 4 years ago

Jialn commented 4 years ago

The keyboard control require and it is not convenient to use keys to control the arm joints. So I change that to using PyUserInput to grab mouse and keyboard input so that we don't need to focus on the terminal window, and easier arm joints controlling.

I've also add an optional action wrapper. The human demonstrations is not the same as raw joints. By this action wrapper, we can transform the action to the same space as demonstrations. And sometimes primitive joints is not wanted, e.g., has redundant dimensions or offset, like extra wheel joints, or 2 joints of finger on a gripper which can be combined to one single action dimension. In these cases, the wrapper can also be used to simplify the actions.

This PR also includes some changes to youbot model, like adding camera and better joints range and initial position.

Changes:

Camera position: image

Now we can generate demonstrations using the keyboard key "W, A, S, D", "E" and mouse by watching the 128x128 image easily. This can be used to demonstrate many versatile teacher tasks. pick_place_img_2