GithubHelp home page GithubHelp logo

openai / roboschool Goto Github PK

View Code? Open in Web Editor NEW
2.1K 283.0 489.0 13.02 MB

DEPRECATED: Open-source software for robot simulation, integrated with OpenAI Gym.

License: Other

Python 86.28% Makefile 0.20% C++ 12.43% GLSL 0.73% Shell 0.33% Dockerfile 0.03%

roboschool's Issues

Import error with initcpp_household

System details:
Ubuntu 17.04
Asrock AB350M Pro4 motherboard, Ryzen 5
NVIDIA GTX 1060 GPU

I was able to install Roboschool and add it to my PYTHONPATH variable in .bashrc, but this ImportError remains.

paul@desktop:/home$ python $ROBOSCHOOL_PATH/agent_zoo/demo_race2.py Traceback (most recent call last): File "/media/code/roboschool/agent_zoo/demo_race2.py", line 1, in <module> import gym, roboschool File "/media/code/roboschool/roboschool/__init__.py", line 80, in <module> from roboschool.gym_pendulums import RoboschoolInvertedPendulum File "/media/code/roboschool/roboschool/gym_pendulums.py", line 1, in <module> from roboschool.scene_abstract import SingleRobotEmptyScene File "/media/code/roboschool/roboschool/scene_abstract.py", line 5, in <module> from roboschool import cpp_household as cpp_household ImportError: dynamic module does not define init function (initcpp_household)

opengl_init failed

Hi guys!

I'm getting this error when i run python3 $ROBOSCHOOL_PATH/agent_zoo/demo_race2.py. I am running Ubuntu 16.04.

[2017-05-16 12:14:12,580] Making new env: RoboschoolHumanoid-v0
[2017-05-16 12:14:12,582] Making new env: RoboschoolHopper-v0
[2017-05-16 12:14:12,582] Making new env: RoboschoolWalker2d-v0
python3: render-simple.cpp:676: void opengl_init(const boost::shared_ptr<Household::World>&): Assertion `fmt1.majorVersion() == fmt2.majorVersion()' failed.
Aborted (core dumped)

Can you help?

Command "python setup.py egg_info" failed with error code 1

After I installed everything i run the command
pip3 install -e $ROBOSCHOOL_PATH
and I get the message "Please follow instructions in README to build local (not global for your system) Bullet installation."

Inspecting the source file "https://github.com/openai/roboschool/blob/master/setup.py" I see that the script looks for the subfolder "/roboschool/cpp-household/bullet_local_install/lib" inside the current directory. However I saw that an installation of the bullet engine (http://bulletphysics.org/mediawiki-1.5.8/index.php/Installation) does not create the subfolder "lib". How can I fix this?

undefined symbol: PyClass_Type

If you find:
ImportError: /usr/local/lib/libboost_python3.so.1.56.0: undefined symbol: PyClass_Type

It means you boost is built against python2 instead of python3. Try to build boost using
sudo ./bootstrap.sh --with-python=python3.4
or another other way to build boost against python3

Creating weights file for new zoo agents

I like how minimal the V1 zoo agents are in terms of code dependence, just having the minimal actor and loading the weights from a file. I'd like to create something similar.

If you have a script that takes the model and writes it to distilled info files like the *.weights files, could you possibly upload it to the agent_zoo directory or somewhere and mention it in the wiki. That would nicely simplify creating new ZooPolicies

Roboschool interfers with pytorch.multiprocessing

Hi,

I've been trying to implement A3C on the roboschool environment with the pytorch library, but I am getting an error as soon as I import the library. Here's a simpler version of my code:

https://gist.github.com/AlexPiche/5f3dcd2d7129a4454854773e29da541c

and the error that I get:

https://gist.github.com/AlexPiche/02a2571dc3ec047a880b8931468ec3c4

Note that the function train(args, 0) on line 30 works fine and that simply commenting out the 7th line fixes the problem for the multiprocessing call on line 33.

Python version:

2017-08-17T10:08:28-04:00

CPython 3.6.2
IPython 6.1.0
torch 0.2.0_1
gym 0.7.4
And the latest roboschool

compiler : GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)
system : Darwin
release : 16.7.0
machine : x86_64
processor : i386
CPU cores : 4
interpreter: 64bit

Thank you for your help.

Best,

Alex

Add license file

I assume the intention is for this repo to be under the same MIT license as OpenAI Gym. Can you add a license file?

Training HumanoidFlagrunHarder

Hi,

May be I missed the related detail in blog article or arxiv paper, but can you to shed some light on how the HumanoidFlagrunHarder was trained? What algorithm was used, how the training was organised?

Mujoco 1.5

Hi, Can we run Mujoco 1.5 version ? Because the gym needs 1.3 and its giving me errors so please help me with this

Readme install instructions for Mac

Just wanted to share my problems with the developers. I just installed roboschool on my Mac as part of the Udacity Nanodegree and ran into many issues due to my lack of understanding of these sorts of packages.

The install instructions say First define a ROBOSCHOOL_PATH variable.

In fact, step one (First) should be to git clone the repo to the local computer. That might be assumed by many, but since I was just trying to follow the instructions I didn't understand that, I just created a roboschool directory to do the installs in and followed the instructions. Then, when pip didn't work (I don't know what pip is or how it works or how you use it -- I was just following the instructions). After research, it became obvious I should have STARTED by git cloning the repository. But you can't do it after the other installs since they try to do the build inside the repo that it assumes you already installed. So I had to move stuff around, clean it all up, and start over.

Notice how openAI gym has install instructions like this:

git clone https://github.com/openai/gym.git
cd gym
pip install -e .

It would help us that are novices at all that to make the git clone the obvious first step of the install, and also make it obvious what the PATH needs to be defined as (because it gets very confusing later when you create a roboschool directory in the roboschool directory making it look like a path is mis-configred.

So maybe something like this would be good as step one:

git clone https://github.com/openai/roboschool.git
cd roboschool
ROBOSCHOOL_PATH=pwd

I used the "Mac, Anaconda with Python 3" instructions since we had set up Anaconda in the course (again, all brand new to me).

I didn't have homebrew installed, and I've never HEARD of homebrew so I had to go to google for help and followed some random instructions found on some random forum. I have no clue if I actually installed the right version of brew the correct way or not.

Maybe a link to where you should go to install homebrew would be nice?

The pip3 install of roboschool first failed because I didn't have pkg-info installed on my Mac. Again, it would be nice to include that in the step by step commands (You did mention it in the requirements).

I just used "brew install pkg-config" but again, I don't know if that was correct. But it seemed to work.

Trying to run the roboschool code failed on "import gym".

What's gym? I've never heard of it and you never mentioned it in the instructions? Every try to google for "gym"? :)

Yes, the context is all very clear to YOU since this is a project connected with OpenAI GYM, but I came to your project from a link that did not explain what this project was about.

It would be nice if in the install instructions, you mention, Oh, BTW, you have to install https://github.com/openai/gym as well for those of us lost souls trying to check out your work!

Thanks, just wanted to share some of my frustrations for the day that could be improved by a few updates to the install instructions in the readme file!

Thanks, Curt

Changing parameters of environment

Hi,
Is there any way I can change parameter of dynamics for environment? For example, how can can I change the mass of torso of hopper?

ImportError: libBulletCollision.so.2.87: cannot open shared object file: No such file or directory

I got this error when trying to run something from the agent zoo after following the installation instructions on Ubuntu 17.04.

ImportError: libBulletCollision.so.2.87: cannot open shared object file: No such file or directory

To resolve this error I have to do:
export LD_LIBRARY_PATH=$ROBOSCHOOL_PATH/roboschool/cpp-household/bullet_local_install/lib/
But hopefully there's a way to avoid people having to do that?

Reacher crashes after second call to reset

I am using this code to run the RoboschoolReacher-v0 environment. The first call to env.step in the second iteration of the outer for loop produces a segmentation fault error.

env = gym.make("RoboschoolReacher-v0")
for i in range(20):
    obs = env.reset()

    for j in range(100):
        obs, r, done, _ = env.step(np.array([0,0]))
        data = env.unwrapped.render("rgb_array")

I also found that the variables theta_dot and gamma_dot of RoboschoolReacher were set to nan. The reacher example from the agent_zoo produces a similar error: QImage::setPixel: coordinate (1017,-4910411) out of range (occurs multiple times with different values).

When I remove the call to render, everything works fine.
Am I getting something wrong?

cannot find -lboost_python-py34

If you find the following message:
/usr/bin/ld: cannot find -lboost_python-py34
collect2: error: ld returned 1 exit status
make: *** [../cpp_household.so] Error 1

This may help:
sudo ln -s /usr/local/lib/libboost_python3.so /usr/local/lib/libboost_python-py34.so

This issue can be closed now. Just want everyone know the solution.

Segmentation fault on env.reset()

Hello,

I'm trying to get roboschool running on arch and everything seems to work fine while installing, but when I try to run any of the examples or just try to use roboschool environment I get a seg fault:

import gym
import roboschool
env = gym.make("RoboschoolReacher-v0")
[2017-06-13 11:51:27,883] Making new env: RoboschoolReacher-v0
env.reset()
b3Error[/home/jaidmin/Software/Sources/bullet3/examples/SharedMemory/PhysicsServerCommandProcessor.cpp,1904]:
[1] 11654 segmentation fault (core dumped) python

I am not using Anaconda, I installed all dependencies via the system package manager

When I try to compile bullet itself everything works fine, I can run all the examples and there are no problems

If I can provide any more information please let me know

Ubuntu 14.04 ffmpeg install issue

sudo apt-get install cmake ffmpeg pkg-config qtbase5-dev libassimp-dev libpython3.5-dev libboost-python-dev libtinyxml-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ffmpeg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'ffmpeg' has no installation candidate
E: Unable to locate package libpython3.5-dev
E: Couldn't find any package by regex 'libpython3.5-dev'
mas@mas-STCK1A8LFC:/Downloads/reaver-1.4/src$
mas@mas-STCK1A8LFC:
/Downloads/reaver-1.4/src$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty

Module fails to load in Python 2.7

I have both Python2 and Python3 in my system, as I need the latter to allow certain applications to run, but I don't want to have to use Python3 with roboschool.

I used pip and not pip3 to install roboschool, but found that the module fails to load in python 2.7, as shown here:

image

I believe that this is because the Makefile in cpp-household/ forces the usage of python3 as long as it is in the system, and consequently the libs are always linked against libboost_python3 in that case.

A fix which worked for me is here: https://github.com/jmessias/roboschool/commit/dcbb0d176d5411d6a9b02885e67d0ff3762f6198, which allows the user to force python2 usage by setting USE_PYTHON2=1 prior to calling pip install (e.g. by calling USE_PYTHON2=1 pip install -e $ROBOSCHOOL_PATH), but still uses python3 by default.

Boost Python Error

Hi, I am getting

Boost.Python.ArgumentError: Python argument types in World.set_glsl_path(World, str) did not match C++ signature: set_glsl_path(World {lvalue}, std::string)

when attempting to run the demo. Here is the relevant output from ' dpkg --list | grep libboost ':

amd64 Boost.Python Library development files (default version) ii libboost-python1.58-dev 1.58.0+dfsg-5ubuntu3.1 amd64 Boost.Python Library development files ii libboost-python1.58.0 1.58.0+dfsg-5ubuntu3.1 amd64 Boost.Python Library ii libboost-random-dev:amd64 1.58.0.1ubuntu1

Is it because my libboost is likely compiled against python2.7 ?

Workarounds for macOS 10.12.15 (developer beta)

I've installed all the prereqs under Mac, homebrew python. However when I try and install (or compile cpp-household) the include directories aren't pulling in /usr/local/include (which would grab boost)

:~/python/roboschool/roboschool/cpp-household (master)$ make
Mac, assumed python3, homebrew branch
Link against python 3.6
Slow hardware or software render (no shadows)
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/System/Library/Frameworks/OpenGL.framework/Headers `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c physics-bullet.cpp  -o.build-release/physics-bullet.o -MMD -MF .build-release/physics-bullet.o.dep
In file included from physics-bullet.cpp:1:
In file included from ./render-glwidget.h:1:
In file included from ./render-simple.h:3:
In file included from ./household.h:2:
./assets.h:7:10: fatal error: 'boost/shared_ptr.hpp' file not found
#include <boost/shared_ptr.hpp>
         ^
1 error generated.

and it doesn't come in from the pkg-config line:

$ pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6
-I/usr/local/Cellar/qt/5.9.0/include/QtOpenGL -I/usr/local/Cellar/qt/5.9.0/include -I/usr/local/Cellar/qt/5.9.0/include/QtWidgets -I/usr/local/Cellar/qt/5.9.0/include -I/usr/local/Cellar/qt/5.9.0/include/QtGui -I/usr/local/Cellar/qt/5.9.0/include -I/usr/local/Cellar/qt/5.9.0/include/QtCore -I/usr/local/Cellar/qt/5.9.0/include -I/usr/local/Cellar/assimp/3.3.1/include/assimp -I/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/include/python3.6m

boost is installed

$ brew list | grep 'boost'
boost
boost-python
[email protected]
$ ls /usr/local/include/boost/shared_ptr.hpp 
/usr/local/include/boost/shared_ptr.hpp

I can fix the compilation with this diff on the Makefile, but wasn't sure what I'm missing this is working for others

diff --git a/roboschool/cpp-household/Makefile b/roboschool/cpp-household/Makefile
index 3b5c879..a32f847 100644
--- a/roboschool/cpp-household/Makefile
+++ b/roboschool/cpp-household/Makefile
@@ -38,7 +38,7 @@ ifeq ($(UNAME),Darwin)
   endif
   PKG   =pkg-config
   LIBS  =-framework OpenGL
-  INC   =-I/System/Library/Frameworks/OpenGL.framework/Headers
+  INC   =-I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include
   BOOST_PYTHON3_POSTFIX = 3
   BOOST_MT=-mt
   PYTHON = $(shell python3 -c "import sys; print('%i.%i' % sys.version_info[:2])")

Issue when installing on Ubuntu 16.04

When I try to install Roboschool I get this error: Directory '/path/to/roboschool' is not installable. File 'setup.py' not found. I follow all instructions, my OS is Ubuntu 16.04, can someone help me?

Stochastic environment

I am very curious to know if it is possible to inject noise (e.g. standard Gaussian noise) to the dynamics to make it to be stochastic environments ?

Support for Python 2.7 on Mac

I ran into problems installing for Python 2.7 (Anaconda) on a Mac since the installer assumes python3. I was able to install and run the demos with some minor fixes to roboschool/cpp-household/Makefile. Any reason why Mac support was not included with the Python 2.7 updates?

Happy to submit a PR with my fixes.

Issue with building

Hi, on my 10.12.4 MacOS system, I'm having trouble building the CPP element.

After installing a few missing requirements with brew, I'm now running into this issue:

Thomass-MacBook-Air:cpp-household thomasjacobs$ make
Mac, assumed python3, homebrew branch
Link against python 3.6
Software render
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/Cellar/assimp/3.3.1/include -I/opt/X11/include/GLES3 -I/usr/local/Cellar/boost/1.64.0_1/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c render-simple.cpp  -o.build-release/render-simple.o -MMD -MF .build-release/render-simple.o.dep
render-simple.cpp:280:2: error: use of undeclared identifier 'glTexStorage2D'
        glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, W, H);
        ^
render-simple.cpp:284:2: error: use of undeclared identifier 'glTexStorage2D'
        glTexStorage2D(GL_TEXTURE_2D, 1, GL_DEPTH24_STENCIL8, W, H);
        ^
render-simple.cpp:298:2: error: use of undeclared identifier 'glTexStorage2D'
        glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, W16, H);
        ^
3 errors generated.
make: *** [.build-release/render-simple.o] Error 1

I've set:

export PATH=/usr/local/bin:/usr/local/opt/qt5/bin:$PATH
export PKG_CONFIG_PATH=/usr/local/opt/qt5/lib/pkgconfig

and the brew installs return:

Thomass-MacBook-Air:cpp-household thomasjacobs$ brew install python3
Warning: python3-3.6.1 already installed
Thomass-MacBook-Air:cpp-household thomasjacobs$ brew install cmake tinyxml assimp ffmpeg qt
Warning: tinyxml-2.6.2 already installed
Warning: assimp-3.3.1 already installed
Warning: qt is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Error: cmake 3.7.2 is already installed
To upgrade to 3.8.1, run `brew upgrade cmake`
Error: ffmpeg 3.3 is already installed
To upgrade to 3.3.1, run `brew upgrade ffmpeg`
Thomass-MacBook-Air:cpp-household thomasjacobs$ brew install boost-python --without-python --with-python3 --build-from-source
Warning: boost-python-1.64.0 already installed

I've tried force installing qt and relinking it.
I've tried in an anaconda env as well, to no avail.
What's my next step here?

OpenGL error

When I try to run demo I get this error

QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled

Household and Robot Models

Hello,

I was looking around the repo and saw the roboschool/models_robot and roboschool/models_household folders. I was wondering how I would view these models in Bullet/MuJoCo simulation since they don't seem to have environments connected to them. I am interested in getting robots to do household tasks, so if an environment doesn't currently exist, I might be willing to build it myself if it isn't too complicated.

Contributing Guidelines

  1. Are you accepting open source contributions? I've been wanting to help out, but received no response from a trivial PR on gym (openai/gym#561). Will you accept help on this repository?

  2. Either way, can you please add a CONTRIBUTING.md file? Perhaps it can hint the potential contributor on how to best help; otherwise, maybe it should state whether or not contributions are actually welcomed.

Thanks, and I'm looking forward to tinkering around with this! Looks fantastic thus far. Hope I can help somehow!

Issues with Installation for Anaconda with Python3

In the guide of installation for Mac, Anaconda with Python3,

brew install cmake tinyxml assimp ffmpeg
brew install boost-python --without-python --with-python3 --build-from-source
conda install qt
export PKG_CONFIG_PATH=$(dirname $(dirname $(which python)))/lib/pkgconfig

you used brew. I think people rarely use brew and conda together and the underlying python packages are generally different. Would this be a issue? Is there a way to work around brew completely? Thank you.

Qt headers missing on Ubuntu 14.04

Output from pip3 install -e $ROBOSCHOOL_PATH:

In file included from render-glwidget.h:1:0,

                 from render-glwidget.cpp:2:

render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory

 #include <QtWidgets/QOpenGLWidget>

                                   ^

compilation terminated.

