Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #119 issue #123

Merged
merged 4 commits into from
Jul 31, 2023
Merged

fix #119 issue #123

merged 4 commits into from
Jul 31, 2023

Conversation

Yefanov
Copy link
Contributor

@Yefanov Yefanov commented Jul 31, 2023

This is a quick solution to the #119 issue. It checks whether obs[0] is a 0-dimensional array or a float number and transforms it into a 1-dimensional array.

Jiayuan-Gu and others added 4 commits May 25, 2023 22:21
* Fix softbody installation instructions in installation.md

* Fix build_lib import issue

* Update the doc

---------

Co-authored-by: Jiayuan-Gu <jigu@eng.ucsd.edu>
The issue is caused by `gym` and `wheel`. Follow the solution in HumanCompatibleAI/imitation#707.
@StoneT2000
Copy link
Member

StoneT2000 commented Jul 31, 2023

Thank you for the fix! I'll merge part of it into our new version coming out v0.5.0. I may edit it a little to make it more performant

@StoneT2000 StoneT2000 changed the base branch from main to 0.5.0 July 31, 2023 22:11
@StoneT2000 StoneT2000 merged commit dea3e24 into haosulab:0.5.0 Jul 31, 2023
@StoneT2000 StoneT2000 mentioned this pull request Aug 4, 2023
9 tasks
StoneT2000 added a commit that referenced this pull request Aug 16, 2023
* init

* init

* update reset funcs

* render api

* Update record.py

* update vec env to gymnasium vec env implementation and updated sb3 wrapper for it

* formatting

* use single observation space per new API

* tune rgbd baseline

* fix some bugs with envs closing incorrectly

* bug with terminated signal

* Update record.py

* Fix for gymnasium migration

- workaround for `env.render`
- remove `make_box_space_readable`
- fix `VecRobotSegmentationObservationWrapper`

* python local matrix test with docker

* Update run.sh

* Update run.sh

* Modify PandaAvoidObstacles reward to clip the collision penalty

* add normalized dense reward mode

* fix original venv tests

* fix robot_seg obs wrappers

* fix docs using old reset API

* more tests and init contributing doc and pytest-xdist

* Update run.sh

* coverage tests

* wrappers tests

* fix bug with recordepisode wrapper used on robot-seg obs modes

* more tests

* control modes tests

* code formatting

* ms2 venv tests

* default reward is normalized, tuned sb3 state liftcube hyperparams

* match vec make env closer to gym make and finish sb3 rgbd test

* remove outdated gym code

* update rl tutorial

* update quickstart.md to factor in gymnasium change

* Created using Colaboratory

* update python min req to 3.8 (per gymnasium support)

* update replay_Trajectory and fix bc code

* Update bc_liftcube_state.py

* modify evaluation/evaluator.py to account for gymnasium api

* Update observation.py

* modify docs/source/concepts/observation.md to account for gymnasium api

* remove render_mode in mpm/base_env.py

* fix evaluator renderer

* Created using Colaboratory

* Created using Colaboratory

* remove a print statement

* fix some bugs

* fix order tracking bug with dictionary observations

* better tuning, fix bug with record.py where obs group created twice

* fixes

* Update CONTRIBUTING.md

* Update evaluator.py to remove print statement

* Update test_venv.py

* use options now

* fix some bugs with options being None

* Update test_wrappers.py

* Update test_venv.py

* fix #119 issue (#123)

* [BC] Add base_pose and  tcp_pose in MS1 envs' observations

* Fix softbody installation instructions in installation.md (#99)

* Fix softbody installation instructions in installation.md

* Fix build_lib import issue

* Update the doc

---------

Co-authored-by: Jiayuan-Gu <jigu@eng.ucsd.edu>

* Update gh-pages.yml

The issue is caused by `gym` and `wheel`. Follow the solution in HumanCompatibleAI/imitation#707.

* fix #119 issue

---------

Co-authored-by: Jiayuan-Gu <jigu@eng.ucsd.edu>
Co-authored-by: Xuanlin (Simon) Li <35481101+xuanlinli17@users.noreply.github.com>
Co-authored-by: Jiayuan Gu <17827258+Jiayuan-Gu@users.noreply.github.com>

* Update vec_env.py

* Update test_venv.py

* update vec env demo to test both MS2 and Gymnasium vec envs

* nicer demo code

* Update README.md

* hide ms2 challenge

* Update quickstart.md

* update venv tests to also compare gym observations and enable gym make_vec_env to work

* Update test_venv.py

* tests

* add render_mode=human upon env creation in replay_trajectory.py

* adapt replay_trajectory.py with the new env.reset(seed, options) api

* fix PegInsertionSide reset function

* fix environment reset: always pop out options specific to an environment

* clean up errors when env fails on start and add some types

* use fixed model scales and ensure obs use np array floats instead of python floats for gymnasium

* Fix TurnFaucet-v0 mesh sampling to be deterministic with episode seed, so reward function is deterministic as well.

* add demo and asset download tests, and example code tests

* add render_cameras option, fix replay_trajectory to show viewer iff --vis is true,  fix goal visual to now show up for rgb_array and human

* basic replay trajectory tests and allow to replay up to a max of episodes

* fix goal visuals for PandaAvoidObstacles-v0

* fix goal visuals for PickClutterYCB-v0

* explicitly specify the  max_episode_steps keyword argument in make_vec_env

* fix bug where max_episode_steps wasnt processed in make_vec_env

* versioned demo download from HF

* fix missing arg

* Fix bug where main rng was not set on reset(seed=...) calls

* remove old test and minor fix to sb3 vector wrapper where repeated calls to reset used same seed.

* enable back env check

* improve comment and fix test name to be different from file name.

* black formatting.

* isort

* Update registration.py

---------

Co-authored-by: Jiayuan-Gu <jigu@eng.ucsd.edu>
Co-authored-by: Xuanlin (Simon) Li <35481101+xuanlinli17@users.noreply.github.com>
Co-authored-by: xuanlinli17 <xuanlinli17@gmail.com>
Co-authored-by: Yefanov <62796258+Yefanov@users.noreply.github.com>
Co-authored-by: Jiayuan Gu <17827258+Jiayuan-Gu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants