Convert Figma logo to code with AI

dartsim logodart

DART: Dynamic Animation and Robotics Toolkit

1,006
288
1,006
164

Top Related Projects

13,608

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

1,564

Flexible Collision Library

3,733

Model-based design and verification for robotics.

Quick Overview

DART (Dynamic Animation and Robotics Toolkit) is an open-source library for developing robotics and physically-based simulation applications. It provides a comprehensive set of tools for modeling, simulation, and control of articulated rigid body systems, with a focus on robotics and biomechanics.

Pros

  • Highly flexible and extensible architecture
  • Efficient dynamics algorithms for real-time simulation
  • Comprehensive set of collision detection algorithms
  • Strong support for various types of joints and actuators

Cons

  • Steeper learning curve compared to some other robotics libraries
  • Documentation could be more comprehensive for advanced features
  • Limited built-in visualization tools (relies on external libraries)
  • Smaller community compared to some other robotics frameworks

Code Examples

  1. Creating a simple pendulum:
#include <dart/dart.hpp>

int main() {
    auto world = std::make_shared<dart::simulation::World>();
    auto skeleton = dart::dynamics::Skeleton::create("pendulum");

    auto joint = skeleton->createJointAndBodyNodePair<dart::dynamics::RevoluteJoint>().first;
    joint->setAxis(Eigen::Vector3d::UnitY());

    auto body = joint->getChildBodyNode();
    auto shape = std::make_shared<dart::dynamics::BoxShape>(Eigen::Vector3d(0.1, 0.1, 1.0));
    body->createShapeNodeWith<dart::dynamics::VisualAspect, dart::dynamics::CollisionAspect>(shape);

    world->addSkeleton(skeleton);
    return 0;
}
  1. Applying force to a body:
auto body = skeleton->getBodyNode("body_name");
Eigen::Vector3d force(0.0, 0.0, 10.0);
Eigen::Vector3d offset(0.1, 0.0, 0.0);
body->addExtForce(force, offset);
  1. Setting up a collision detector:
auto collisionDetector = dart::collision::FCLCollisionDetector::create();
world->getConstraintSolver()->setCollisionDetector(collisionDetector);

Getting Started

  1. Install DART dependencies:

    sudo apt-get install libeigen3-dev libassimp-dev libccd-dev libfcl-dev libboost-all-dev libopenscenegraph-dev
    
  2. Clone and build DART:

    git clone https://github.com/dartsim/dart.git
    cd dart
    mkdir build && cd build
    cmake ..
    make -j4
    sudo make install
    
  3. Include DART in your project's CMakeLists.txt:

    find_package(DART REQUIRED)
    target_link_libraries(your_target dart)
    

Competitor Comparisons

13,608

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

Pros of Bullet3

  • Widely adopted in game development and robotics simulations
  • Extensive documentation and community support
  • Highly optimized for performance, especially in real-time applications

Cons of Bullet3

  • Less focus on accuracy compared to DART
  • More complex API, steeper learning curve for beginners
  • Limited built-in support for articulated rigid body dynamics

Code Comparison

DART example (inverse kinematics):

InverseKinematics* ik = new InverseKinematics(bodyNode);
ik->addTargetTranslationalConstraint(bodyNode, desiredPosition);
ik->solve();

Bullet3 example (rigid body creation):

btCollisionShape* shape = new btSphereShape(1.0);
btDefaultMotionState* motionState = new btDefaultMotionState();
btRigidBody::btRigidBodyConstructionInfo rbInfo(mass, motionState, shape);
btRigidBody* body = new btRigidBody(rbInfo);

Both DART and Bullet3 are powerful physics engines, but they cater to different needs. DART excels in accuracy and articulated body simulations, while Bullet3 shines in performance-critical applications and game development. The choice between them depends on the specific requirements of your project.

1,564

Flexible Collision Library

Pros of FCL

  • Specialized in collision detection and distance computation
  • Supports a wide range of geometric primitives and collision algorithms
  • Lightweight and can be easily integrated into other projects

Cons of FCL

  • Limited to collision detection and distance computation
  • Lacks built-in dynamics simulation capabilities
  • May require additional libraries for complete robotics simulations