Output from sudo apt-get install qtbase5-dev libqt5opengl5-dev:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libqt5opengl5-dev is already the newest version (5.2.1+dfsg-1ubuntu14.3).
qtbase5-dev is already the newest version (5.2.1+dfsg-1ubuntu14.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

OpenGL problem on ubuntu 16.04

I installed everything according to instructions. However, I am getting the following error. I have tried everything given in #2. But nothing seems to work.

$ python3 agent_zoo/demo_race2.py 
[2017-05-26 22:20:30,281] Making new env: RoboschoolHumanoid-v0
[2017-05-26 22:20:30,284] Making new env: RoboschoolHumanoid-v0
[2017-05-26 22:20:30,285] Making new env: RoboschoolHumanoid-v0
QGLShaderProgram: could not create shader program
bool QGLShaderPrivate::create(): Could not create shader of type 2.
python3: render-simple.cpp:244: void SimpleRender::Context::initGL(): Assertion `r0' failed.
Aborted (core dumped)

I am running

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.2 LTS
Release:	16.04
Codename:	xenial
$ nvidia-smi 
Fri May 26 22:27:38 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.66                 Driver Version: 375.66                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  TITAN X (Pascal)    Off  | 0000:03:00.0     Off |                  N/A |
| 23%   26C    P8    10W / 250W |    192MiB / 12189MiB |      4%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      1572    G   /usr/lib/xorg/Xorg                              70MiB |
|    0      4455    G   compiz                                         120MiB |
+-----------------------------------------------------------------------------+
$ glxinfo
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context, 
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, 
    ....
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context, 
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, 
    ...
GLX version: 1.4
GLX extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context, 
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, 
    ...
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: TITAN X (Pascal)/PCIe/SSE2
OpenGL core profile version string: 4.5.0 NVIDIA 375.66
OpenGL core profile shading language version string: 4.50 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture, 
    GL_AMD_vertex_shader_layer, GL_AMD_vertex_shader_viewport_index, 
    ...
OpenGL version string: 4.5.0 NVIDIA 375.66
OpenGL shading language version string: 4.50 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
    GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture, 
    GL_AMD_vertex_shader_layer, GL_AMD_vertex_shader_viewport_index, 
    ...
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 375.66
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
    GL_ANDROID_extension_pack_es31a, GL_EXT_base_instance, 
    GL_EXT_blend_func_extended, GL_EXT_blend_minmax, GL_EXT_buffer_storage, 
    GL_EXT_color_buffer_float, GL_EXT_color_buffer_half_float, 
    GL_EXT_copy_image, GL_EXT_deb

Bug: `AssertionError` in `gym_pendulums.py`: slider position x is not finite

Expected behaviour

You can use the openai gym API to interact with the RoboschoolInvertedPendulumSwingup-v0 environment

Observed behaviour

Calling step(env.action_space.sample()) throws an AssertionError, because the x slider position is not finite.

I will dig deeper into this later and try to fix it. In the meantime - is there anyone who can reproduce this?

import roboschool
import gym

env = gym.make('RoboschoolInvertedPendulumSwingup-v0')
env.reset()
env.step(env.action_space.sample())  # <-- throws the `AssertionError` in `calc_state()`

README Update

Hi, just built the environment on Ubuntu 16.04 (Linux Mint 18.1) with Python3, here are two comments:

1.) The Qt OpenGL library is not included in the basic Qt distribution (qtbase5-dev), so please add it to the dependencies list:

sudo apt install libqt5opengl5-dev

  1. I had to install bullet globally after compiling it, otherwise

pip3 install -e $ROBOSCHOOL_PATH

would not work.

Great job with this project, I was really glad to find it before doing something similar with pybullet myself :).

Trouble building

Hi, when I try pip3 install on Ubuntu 15.04 with python 3.4, I get the following error:

(tf3)pender@penderforge:~/roboschool$ pip3 install -e $ROBOSCHOOL_PATH
Obtaining file:///home/pender/roboschool
    Complete output from command python setup.py egg_info:
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    sh: 1: install_name_tool: not found
    found resource files: 185
    running egg_info
    Linux, python3, Ubuntu branch
    Link against python 3.4
    Hardware render (turn on shadows)
    rm -f ../robot-test-tool ../robot-test-tool_d ../cpp_household.so ../cpp_household_d.so  .build-release/physics-bullet.o  .build-release/assets-mesh.o  .build-release/random-world-tools.o  .build-release/render-glwidget.o  .build-release/render-hud.o  .build-release/render-simple.o  .build-release/render-simple-primitives.o  .build-release/render-ssao.o  .build-release/test-tool-qt4.o  .build-release/python-binding.o  .build-debug/physics-bullet.o  .build-debug/assets-mesh.o  .build-debug/random-world-tools.o  .build-debug/render-glwidget.o  .build-debug/render-hud.o  .build-debug/render-simple.o  .build-debug/render-simple-primitives.o  .build-debug/render-ssao.o  .build-debug/test-tool-qt4.o  .build-debug/python-binding.o .generated/*.moc *.ilk *.pdb .build-release/physics-bullet.o.dep .build-release/assets-mesh.o.dep .build-release/random-world-tools.o.dep .build-release/render-glwidget.o.dep .build-release/render-hud.o.dep .build-release/render-simple.o.dep .build-release/render-simple-primitives.o.dep .build-release/render-ssao.o.dep .build-release/test-tool-qt4.o.dep .build-release/python-binding.o.dep .build-debug/physics-bullet.o.dep .build-debug/assets-mesh.o.dep .build-debug/random-world-tools.o.dep .build-debug/render-glwidget.o.dep .build-debug/render-hud.o.dep .build-debug/render-simple.o.dep .build-debug/render-simple-primitives.o.dep .build-debug/render-ssao.o.dep .build-debug/test-tool-qt4.o.dep .build-debug/python-binding.o.dep
    rm -rf .generated
    rm -rf .build-debug
    rm -rf .build-release
    Linux, python3, Ubuntu branch
    Link against python 3.4
    Hardware render (turn on shadows)
    mkdir -p .generated
    mkdir -p .build-release
    mkdir -p .build-debug
    gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.4` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -DUSE_SSAO -c physics-bullet.cpp  -o.build-release/physics-bullet.o -MMD -MF .build-release/physics-bullet.o.dep
    gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.4` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -DUSE_SSAO -c assets-mesh.cpp  -o.build-release/assets-mesh.o -MMD -MF .build-release/assets-mesh.o.dep
    gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.4` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -DUSE_SSAO -c random-world-tools.cpp  -o.build-release/random-world-tools.o -MMD -MF .build-release/random-world-tools.o.dep
    gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include `pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.4` -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -DUSE_SSAO -c render-glwidget.cpp  -o.build-release/render-glwidget.o -MMD -MF .build-release/render-glwidget.o.dep
    assets-mesh.cpp: In function ‘void Household::load_model(const boost::shared_ptr<Household::ShapeDetailLevels>&, const string&, btScalar, const btTransform&)’:
    assets-mesh.cpp:84:31: error: ‘AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION’ was not declared in this scope
      importer1.SetPropertyInteger(AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION, 1);
                                   ^
    assets-mesh.cpp:85:12: error: ‘class Assimp::Importer’ has no member named ‘SetPropertyMatrix’
      importer1.SetPropertyMatrix(AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION, root_trans); // setting identity matrix helps to load .dae, resulting model turned on the side without it
                ^
    assets-mesh.cpp:85:30: error: ‘AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION’ was not declared in this scope
      importer1.SetPropertyMatrix(AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION, root_trans); // setting identity matrix helps to load .dae, resulting model turned on the side without it
                                  ^
    assets-mesh.cpp:95:12: error: ‘class Assimp::Importer’ has no member named ‘SetPropertyMatrix’
      importer2.SetPropertyMatrix(AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION, root_trans);
                ^
    At global scope:
    cc1plus: warning: unrecognized command line option "-Wno-deprecated-register"
    Makefile:128: recipe for target '.build-release/assets-mesh.o' failed
    make: *** [.build-release/assets-mesh.o] Error 1
    make: *** Waiting for unfinished jobs....
    cd /home/pender/roboschool/roboschool/cpp-household && make clean && make -j4 dirs ../cpp_household.so
    
    C++ dependencies for this project are:
    
    bullet
    tinyxml
    boost_python
    assimp
    Qt5
    
    If you see compilation error FIRST THING TO CHECK if pkg-config call was successful.
    Install dependencies that pkg-config cannot find.
    
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /home/pender/roboschool/

Can anyone help?

Issue running the Demo

Hi after compiling and installing the code I am still unable to run the demo version ive followed the readme instruction word by word can anyone help ? below is the error
screenshot from 2017-06-08 09-03-57

Fedora support

As far as I can see there are only two things missing to support Fedora installation of Roboschool.

  1. List of dependencies. I was able to install it with: dnf install cmake ffmpeg pkgconfig qt5-devel assimp-devel python3-devel boost-python3-devel tinyxml-devel

  2. Modification to cpp-household/Makefile. Right now the Makefile treats all Linux environments like Ubuntu. The one place I found this problematic was linking to boost-python for Python 3.5. On Ubuntu this is with boost-python-py35, but on Fedora this is just boost-python. I'm not terribly familiar with Make so I don't know the best way to fix this.

Quickfix for OpenGL initialization

I followed the installation instructions and everything went well so far. However, now I tried to run the pretrained RoboschoolAnt from the agent_zoo, but it fails to run. The following is the output:

python3 ./RoboschoolAnt_v0_2017apr.py 2017-05-31 21:17:53.304307: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-05-31 21:17:53.304637: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with properties: 
name: Quadro K2100M
major: 3 minor: 0 memoryClockRate (GHz) 0.6665
pciBusID 0000:01:00.0
Total memory: 1.95GiB
Free memory: 1.52GiB
2017-05-31 21:17:53.304659: I tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0 
2017-05-31 21:17:53.304664: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0:   Y 
2017-05-31 21:17:53.304685: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Quadro K2100M, pci bus id: 0000:01:00.0)
[2017-05-31 21:17:53,304] Making new env: RoboschoolAnt-v0
QGLShaderProgram: could not create shader program
bool QGLShaderPrivate::create(): Could not create shader of type 2.
python3: render-simple.cpp:217: void SimpleRender::Context::initGL(): Assertion `r0' failed.
Aborted

After some research, it seems that OpenGL is not properly loaded. I could fix the problem by adding the following line to the imports:

from OpenGL import GLU

I could properly run the script after adding this. Maybe this import should somehow be included. I am looking a bit more into this.Tell me if you need any other information.

RoboschoolHumanoid has negative rewards

I couldn't get the humanoid to learn so investigated and found that the rewards seem to be between -15 and 0. Of course this doesn't work with variable horizon episodic RL because the easiest way to get a higher cumulative reward is to just shorten the episodes.
I made it train by adding 15 to every reward but it only learned to have long episodes, didn't move forward. I am currently testing by adding only 5 each step.
But, openai published many results with it.
Is the current master broken or could something be amiss with my setup? Anybody else get it to train without modifying?

Can I load URDF robots?

How can I load URDF model robots (i.e. ones with STL models as parts), such as Fetch and Atlas, and my own? Is there a demo script for these currently?

composeAndFlush: makeCurrent() failed

I installed as the instructions in ubuntu 16.10, but when I try to run the pretrained agent, I got this message continually.

composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed
What's the problem?

Command "python setup.py egg_info" failed with error code 1 in ~/roboschool/

My installation of roboschool has failed with the following message:
Obtaining file:///home/glazari/repos/roboschool Complete output from command python setup.py egg_info: found resource files: 185 running egg_info Linux, python3, anaconda branch, will query Ubuntu python3 for boost_python Link against python 3.6 Slow hardware or software render (no shadows) rm -f ../robot-test-tool ../robot-test-tool_d ../cpp_household.so ../cpp_household_d.so .build-release/physics-bullet.o .build-release/assets-mesh.o .build-release/random-world-tools.o .build-release/render-glwidget.o .build-release/render-hud.o .build-release/render-simple.o .build-release/render-simple-primitives.o .build-release/test-tool-qt4.o .build-release/python-binding.o .build-debug/physics-bullet.o .build-debug/assets-mesh.o .build-debug/random-world-tools.o .build-debug/render-glwidget.o .build-debug/render-hud.o .build-debug/render-simple.o .build-debug/render-simple-primitives.o .build-debug/test-tool-qt4.o .build-debug/python-binding.o .generated/*.moc *.ilk *.pdb .build-release/physics-bullet.o.dep .build-release/assets-mesh.o.dep .build-release/random-world-tools.o.dep .build-release/render-glwidget.o.dep .build-release/render-hud.o.dep .build-release/render-simple.o.dep .build-release/render-simple-primitives.o.dep .build-release/test-tool-qt4.o.dep .build-release/python-binding.o.dep .build-debug/physics-bullet.o.dep .build-debug/assets-mesh.o.dep .build-debug/random-world-tools.o.dep .build-debug/render-glwidget.o.dep .build-debug/render-hud.o.dep .build-debug/render-simple.o.dep .build-debug/render-simple-primitives.o.dep .build-debug/test-tool-qt4.o.dep .build-debug/python-binding.o.dep rm -rf .generated rm -rf .build-debug rm -rf .build-release Linux, python3, anaconda branch, will query Ubuntu python3 for boost_python Link against python 3.6 Slow hardware or software render (no shadows) mkdir -p .generated mkdir -p .build-release mkdir -p .build-debug gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6-Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c physics-bullet.cpp -o.build-release/physics-bullet.o -MMD -MF .build-release/physics-bullet.o.dep Package python-3.6 was not found in the pkg-config search path. Perhaps you should add the directory containingpython-3.6.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python-3.6' found
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6 -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c assets-mesh.cpp -o.build-release/assets-mesh.o -MMD -MF .build-release/assets-mesh.o.dep
Package python-3.6 was not found in the pkg-config search path.
Perhaps you should add the directory containing python-3.6.pc' to the PKG_CONFIG_PATH environment variable No package 'python-3.6' found gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6-Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c random-world-tools.cpp -o.build-release/random-world-tools.o -MMD -MF .build-release/random-world-tools.o.dep Package python-3.6 was not found in the pkg-config search path. Perhaps you should add the directory containingpython-3.6.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python-3.6' found
gcc -std=c++11 -Wall -Wno-unused-variable -Wno-unused-function -Wno-deprecated-register -fPIC -DBT_USE_DOUBLE_PRECISION -g -O3 -march=native -I/usr/include pkg-config --cflags Qt5Widgets Qt5OpenGL assimp python-3.6 -Ibullet_local_install/include -Ibullet_local_install/include/bullet -I/usr/local/include/bullet -c render-glwidget.cpp -o.build-release/render-glwidget.o -MMD -MF .build-release/render-glwidget.o.dep
Package python-3.6 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python-3.6.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python-3.6' found
In file included from render-glwidget.h:1:0,
from physics-bullet.cpp:1:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
compilation terminated.
Makefile:130: recipe for target '.build-release/physics-bullet.o' failed
make: *** [.build-release/physics-bullet.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from assets-mesh.cpp:1:0:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
compilation terminated.
Makefile:130: recipe for target '.build-release/assets-mesh.o' failed
make: *** [.build-release/assets-mesh.o] Error 1
In file included from random-world-tools.cpp:3:0:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
compilation terminated.
Makefile:130: recipe for target '.build-release/random-world-tools.o' failed
make: *** [.build-release/random-world-tools.o] Error 1
In file included from render-glwidget.h:1:0,
from render-glwidget.cpp:2:
render-simple.h:6:35: fatal error: QtWidgets/QOpenGLWidget: No such file or directory
compilation terminated.
Makefile:130: recipe for target '.build-release/render-glwidget.o' failed
make: *** [.build-release/render-glwidget.o] Error 1
cd /home/glazari/repos/roboschool/roboschool/cpp-household && make clean && make -j4 dirs ../cpp_household.so

C++ dependencies for this project are:

bullet
tinyxml
boost_python
assimp
Qt5

If you see compilation error FIRST THING TO CHECK if pkg-config call was successful.
Install dependencies that pkg-config cannot find.


----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /home/glazari/repos/roboschool/
`

Does anyone know what could have caused this?

Roboschool renders a black screen

Hi,

Following the installation instructions, and updating Nvidia driver to the latest one (as I have reported here: #2) , Roboschool is running but renders only a black screen.

My setup is Ubuntu 16 based, with an Nvidia TitanX. The added fixes for OpenGL init and 3.3 shaders did not help to fix this issue, so I suspect that this is a different issue than in #2.

ImportError: dlopen($ROBOSCHOOL_PATH/roboschool/cpp_household.so, 2): Library not loaded: @rpath/libLinearMath.2.87.dylib

I got this error when trying to run something from the agent zoo after following the installation instructions on Mac, homebrew python.

import roboschool
Traceback (most recent call last):
File "", line 1, in
File "/Users/MufeiLi/roboschool-master/roboschool/init.py", line 80, in
from roboschool.gym_pendulums import RoboschoolInvertedPendulum
File "/Users/MufeiLi/roboschool-master/roboschool/gym_pendulums.py", line 1, in
from roboschool.scene_abstract import SingleRobotEmptyScene
File "/Users/MufeiLi/roboschool-master/roboschool/scene_abstract.py", line 12, in
from roboschool import cpp_household as cpp_household
ImportError: dlopen(/Users/MufeiLi/roboschool-master/roboschool/cpp_household.so, 2): Library not loaded: @rpath/libLinearMath.2.87.dylib
Referenced from: /Users/MufeiLi/roboschool-master/roboschool/cpp_household.so
Reason: image not found

I've searched among the issues and this problem seems very similar to #10 . In fact, I managed to get the demo to work by

export LD_LIBRARY_PATH=$ROBOSCHOOL_PATH/roboschool/cpp-household/bullet_local_install/lib/

Is this normal? Is there a way to fix it? Thanks.

Problems with demo

I'm sorry if the question is pretty basic, I'm getting this error when trying to run the demos:

ImportError: dynamic module does not define init function (initcpp_household)

Any help? :)

