Commit Graph

35 Commits

Author SHA1 Message Date
J K Terry
78d2b512d8 redo black (#2272) 2021-07-29 15:39:42 -04:00
Justin Terry
e9d2c41f2b redo black 2021-07-29 12:42:48 -04:00
Christian Clauss
bb81e141ea Blacken the codebase (#2265) 2021-07-28 20:26:34 -04:00
ryota-mo
e02ed92b44 Specify the camera of depth_array (#1960)
* specify the camera of depth_array

* exclude human
2020-06-19 14:42:26 -07:00
Xingdong Zuo
a14e1c7292 Fix unnecessary warnings (#1800)
* Update pendulum.py

* Update continuous_mountain_car.py

* Update cartpole.py

* Update mujoco_env.py

* Update mountain_car.py

* Update acrobot.py
2020-02-29 01:11:29 +01:00
Peter Zhokhov
5fef6458a7 fix mujoco tests 2019-08-23 15:39:03 -07:00
Kristian Hartikainen
a49c3e0fc8 Feature/pixel observation wrapper (#1499)
* Implement PixelObservationWrapper

* Change MujocoEnv.render to support custom camera_{name,id}

* Implement tests for PixelObservationWrapper

* Use env.get_pixels instead of direct env.render

* Fix camera_{id,name} check in pixel observation wrapper

* Fix rendering with explicit camera_id

* Add Wrapperget_pixels to allow call to be propagated to wrapped env

* Remove use of unnecessary `get_pixels` method

* Update PixelObservationWrapper to support multiple pixel keys

* Remove unnecessary `rgb_rendering_tracking` argument

* Remove rgb_rendering_tracking logic
2019-08-23 15:02:33 -07:00
Kristian Hartikainen
f6209d4e17 Allow observation and action spaces to be customized in MujocoEnv (#1498)
* Add new _set_{observation,_action}_space methods for MujocoEnv,
  allowing customized spaces.
* Implement automatic handling of dict observation spaces
2019-06-07 14:43:05 -07:00
Peter Zhokhov
dbab98c367 rgb_rendering_tracking default value set to True 2019-03-25 12:25:06 -07:00
pzhokhov
663515c8d2 add optional tracking for mujoco locomotion in the rgb rendering mode (issue 1135) (#1405)
* switch rgb_array camera to 0

* merge latest master

* add tracking camera for swimmer

* test track camera name to be in valid names

* add rgb_rendering_tracking kwarg to locomotion mujoco envs; fixes 1135

* fix track camera logic in mujoco_env.py
2019-03-25 12:17:38 -07:00
pzhokhov
a9d7fc7dd1 remove vertical camera motion on env.reset() (#1174)
* remove vertical camera motion on env.reset()

* In MuJoCo envs, don't reset viewers on environment reset. If the user moves around the camera in the viewer, allow them to keep the camera wherever they put it.

* Docstring update.
2018-09-24 14:53:23 -07:00
Norman Mu
4053e6068a specify explicit dtype in Box objects (#994) 2018-09-21 11:55:52 -07:00
pzhokhov
69f5f98330 test dockerfiles for ubuntu 14.04 and 18.04 (#1168)
* pass device_id=-1 when rendering mujoco in rgb_array mode

* trying ubuntu18.04 build

* use travis build matrix

* use travis build matrix

* use travis build matrix

* use fix 18.04 installation steps

* use fix 18.04 installation steps

* try py3 instead of py35

* trying the 14.04 build; cleaning up the 16.04 package list

* fixes to dockerfile.14.04

* fixes to dockerfile.14.04

* fixes to dockerfile.14.04

* fixes to dockerfile.14.04

* fixes to dockerfile.14.04

* fixing system package list for 14.04

* 16.04 build working

* clean up test.dockerfile.16.04

* adding python-numpy system package

* add patchelf

* remove python-numpy from 16.04 dockerfile

* 14.04 does not use mujoco (patchelf problem)

* cleaning up 18.04 dockerfile

* added comment to 14.04 dockerfile

* fix syntax in 14.04 dockerfile

* being fancy and switching from apt-get to apt command in 18.04 dockerfile

* update README.rst to use apt (instead of apt-get) on ubuntu 18.04
2018-09-21 11:53:58 -07:00
Daniel Angelov
7bbe486893 Add depth rendering from camera (#1114)
* Add depth rendering from camera

Allow the mujoco renderer to return the depth image using the `depth_array` mode. 

It follows the `rgb_array` extraction method.

* Depth data is a 2d array.

* Add depth_array to render modes.
2018-09-20 17:51:58 -07:00
Ge Yang
d99d5bcc17 Add dtype to Box initialization, fixes #868 (#1092)
Otherwise it generates warnings:

#868
2018-09-17 10:27:31 -07:00
pzhokhov
4d7136c8b1 pass device_id=-1 when rendering mujoco in rgb_array mode (#1167) 2018-09-17 09:54:11 -07:00
Adam Gleave
d5300b5714 MuJoCo render (fix #1000) (#1013) 2018-05-30 10:39:49 +02:00
pzhokhov
74229c8dc2 travis build and test failure fixes (#1031)
* build test image from scratch from ubuntu:16.04

* removed pulling old image from .travis.yml

* try installing keyboard-configuration on docker on travis

* trying install keyboard-configuration before rest of the packages

* upgrading dockerfile and entrypoint to work with ubuntu16.04

* fixing dummy display config wip

* install keyboard-properties first in dockerfile

* pass mujoco_key in .travis.yml

* skipsdist in tox.ini

* removed unpacking of the mujoco bundle in entrypoint

* using xvfb for fake display

* comment out self.viewer.close

* install ffmpeg

* squash run commands in dockerfile

* fixed typo in dockerfile

* fixed typo in dockerfile

* fixed typo in dockerfile

* use self.np_random in robotics/hand/manipulate

* some cleanups in .travis.yml

* cleaning up accidental changes

* cleaning up accidental changes

* inject mujoco key on runtime (instead of container buildtime)

* remove webhooks section from .travis.yml
2018-05-14 17:39:56 -07:00
Peter Welinder
c5b624c6a6 Fix rgb_array mode for MujocoEnv (#909) 2018-02-26 10:48:44 +01:00
John Schulman
4c460ba6c8 Cleanup, removal of unmaintained code (#836)
* add dtype to Box

* remove board_game, debugging, safety, parameter_tuning environments

* massive set of breaking changes
- remove python logging module
- _step, _reset, _seed, _close => non underscored method
- remove benchmark and scoring folder

* Improve render("human"), now resizable, closable window.

* get rid of default step and reset in wrappers, so it doesn’t silently fail for people with underscore methods

* CubeCrash unit test environment

* followup fixes

* MemorizeDigits unit test envrionment

* refactored spaces a bit
fixed indentation
disabled test_env_semantics

* fix unit tests

* fixes

* CubeCrash, MemorizeDigits tested

* gym backwards compatibility patch

* gym backwards compatibility, followup fixes

* changelist, add spaces to main namespaces

* undo_logger_setup for backwards compat

* remove configuration.py
2018-01-25 18:20:14 -08:00
Matthias Plappert
6af4a5b9b2 Migrate to mujoco-py 1.50 (#834)
* all envs run offscreen

* render works

* changed mujoco-py version

* Bump versions

* Update version and README

* Same versioning for all mujoco envs

* Fix typo

* Fix version

* Bump version again

* Revert "Fix version"

This reverts commit decc5779811801deb6ae9fad697dfe247d2bdd94.
2018-01-24 15:42:29 -08:00
Alex Ray
f724a72006 Lint fixes to mujoco environment (#377) 2017-02-22 17:24:27 -08:00
Greg Brockman
8a535ca6f2 Switch to a global PRNG for action/observation spaces (#144)
cf 58e6aa95e5 (commitcomment-17669277)
2016-05-30 18:07:59 -07:00
Greg Brockman
58e6aa95e5 [WIP] add support for seeding environments (#135)
* Make environments seedable

* Fix monitor bugs

- Set monitor_id before setting the infix. This was a bug that would yield incorrect results with multiple monitors.
- Remove extra pid from stats recorder filename. This should be purely cosmetic.

* Start uploading seeds in episode_batch

* Fix _bigint_from_bytes for python3

* Set seed explicitly in random_agent

* Pass through seed argument

* Also pass through random state to spaces

* Pass random state into the observation/action spaces

* Make all _seed methods return the list of used seeds

* Switch over to np.random where possible

* Start hashing seeds, and also seed doom engine

* Fixup seeding determinism in many cases

* Seed before loading the ROM

* Make seeding more Python3 friendly

* Make the MuJoCo skipping a bit more forgiving

* Remove debugging PDB calls

* Make setInt argument into raw bytes

* Validate and upload seeds

* Skip box2d

* Make seeds smaller, and change representation of seeds in upload

* Handle long seeds

* Fix RandomAgent example to be deterministic

* Handle integer types correctly in Python2 and Python3

* Try caching pip

* Try adding swap

* Add df and free calls

* Bump swap

* Bump swap size

* Try setting overcommit

* Try other sysctls

* Try fixing overcommit

* Try just setting overcommit_memory=1

* Add explanatory comment

* Add what's new section to readme

* BUG: Mark ElevatorAction-ram-v0 as non-deterministic for now

* Document seed

* Move nondetermistic check into spec
2016-05-29 09:07:09 -07:00
Greg Brockman
2ae0dbc846 Discard viewer object after render with close=True
Fixes #95
2016-05-15 17:22:38 -07:00
Jonas Schneider
cda4518b1e Bump mujoco-py for Python3 compat 2016-05-10 17:05:04 +02:00
Josh Marlow
9529fa731b Replaced is string comparison with == (#77) 2016-05-09 17:51:04 -07:00
Jonas Schneider
fad0065931 Call _step instead of step when fake-stepping a mujoco env on initialize 2016-05-03 22:20:41 -04:00
John Schulman
795640dfe8 fix mujoco _reset method 2016-05-01 10:57:19 -07:00
John Schulman
3d9ad4f71c update mujoco and bump version 2016-05-01 10:57:19 -07:00
Jonas Schneider
fd18ec3507 Merge remote-tracking branch 'origin/master' into py3
Conflicts:
	gym/envs/atari/atari_env.py
2016-04-29 18:07:47 -07:00
Jonas Schneider
bd63f7547e Correctly encode mujoco arguments as binary 2016-04-28 22:32:17 -07:00
Dominik Mueller
d3d23f3455 Fix readme example, documentation and error messages 2016-04-28 14:01:24 +02:00
OpenAI server
8fffddcb23 if viewer is None then no need to close it. 2016-04-27 09:41:15 -07:00
Greg Brockman
e8f2980603 Initial release. Hello world :). 2016-04-27 08:00:58 -07:00