Code Comparison

FCL (collision detection):

fcl::CollisionObject<double> obj1(shape1);
fcl::CollisionObject<double> obj2(shape2);
fcl::CollisionRequest<double> request;
fcl::CollisionResult<double> result;
fcl::collide(&obj1, &obj2, request, result);

DART (physics simulation):

dart::dynamics::SkeletonPtr robot = dart::dynamics::Skeleton::create("robot");
dart::simulation::WorldPtr world = dart::simulation::World::create();
world->addSkeleton(robot);
world->step();

Summary

FCL is a specialized library for collision detection and distance computation, while DART is a more comprehensive dynamics and simulation toolkit. FCL excels in its focused functionality and can be easily integrated into other projects. DART, on the other hand, provides a full-featured environment for robotics simulation, including physics, kinematics, and collision detection. The choice between the two depends on the specific requirements of your project and whether you need a complete simulation framework or just collision detection capabilities.

3,733

Model-based design and verification for robotics.

Pros of Drake

  • More comprehensive toolset for robotics simulation and control
  • Stronger integration with optimization and planning algorithms
  • Better support for multi-body dynamics and contact mechanics

Cons of Drake

  • Steeper learning curve due to its complexity
  • Heavier computational requirements for some simulations
  • Less flexible for real-time applications compared to DART

Code Comparison

Drake example (Python):

import pydrake.all as drake

builder = drake.systems.DiagramBuilder()
plant, scene_graph = drake.multibody.plant.AddMultibodyPlantSceneGraph(builder, time_step=0.0)
parser = drake.multibody.parsing.Parser(plant)
parser.AddModelFromFile("model.urdf")
plant.Finalize()

DART example (C++):

#include <dart/dart.hpp>

auto world = std::make_shared<dart::simulation::World>();
auto skeleton = dart::dynamics::Skeleton::create("robot");
dart::utils::DartLoader loader;
skeleton = loader.parseSkeleton("model.urdf");
world->addSkeleton(skeleton);

Both libraries provide powerful tools for robotics simulation, but Drake offers a more comprehensive ecosystem for advanced robotics applications, while DART focuses on real-time performance and flexibility. Drake's integration with optimization tools makes it suitable for complex planning tasks, whereas DART's lightweight design allows for faster simulations in certain scenarios.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

DART


DART: Dynamic Animation and Robotics Toolkit

DART (Dynamic Animation and Robotics Toolkit) is an open-source library that provides data structures and algorithms for kinematic and dynamic applications in robotics and computer animation. Renowned for its accuracy and stability, DART utilizes generalized coordinates to represent articulated rigid body systems and employs Featherstone's Articulated Body Algorithm to compute motion dynamics.

Getting Started

DART provides both C++ and Python interfaces, which can be installed using various package managers. For cross-platform compatibility, we recommend using Conda or Pixi.

C++

Cross-Platform (Recommended)

Conda:

conda install -c conda-forge dartsim-cpp

Pixi:

pixi add dartsim-cpp

Linux

Ubuntu:

sudo apt install libdart-all-dev

Arch Linux:

yay -S libdart

FreeBSD:

pkg install dartsim

macOS (Homebrew)

brew install dartsim

Windows (Vcpkg)

vcpkg install dartsim:x64-windows

Python

For the Python interface, we recommend using Conda or Pixi. Note that the PyPI package is being deprecated to reduce maintenance—contributions are welcome!

Conda:

conda install -c conda-forge dartpy

Pixi:

pixi add dartpy

PyPI (deprecated):

pip install dartpy

Documentation

For more information on DART, please visit the DART documentation: English | 한국어 (WIP)

An overview of DART is also available on DeepWiki.

Project Status

ItemStatus
BuildCI Ubuntu CI macOS CI Windows
Doc, Coverage, LinterAPI Documentation Documentation Status codecov Codacy Badge
PackagesPackaging status Anaconda-Server Badge PyPI Version
MaintenanceAverage time to resolve an issue Percentage of issues still open

Citation

If you use DART in an academic publication, please consider citing this JOSS Paper [BibTeX]