Thanks in advance,
Daniel

Use multiple camera views together with world.test_window

I am trying to use multiple camera windows together with the main Viz. Is it currently supported?

I failed to do so by adapting the Wiki. Generally, the issues I encountered are:

  1. cannot call render("human") and camera.render() (or mycam.render()) in the same loop. Doing this will raise "Assertion e == 0" failure in camera_render() in render-glwidget.cpp.
  2. the program crashes when render("human") and camera.test_window() (no render called before) are called in the same loop.
  3. however, it runs when render("human") and mycam.test_window() if created_camera.render() is not called.
  4. calling camera.render() and mycam.render() in the same loop seems okay, although the test_window has no response.

Here is a minimal example to reproduce the findings

import os.path, gym
import numpy as np
import roboschool

def demo_run():
    env = gym.make("RoboschoolAnt-v1")


    while 1:
        frame = 0
        score = 0
        restart_delay = 0
        obs = env.reset()

        #create another camera, the behavior is different from the built-in camera of the robot
        #I dont understand why because both of them seem to be created from new_camera_free_float
        mycam = env.unwrapped.scene.cpp_world.new_camera_free_float(320, 200, "my_camera")
        mycam.move_and_look_at(1,1,1, 0,0,0)

        while 1:
            a = np.zeros(env.action_space.shape)
            obs, r, done, _ = env.step(a)

            # world test_window, cannot work with camera, but can go with mycam if mycam.render is not called, while it outputs garbage pixels as the render is not called
            still_open = env.render("human")

            # rgb_array camera, cannot work
            # img = env.render('rgb_array')
            # env.unwrapped.camera.test_window()

            # mycam: cannot work with world test_window if render is called: Assertion `e == 0' failed in camera_render()
            # rgb, depth, depth_mask, labeling, labeling_mask = mycam.render(True, True, True)
            # mycam.test_window()


if __name__=="__main__":
    demo_run()

The test was carried out under Ubuntu 14.04, python 2.7 and Qt5.7. Not sure if these are the reasons.

My current workaround is to plot the render outputs in a third-party GUI, just like what demo_keyboard_humanoid2.py does. Any ideas about using render("human") and camera.test_window()?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.