mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
update bullet so it actually works
Moved the addSourceDirectory for physics/Bullet into the Engine/Source/CMakeLists.txt file that way it can actually appear where we expect it to in the solution explorer.
This commit is contained in:
parent
c7be48130a
commit
13fa178cf6
5986 changed files with 1811270 additions and 453803 deletions
|
|
@ -1,24 +1,38 @@
|
|||
|
||||
[](https://travis-ci.org/bulletphysics/bullet3)
|
||||
[](https://ci.appveyor.com/project/erwincoumans/bullet3)
|
||||
|
||||
# Bullet 2.x including pybullet, Virtual Reality support
|
||||
# Bullet Physics SDK
|
||||
|
||||
This is the official repository of Bullet 2.x, moved from http://bullet.googlecode.com
|
||||
It includes the optional experimental Bullet 3 GPU pipeline.
|
||||
This is the official C++ source code repository of the Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
|
||||
|
||||
The Bullet 2 API will stay default and up-to-date while slowly moving to a new API.
|
||||
The steps towards a new API is in a nutshell:
|
||||

|
||||
|
||||
1. The old Bullet2 demos are being merged into the examples/ExampleBrowser
|
||||
2. A new physics-engine agnostic C-API is created, see examples/SharedMemory/PhysicsClientC_API.h
|
||||
3. Python bindings in pybullet are on top of this C-API, see examples/pybullet
|
||||
4. A Virtual Reality sandbox using openvr for HTC Vive and Oculus Rift is available
|
||||
5. The OpenCL examples in the ExampleBrowser can be enabled using --enable_experimental_opencl
|
||||
## Issues ##
|
||||
The Issue tracker was flooded with support questions and is closed until it is cleaned up. Use the [PyBullet forums](http://pybullet.org) to discuss with others.
|
||||
|
||||
You can still use svn or svn externals using the github git repository: use svn co https://github.com/bulletphysics/bullet3/trunk
|
||||
## PyBullet ##
|
||||
It is highly recommended to use PyBullet Python bindings for improved support for robotics, reinforcement learning and VR. Use pip install pybullet and checkout the [PyBullet Quickstart Guide](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#heading=h.2ye70wns7io3).
|
||||
|
||||
## Requirements for Bullet 2
|
||||
Installation is simple:
|
||||
```
|
||||
pip3 install pybullet --upgrade --user
|
||||
python3 -m pybullet_envs.examples.enjoy_TF_AntBulletEnv_v0_2017may
|
||||
python3 -m pybullet_envs.examples.enjoy_TF_HumanoidFlagrunHarderBulletEnv_v1_2017jul
|
||||
python3 -m pybullet_envs.deep_mimic.testrl --arg_file run_humanoid3d_backflip_args.txt
|
||||
```
|
||||
|
||||
If you use PyBullet in your research, please cite it like this:
|
||||
|
||||
```
|
||||
@MISC{coumans2021,
|
||||
author = {Erwin Coumans and Yunfei Bai},
|
||||
title = {PyBullet, a Python module for physics simulation for games, robotics and machine learning},
|
||||
howpublished = {\url{http://pybullet.org}},
|
||||
year = {2016--2021}
|
||||
}
|
||||
```
|
||||
|
||||
## Requirements for Bullet Physics C++
|
||||
|
||||
A C++ compiler for C++ 2003. The library is tested on Windows, Linux, Mac OSX, iOS, Android,
|
||||
but should likely work on any platform with C++ compiler.
|
||||
|
|
@ -28,9 +42,9 @@ Some optional demos require OpenGL 2 or OpenGL 3, there are some non-graphical d
|
|||
|
||||
https://docs.google.com/document/d/1u9vyzPtrVoVhYqQOGNWUgjRbfwfCdIts_NzmvgiJ144/edit
|
||||
|
||||
## Requirements for Bullet 3
|
||||
## Requirements for experimental OpenCL GPGPU support
|
||||
|
||||
The entire collision detection and rigid body dynamics is executed on the GPU.
|
||||
The entire collision detection and rigid body dynamics can be executed on the GPU.
|
||||
|
||||
A high-end desktop GPU, such as an AMD Radeon 7970 or NVIDIA GTX 680 or better.
|
||||
We succesfully tested the software under Windows, Linux and Mac OSX.
|
||||
|
|
@ -44,47 +58,71 @@ track down the issue, but more work is required to cover all OpenCL kernels.
|
|||
All source code files are licensed under the permissive zlib license
|
||||
(http://opensource.org/licenses/Zlib) unless marked differently in a particular folder/file.
|
||||
|
||||
## Build instructions for Bullet using vcpkg
|
||||
|
||||
You can download and install Bullet using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
|
||||
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh
|
||||
./vcpkg integrate install
|
||||
./vcpkg install bullet3
|
||||
|
||||
The Bullet port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
||||
|
||||
## Build instructions for Bullet using premake. You can also use cmake instead.
|
||||
|
||||
**Windows**
|
||||
|
||||
Click on build_visual_studio.bat and open build3/vs2010/0MySolution.sln
|
||||
Click on build_visual_studio_vr_pybullet_double.bat and open build3/vs2010/0_Bullet3Solution.sln
|
||||
When asked, convert the projects to a newer version of Visual Studio.
|
||||
If you installed Python in the C:\ root directory, the batch file should find it automatically.
|
||||
Otherwise, edit this batch file to choose where Python include/lib directories are located.
|
||||
|
||||
**Windows Virtual Reality sandbox for HTC Vive and Oculus Rift**
|
||||
|
||||
Click on build_visual_studio_vr_pybullet_double.bat and open build3/vs2010/0MySolution.sln
|
||||
Edit this batch file to choose where Python include/lib directories are located.
|
||||
Build and run the App_SharedMemoryPhysics_VR project, preferably in Release/optimized build.
|
||||
You can connect from Python pybullet to the sandbox using:
|
||||
|
||||
```
|
||||
import pybullet as p
|
||||
p.connect(p.SHARED_MEMORY)
|
||||
p.connect(p.SHARED_MEMORY) #or (p.TCP, "localhost", 6667) or (p.UDP, "192.168.86.10",1234)
|
||||
```
|
||||
|
||||
**Linux and Mac OSX gnu make**
|
||||
|
||||
Make sure cmake is installed (sudo apt-get install cmake, brew install cmake, or https://cmake.org)
|
||||
|
||||
In a terminal type:
|
||||
```
|
||||
./build_cmake_pybullet_double.sh
|
||||
```
|
||||
This script will invoke cmake and build in the build_cmake directory. You can find pybullet in Bullet/examples/pybullet.
|
||||
The BulletExampleBrowser binary will be in Bullet/examples/ExampleBrowser.
|
||||
|
||||
cd build3
|
||||
|
||||
You can also build Bullet using premake. There are premake executables in the build3 folder.
|
||||
Depending on your system (Linux 32bit, 64bit or Mac OSX) use one of the following lines
|
||||
|
||||
./premake4_linux gmake
|
||||
./premake4_linux64 gmake
|
||||
./premake4_osx gmake
|
||||
|
||||
Using premake:
|
||||
```
|
||||
cd build3
|
||||
./premake4_linux --double gmake
|
||||
./premake4_linux64 --double gmake
|
||||
./premake4_osx --double --enable_pybullet gmake
|
||||
```
|
||||
Then
|
||||
```
|
||||
cd gmake
|
||||
make
|
||||
```
|
||||
|
||||
cd gmake
|
||||
make
|
||||
Note that on Linux, you need to use cmake to build pybullet, since the compiler has issues of mixing shared and static libraries.
|
||||
|
||||
**Mac OSX Xcode**
|
||||
|
||||
Click on build3/xcode4.command or in a terminal window execute
|
||||
|
||||
./premake_osx xcode4
|
||||
|
||||
```
|
||||
./premake_osx xcode4
|
||||
```
|
||||
## Usage
|
||||
|
||||
The App_ExampleBrowser executables will be located in the bin folder.
|
||||
|
|
@ -103,4 +141,4 @@ You can just run it though a terminal/command prompt, or by clicking it.
|
|||
You can use mouse picking to grab objects. When holding the ALT or CONTROL key, you have Maya style camera mouse controls.
|
||||
Press F1 to create a series of screenshots. Hit ESCAPE to exit the demo app.
|
||||
|
||||
See docs folder for further information.
|
||||
Check out the docs folder and the Bullet physics forums for further information.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue