Tag Archives: dart

Mammal IK (and now dynamics) revisited

A while ago I derived some closed form solutions for the inverse force dynamics for a 2 dimensional mammal geometry leg.  Now that I want to execute more dynamic gaits, I need to be able to control the velocity and force of the 3 dimensional leg in real time.  That means I need to be able to go forward and back between the two representations.  The first being joint angles, joint velocities, and joint torques — the second being 3D position, velocity, and force.

Rather than derive those myself in 3 dimensions, I decided to save a bit of time now by using the DART kinematics and dynamics routines.  I might need to undo this later if it turns out to be too slow at runtime, but if nothing else it can be a good ground truth for anything I do myself.  I also took this opportunity to do all calculations in consistent rational coordinate frames, where before I had conventions that while documented, were rather unorthodox.

As it turns out, this demonstrated that my old 3 dimensional force calculation, was as I had expected, slightly incorrect.

ik_comparison.png

The shoulder torque was the most affected, being off by 20% or so.

The source is at:

Next up will be using this to actually control a real leg.

DART now in bazel_deps

A previous simulator I had built for Super Mega Microbot was based on the “DART” robotics toolkit.  It is a C++ library with python bindings that includes kinematics, dynamics, and graphical rendering capabilities under a BSD license.  I wanted to use some of its dynamics capabilities for future gait work on the quad A0, and eventually re-incorporate its simulation capabilities, so integrated a subset of it into mjbots/bazel_deps.