HorizonRobotics / SocialRobot

Apache License 2.0
71 stars 20 forks source link

Some minor changes #61

Closed Jialn closed 5 years ago

Jialn commented 5 years ago

Some minor changes like using action_space.sample() instead of np.random(action.shape), use np.clip instead of min(max()), etc.

Jialn commented 5 years ago

Also added rendering mode "rgb_array". Since gzclient might not be always opening, and we can not directly access user camera of gzclient in gzserver, this mode is done by inserting a camera to the world.

The default view pose is like below. User can set view point by setting pose of "self._rendering_camera" in "env.step()" . image

emailweixu commented 5 years ago

Does alf.trainer.on_policy_trainer.play() generate right video from this?

emailweixu commented 5 years ago

It seems that you need to add metadata like this so the video can be captured: https://github.com/bulletphysics/bullet3/blob/0aaae872451a69d0c93b0c8ed818667de4ad5653/examples/pybullet/gym/pybullet_envs/env_bases.py#L16

Jialn commented 5 years ago

It seems that you need to add metadata like this so the video can be captured: https://github.com/bulletphysics/bullet3/blob/0aaae872451a69d0c93b0c8ed818667de4ad5653/examples/pybullet/gym/pybullet_envs/env_bases.py#L16

OK, I'll add it.

Jialn commented 5 years ago

Because the rendered image has no grid, and the yellow texture in texture_ground_plane draws too much attention, I changed the yellow texture to grey texture with 1m x 1m grid:

image

Jialn commented 5 years ago

the default view point, this also suits for icubwalk: Screenshot from 2019-07-24 16-00-27 PR2 has been set to a closer camera pos image simple navi: image

emailweixu commented 5 years ago

Do the model trained with the previous ground plane texture work with the new ground texture?

emailweixu commented 5 years ago

And since the ground texture is changed. Perhaps we should update the videos in README.md