lucasw / simple_sim_ros

Minimally featured but fast ROS physics simulation wrapping bullet
GNU General Public License v3.0
43 stars 11 forks source link

look at latest pybullet for bullet_server #14

Open lucasw opened 6 years ago

lucasw commented 6 years ago

Is python now a better interface than C++, and bullet_server should support it?

lucasw commented 6 years ago
git clone https://github.com/bulletphysics/bullet3.git
mkdir build_bullet3
cd build_bullet3
cmake ../bullet3
../OpenGLWindow/libOpenGLWindow.a(glew.o): In function `_glewInit_GL_ARB_window_pos':
glew.c:(.text+0x7f3): undefined reference to `dlsym'

Try what is in build_cmake_pybullet_double.sh

cmake -DBUILD_PYBULLET=ON -DBUILD_PYBULLET_NUMPY=OFF -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release ../bullet3
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_LIBRARY (ADVANCED)
    linked by target "pybullet" in directory /home/lucasw/other2/bullet3/examples/pybullet

Run cmake-gui and set PYTHON_LIBRARY to /usr/lib/x86_64-linux-gnu/libpython2.7.so

Now it builds.

lucasw commented 6 years ago

Run examples

cd build_bullet3/examples/pybullet
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
python ../../../bullet3/examples/pybullet/examples/hello_pybullet.py 
pybullet build time: Sep  5 2017 08:07:18
startThreads creating 1 threads.
starting thread 0
started thread 0 
argc=4
argv[0] = unused
argv[1] = 
argv[2] = --logtostderr
argv[3] = --start_demo_name=Physics Server
ExampleBrowserThreadFunc started
X11 functions dynamically loaded using dlopen/dlsym OK!
glewXInit dynamically loaded using dlopen/dlsym OK
glewXInit OK
Creating context
Created GL 3.0 context
Direct GLX rendering context obtained
Making context current
glewOpenGL11Init dynamically loaded using dlopen/dlsym OK
glewOpenGL11Init OK!
GL_VENDOR=Intel Open Source Technology Center
GL_RENDERER=Mesa DRI Intel(R) Haswell Mobile 
GL_VERSION=4.3 (Core Profile) Mesa 17.0.7
GL_SHADING_LANGUAGE_VERSION=4.30
pthread_getconcurrency()=0
b3Printf: Selected demo: Physics Server
startThreads creating 1 threads.
starting thread 0
started thread 0 
MotionThreadFunc thread started
ven = Intel Open Source Technology Center
Workaround for some crash in the Intel OpenGL driver on Linux/Ubuntu