Skip to content

Conversation

@erwincoumans
Copy link

I added the Extras/BulletRobotics library so it is easier to build Roboschool out-of-the-box. Note that the self-collision changes are all in the Bullet repo, I don't think you need any custom modifications.

In addition, it contains all the fixes I had to make to run on latest Mac OSX (Sierra 10.12 and High Sierra 10.13).

Finally, this will first try to connect to SHARED_MEMORY, if it fails use DIRECT mode. This will let me easier debug thing outside of Roboschool: spawn a pybullet server in 'connect(p.GUI_SERVER) etc.

If/when you are happy, we could create some tagged release in Bullet, so you don't get surprising regressions.

https://github.com/bulletphysics/bullet3 using
the new Extras/BulletRobotics library.
First try to connect to SHARED_MEMORY, if it fails use DIRECT mode.
@urbanintell
Copy link

@erwincoumans I am trying to get this running on the latest version of macOS, but I am running into this error:

Complete output from command python setup.py egg_info:
found resource files: 201
running egg_info
Mac, assumed python3, homebrew branch
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
Mac, assumed python3, homebrew branch
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/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include -I/usr/local/opt/qt/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/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
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/include -I/usr/local/opt/qt/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/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 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/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include -I/usr/local/opt/qt/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/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 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/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include -I/usr/local/opt/qt/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/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 render-glwidget.cpp -o.build-release/render-glwidget.o -MMD -MF .build-release/render-glwidget.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/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include -I/usr/local/opt/qt/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/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 render-hud.cpp -o.build-release/render-hud.o -MMD -MF .build-release/render-hud.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/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include -I/usr/local/opt/qt/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/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 render-simple.cpp -o.build-release/render-simple.o -MMD -MF .build-release/render-simple.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/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include -I/usr/local/opt/qt/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/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 render-simple-primitives.cpp -o.build-release/render-simple-primitives.o -MMD -MF .build-release/render-simple-primitives.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/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include -I/usr/local/opt/qt/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/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 python-binding.cpp -o.build-release/python-binding.o -MMD -MF .build-release/python-binding.o.dep
gcc -shared -o../cpp_household.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/python-binding.o -L/usr/local/Cellar/boost-python/1.64.0/lib -framework OpenGL -lstdc++ pkg-config --libs Qt5OpenGL Qt5Widgets tinyxml assimp python-3.6 -Lbullet_local_install/lib -lLinearMath -lBullet3Common -lBulletCollision -lBulletDynamics -lBulletInverseDynamics -lBulletRobotics -lboost_python3
ld: warning: directory not found for option '-L/usr/local/Cellar/boost-python/1.64.0/lib'
ld: library not found for -lboost_python3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [../cpp_household.so] Error 1
cd /Users/lusenii/Developer/roboschool/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

@olegklimov
Copy link
Contributor

Oh, just found this. Looks great!

@erwincoumans
Copy link
Author

erwincoumans commented Sep 17, 2017

There are some issues we are tracking down. We are converting the Roboschool envs to pybullet in a compatible way so we can exchange trained weights. Some envs work (such as Ant), but cheetah and hopper doesn't yet. We are tracking this down now here:

https://github.com/bulletphysics/bullet3/pull/1320/files/73877901f74f1791653dfe4d8d8a1fa26122962b..a27b865ed5eb29d27ff5c51c87745ce48f5c9aa8

Also, I fixed the MJCF capsule conversion code for TinyRenderer, and this breaks Roboschool. I'll look into a fix that works for both, or otherwise create some flag that Roboschool can call (during loadMJCF) for backwards compatibility of the rendering.

The capsule change is in this commit:
bulletphysics/bullet3@ec18adb

@akovac35
Copy link

Hello, I am following up on this request - it seems the idea is to stop using a separate fork of Bullet - that would be great because Bullet has a lot of contributors and is frequently updated. Is there any reason for using a Bullet fork and not the original Bullet?

@erwincoumans
Copy link
Author

erwincoumans commented Feb 22, 2018

Hi @akovac35 , you can also just use PyBullet, it has most of the Roboschool environments and several other envs. It is this simple:

sudo pip install pybullet
python -m pybullet_envs.examples.enjoy_TF_HumanoidFlagrunHarderBulletEnv_v1_2017jul

PyBullet Quickstart Guide is here.

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