YARS is a physics-based robot simulation platform built with C++17, featuring real-time 3D visualization using OGRE 14 and Bullet Physics for accurate rigid body dynamics.
- Physics Simulation: Powered by Bullet Physics for realistic rigid body dynamics
- 3D Visualization: OGRE 14 rendering with GL3Plus (OpenGL 3.3+)
- XML Configuration: Flexible robot and environment definition via XML/XSD schemas
- Modular Controllers: Plugin architecture for robot controllers
- Multi-platform: macOS support (Linux planned)
- Logging System: CSV, file, console, and Blender export logging
macOS:
brew install cmake xerces-c bullet sdl2 cli11git clone --recursive https://github.com/kzahedi/YARS.git
cd YARS
mkdir build && cd build
cmake ..
make -j$(sysctl -n hw.ncpu)# From build directory
./bin/yars ../xml/braitenberg.xml
# From anywhere (specify lib path for controllers)
./bin/yars --lib /path/to/YARS/build/lib /path/to/YARS/xml/hexapod.xml| Action | Control |
|---|---|
| Look around | Left mouse drag |
| Strafe (move sideways/up/down) | Middle drag or Shift+Left drag |
| Move forward/backward | Right mouse drag (vertical) |
| Move forward/backward | Scroll wheel |
./bin/yars --help # Show all options
./bin/yars --lib <path> # Path to controller libraries
./bin/yars --nogui # Run without visualization
./bin/yars --iterations <n> # Run for n iterations
./bin/yars --realtime # Real-time mode
./bin/yars --follow <mode> # Camera follows robot (0=Orbit, 1=Tripod, 2=Offset, 3=CenterOrbit)
./bin/yars --osd # Show on-screen display (stats/info)Requires FFmpeg. Enable with cmake -DYARS_USE_CAPTURE_VIDEO=ON.
./bin/yars --capture --captureFrameRate 30 --captureDirectory ./videos ../xml/braitenberg.xml- Building Guide - Detailed build instructions
- Architecture Overview - System design and components
YARS/
├── src/yars/ # Core source code
│ ├── configuration/ # XML/XSD configuration parsing
│ ├── physics/ # Bullet physics integration
│ ├── view/ # Visualization (OGRE 14 + SDL2)
│ ├── main/ # Application control
│ └── util/ # Utilities and helpers
├── contrib/ # Controllers and client libraries
├── materials/ # OGRE materials and textures
├── shaders/ # GLSL shaders for GL3Plus
├── meshes/ # 3D model files
├── fonts/ # Rendering fonts
├── xml/ # Example simulation configurations
└── cmake/ # CMake build modules
| Library | Version | Purpose |
|---|---|---|
| CMake | 3.16+ | Build system |
| CLI11 | 2.x | Command-line parsing |
| Xerces-C | 3.x | XML parsing |
| Bullet | 3.x | Physics simulation |
| OGRE | 14.x | 3D rendering |
| SDL2 | 2.x | Window/input handling |
| FFmpeg | 4.x+ | Video capture (optional) |
YARS supports multiple controller types:
- Built-in controllers: Braitenberg2a/2b/3a/3b, Hexapod, Sine, SquareWave, ConstantValue
- Python controllers: Requires Python development headers
- TCP/IP controllers: For external controller processes
- Named Pipe controllers: For local IPC
<controller module="Python" frequency="10">
<parameter name="module" value="hexapod"/>
<parameter name="working directory" value="../contrib/controller"/>
</controller>- macOS: The message
UNSUPPORTED: gldCopyBufferSubData: NEEDS IMPLEMENTATIONappears but doesn't affect functionality - OGRE 14 with GL3Plus requires shader-based rendering (no fixed-function pipeline)
Current version: 0.7.28
See version.h for detailed change log.
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
Fonts: fontspace.com
Images:
- CBT.jpg - flickr/stallio
- wall.jpg - agf81/deviantart
- clouds.jpg - ode.org
Keyan Ghazi-Zahedi
- OGRE Team for the excellent 3D rendering engine
- Bullet Physics for the physics simulation library