Skip to content

one-for-all/gorilla-physics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

509 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gorilla Physics Engine (for robotics in Rust)

I used Rapier before, but it did not seem to be quite made for robotics, and was missing some features I needed, so I embarked on this journey to build a physics engine myself.

I am learning a lot as I build it, so it is also a learning project for me.

Getting Started

Testing

Run all tests in lib:

cargo test --lib -- --nocapture

optionally w/ GPU implementation:

cargo test --lib --features gpu -- --nocapture

Execution

Run the acrobot example:

cargo run --bin acrobot

optionally w/ GPU implementation:

cargo run --bin acrobot --features gpu

It should generate a plot ("acrobot swingup energy.png") that shows the total energy of the system against time.

Profiling

Profile the run-time of an example:

samply record cargo run --bin acrobot

This would run the example, and show profiling result & flame graph in browser, assuming samply is installed, and Firefox profiler plugin (in Chrome) is installed.

Profile the optimized run-time of an example

samply record cargo run --profile profiling --bin acrobot

References

It mainly implements the theory in Roy Featherstone's book Rigid Body Dynamics Algorithm.

Also built with a lot of references to Julia package RigidBodyDynamics.jl.

And with the help of a lot of papers. They are referenced in code when used.

About

3D Physics Engine for Robotics in Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages