-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from neachdainn/marco_dev
alpha release
- Loading branch information
Showing
30 changed files
with
7,923 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "bullet3/libbullet3"] | ||
path = bullet3/libbullet3 | ||
[submodule "rubullet-sys/bullet3/libbullet3"] | ||
path = rubullet-sys/bullet3/libbullet3 | ||
url = https://github.com/bulletphysics/bullet3.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
[package] | ||
name = "rubullet" | ||
version = "0.1.0" | ||
authors = ["Nathan Kent <[email protected]>"] | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
nalgebra = "0.21.0" | ||
|
||
[build-dependencies] | ||
cmake = "0.1.42" | ||
|
||
[dev-dependencies] | ||
easy-error = "0.3.1" | ||
[workspace] | ||
members = [ | ||
"rubullet", | ||
"rubullet-sys", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Nathan Kent, Marco Boneberger | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/neachdainn/rubullet/Rust) | ||
# RuBullet | ||
|
||
RuBullet is a Rust implementation of [PyBullet](https://pybullet.org/). | ||
In other words, it uses the [Bullet3](https://github.com/bulletphysics/bullet3) | ||
C API in order to expose a functionality that is similar to PyBullet. | ||
Development is ongoing and functionality is currently limited. | ||
|
||
## Status | ||
Right now RuBullet should cover most of the basic use cases. It can: | ||
* Create a PhysicsClient in either Direct or Gui mode | ||
* Load models from URDF, SDF or MuJoCo files | ||
* Create own models within the simulation | ||
* Control robots in position, velocity or torque mode | ||
* Calculate inverse dynamics, inverse kinematics, jacobians and mass matrices | ||
* Render camera images | ||
* Read information about links and joints | ||
* Change linear and angular damping of joints | ||
* Create GUI sliders, button or put debugging text or lines in the simulation | ||
* Get keyboard and mouse events | ||
|
||
Things which are not implemented yet: | ||
* Collision Detection Queries | ||
* Virtual Reality | ||
* Connect via SHARED_MEMORY, UDP or TCP | ||
* Plugins | ||
* Deformables and Cloth | ||
* Logging and saving states | ||
* Creating constraints | ||
* Set physics engine parameters | ||
* Change other dynamics parameters apart from linear and angular damping | ||
|
||
The API is unstable and subject to change. | ||
|
||
# Example | ||
```rust | ||
use std::{thread, time::Duration}; | ||
|
||
use anyhow::Result; | ||
use nalgebra::{Isometry3, Vector3}; | ||
use rubullet::*; | ||
|
||
fn main() -> Result<()> { | ||
let mut physics_client = PhysicsClient::connect(Mode::Gui)?; | ||
|
||
physics_client.set_additional_search_path("../rubullet-sys/bullet3/libbullet3/data")?; | ||
physics_client.set_gravity(Vector3::new(0.0, 0.0, -10.0))?; | ||
|
||
let _plane_id = physics_client.load_urdf("plane.urdf", Default::default())?; | ||
|
||
let cube_start_position = Isometry3::translation(0.0, 0.0, 1.0); | ||
let box_id = physics_client.load_urdf( | ||
"r2d2.urdf", | ||
UrdfOptions { | ||
base_transform: cube_start_position, | ||
..Default::default() | ||
}, | ||
)?; | ||
|
||
for _ in 0..10000 { | ||
physics_client.step_simulation()?; | ||
thread::sleep(Duration::from_micros(4167)); | ||
} | ||
|
||
let cube_transform = physics_client.get_base_transform(box_id)?; | ||
println!("{}", cube_transform); | ||
|
||
Ok(()) | ||
} | ||
``` | ||
|
||
## Bug reports and Merge Requests | ||
The current development happens as a part of marcbone's master thesis. Therefore, merge requests can not be accepted until | ||
July 5, 2021. We are disabling merge requests until then which sadly also disables issues. If you find any bugs or have suggestions please write an email to | ||
one of the maintainers. | ||
|
||
## License | ||
RuBullet is licensed under MIT | ||
|
Submodule libbullet3
deleted from
830f0a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "rubullet-sys" | ||
version = "0.1.0-alpha" | ||
authors = ["Nathan Kent <[email protected]>", "Marco Boneberger <[email protected]>"] | ||
edition = "2018" | ||
license = "MIT" | ||
repository = "https://github.com/neachdainn/rubullet" | ||
description = "Compiles bullet3 and exposes rust bindings to the C API" | ||
categories =["science::robotics","simulation"] | ||
keywords =["pybullet","bullet","bullet3","physics","robotics"] | ||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[lib] | ||
name = "rubullet_sys" | ||
src = "src/lib.rs" | ||
|
||
|
||
[build-dependencies] | ||
cmake = "0.1.42" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Submodule libbullet3
added at
df09fd
Oops, something went wrong.