AUGUR Digital Twin
Co-simulation coupling
AUGUR can be coupled to any multibody simulator (such as MuJoCo) that exchanges joint states and shaft loads with the virtual actuator models.
Pulsar SDK supports two coupling architectures, depending on your robot and scene requirements:
| Approach | Best suited for | Simulator stepping |
|---|---|---|
| Inverse-dynamics coupling | Fixed-base robots where every actuated joint is owned by AUGUR and zero shaft compliance is desired. | Impose \((q, \dot q, \ddot q)\) and evaluate inverse dynamics (mj_inverse). |
| Compliant-shaft coupling | Floating-base robots (humanoids, quadrupeds, mobile manipulators), stiff contacts, free objects (freejoint), heavy links, and mixed non-Pulsar actuators (e.g. grippers). |
Normal forward dynamics (mj_step()) coupled through a stiff torsional spring-damper. |
Both approaches share the same core boundary rule: AUGUR owns what is inside the actuator envelope (motor rotor inertia, reflected gearbox inertia \(J_{\text{eq}}\), internal friction, FOC current loop, firmware control modes, and limits), while the external simulator owns everything attached to the actuator (link inertia, gravity, mechanism compliance, contacts, free bodies, and external forces). Do not duplicate motor rotor inertia (armature="0"), reflected gearbox inertia, or internal drivetrain losses in the external simulator.
Inverse-dynamics coupling (fixed-base robots)
In inverse-dynamics coupling, there is one strict ownership rule:
- AUGUR owns and integrates each coupled actuator's position and velocity.
- The external simulator owns the robot links, inertia, gravity, contacts, constraints, and other mechanism dynamics.
Do not let both systems integrate the same joint. The simulator calculates the load for an AUGUR-owned joint without forward-integrating that joint or applying a second actuator model to it.
AUGUR's interface
Each virtual actuator acts as a stateful function:
where:
- \(x_a\) is AUGUR's internal actuator state (matching all values reported by the physical actuator);
- \(u\) is the command sent through Pulsar SDK;
- \(\tau_L\) is the external load at the actuator output shaft, in N·m (positive load opposes positive output motion);
- \(q\) and \(\dot q\) are output-shaft position and velocity, in rad and rad/s;
- \(\Delta t_c\) is the coupling interval.
Use the same positive direction for the AUGUR output shaft and the corresponding robot joint. Pass the simulator's required joint load to AUGUR in that natural joint sign; no additional sign inversion is needed.
Robot dynamics
For \(n\) coupled joints:
where \(M(q)\) is the joint-space mass matrix, \(h(q, \dot q)\) contains gravity, Coriolis, centrifugal, passive, constraint, and contact terms, and \(\tau_{\mathrm{ext}}\) contains separately applied generalized forces. The external simulator evaluates inverse dynamics:
Coupling timestep
AUGUR's internal timestep is
Choose a coupling interval that is an integer multiple of this timestep:
For example, configuring telemetry_rate_hz = 1000 sets \(\Delta t_c = 0.001\ \mathrm{s}\) (\(N = 20\) AUGUR ticks per VirtualWorld.step() call). All actuators in one VirtualWorld advance together.
Exchange algorithm
During exchange \(k\), AUGUR uses the load calculated at the previous exchange:
- Hold \(\tau_{L,k-1}\) constant and advance every virtual actuator by \(\Delta t_c\).
- Read the new output-shaft state \(q_k\) and \(\dot q_k\) from AUGUR.
- Optionally estimate acceleration using the validated first-order 10 Hz low-pass filter (initialized with \(\dot q_{-1} = 0\), \(\ddot q_{-1} = 0\)):
$$ \ddot q_k^{\mathrm{raw}} = \frac{\dot q_k-\dot q_{k-1}}{\Delta t_c}, \qquad \alpha = 1-e^{-2\pi(10)\Delta t_c}, \qquad \ddot q_k = \ddot q_{k-1} + \alpha\left(\ddot q_k^{\mathrm{raw}}-\ddot q_{k-1}\right). $$
- Impose \(q_k\), \(\dot q_k\), and \(\ddot q_k\) on the corresponding robot joints without forward-integrating those joints in the external simulator.
- Refresh kinematics, contacts, and constraints, then evaluate inverse dynamics.
- Read the required joint load \(\tau_{L,k}\), subtracting any separately applied generalized forces already included in the simulator result.
- Pass \(\tau_{L,k}\) to AUGUR for the next exchange.
Scope of inverse-dynamics coupling
This partition covers fixed-base robots where every independently actuated coordinate is owned by AUGUR. Floating-base robots, free objects with contact dynamics, very heavy links (\(M_{\text{link}} \gg J_{\text{eq}}\)), or mixed actuator ownership require forward-integrated simulator dynamics — use compliant-shaft coupling below for those scenes.
Compliant-shaft coupling (floating base, contacts, and free bodies)
Use compliant-shaft (virtual coupling) co-simulation when your scene needs normal simulator forward dynamics (mj_step() in MuJoCo), including:
- floating-base robots (humanoids, quadrupeds, mobile manipulators);
- free bodies (
<freejoint/>), grasped objects, and object-to-object collisions; - stiff contacts (standard MuJoCo
solref="0.02 1"); - heavy robot links (\(M_{\text{link}} \gg J_{\text{eq}}\)) without mass-ratio instability;
- non-Pulsar actuators (e.g. standard MuJoCo grippers or passive joints) in the same scene.
How compliant-shaft coupling works
Instead of imposing joint positions with inverse dynamics, each AUGUR output shaft \((q_{\text{dt}}, v_{\text{dt}})\) is coupled to its matching simulator joint \((q_{\text{mj}}, v_{\text{mj}})\) through a stiff torsional spring-damper representing gearbox and shaft compliance:
At every exchange step (e.g. 1,000 Hz, \(\Delta t_c = 1.0\ \mathrm{ms}\), 20 AUGUR ticks):
- Read \((q_{\text{dt}}, v_{\text{dt}})\) from AUGUR and \((q_{\text{mj}}, v_{\text{mj}})\) from MuJoCo, and compute \(\tau_c\).
- Advance
VirtualWorldwith external load+tau_c(positive load opposes positive Digital Twin motion). - Apply
+tau_cto the matching MuJoCo joint (data.qfrc_applied[dof] = tau_c, assigning rather than accumulating+=, or via agear="1"motor) and callmj_step(model, data)(sub-stepping ifmodel.opt.timestep < dt).
Model setup rules
- Set
armature="0"on every Pulsar-actuated joint — AUGUR already models rotor and reflected gearbox inertia (\(J_{\text{eq}}\)). - Do not duplicate internal actuator friction or drivetrain damping in the simulator.
- Match units and positive joint direction: radians, rad/s, and N·m. Pass
+tau_cto both AUGUR's external load and MuJoCo's joint force. - Match initial joint states before step 1: AUGUR starts at
q_dt = 0.0 rad,v_dt = 0.0 rad/s. Start MuJoCo at0.0(or trackq_offset = q_mj_initand useq_mj - q_offsetin \(\tau_c\)) to avoid a startup torque impulse.
Recommended starting gains by actuator model
Because the spring-damper connects \(J_{\text{eq}}\) and \(M_{\text{link}}\) in series, the reduced coupling inertia is bounded above by \(J_{\text{eq}}\) regardless of link mass (\(J_{\text{red}} \le J_{\text{eq}}\)). Explicit stability requires \(\omega_n \Delta t_c \le 0.6\text{–}0.8\) with \(\omega_n = \sqrt{K_c / J_{\text{eq}}}\) and \(B_c = 2 \zeta \sqrt{K_c J_{\text{eq}}}\) (\(\zeta \approx 0.7\text{–}1.0\)):
| Model | Reflected inertia \(J_{\text{eq}}\) (kg·m²) | 1,000 Hz (\(\Delta t_c = 1.0\ \mathrm{ms}\)): \(K_c\) / \(B_c\) |
2,000 Hz (\(\Delta t_c = 0.5\ \mathrm{ms}\)): \(K_c\) / \(B_c\) |
|---|---|---|---|
P90 |
0.000256 |
100 N·m/rad / 0.25 N·m·s/rad |
400 N·m/rad / 0.50 N·m·s/rad |
P100 |
0.000583 |
220 N·m/rad / 0.57 N·m·s/rad |
880 N·m/rad / 1.15 N·m·s/rad |
PULSE98-30G |
0.008075 |
3,000 N·m/rad / 7.9 N·m·s/rad |
12,000 N·m/rad / 15.8 N·m·s/rad |
PULSE98-55G |
0.03230 |
12,000 N·m/rad / 31.5 N·m·s/rad |
48,000 N·m/rad / 63.0 N·m·s/rad |
PULSE115-60G |
0.01303 |
5,000 N·m/rad / 13.0 N·m·s/rad |
20,000 N·m/rad / 26.0 N·m·s/rad |
PULSE115-110G |
0.05211 |
20,000 N·m/rad / 51.5 N·m·s/rad |
80,000 N·m/rad / 103.0 N·m·s/rad |
(Values target \(\omega_n \Delta t_c \approx 0.61\text{–}0.62\) and \(\zeta \approx 0.80\). Scaling the exchange rate by \(s\) scales maximum stable \(K_c\) by \(s^2\) and \(B_c\) by \(s\).)
Compliant-shaft exchange loop
Setting telemetry_rate_hz = 1000.0 configures one VirtualWorld.step(...) call to advance exactly 20 internal ticks (1.0 ms):
import mujoco
from pulsar_sdk import (
ControlConfiguration,
ControlParams,
Mode,
PulsarActuatorVirtual,
TelemetryItems,
VirtualWorld,
)
KC = 5_000.0 # PULSE115-60G @ 1,000 Hz
BC = 13.0
model = mujoco.MjModel.from_xml_path("robot_scene.xml")
data = mujoco.MjData(model)
model.opt.timestep = 0.001 # match dt = 1.0 ms (or 0.0005 with 2 sub-steps)
joint_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_JOINT, "shoulder")
qpos_adr = model.jnt_qposadr[joint_id]
dof_adr = model.jnt_dofadr[joint_id]
model.dof_armature[dof_adr] = 0.0 # AUGUR already owns rotor + gearbox inertia
world = VirtualWorld()
shoulder = PulsarActuatorVirtual(world, model="PULSE115-60G", address=1)
with shoulder:
shoulder.configure(
ControlConfiguration(
Mode.IMPEDANCE,
(TelemetryItems.POSITION, TelemetryItems.VELOCITY),
telemetry_rate_hz=1_000.0,
)
)
shoulder.enable()
shoulder.set_command({
ControlParams.COMMAND: 0.25,
ControlParams.IMPEDANCE_STIFFNESS: 400.0,
ControlParams.IMPEDANCE_DAMPING: 12.0,
ControlParams.IMPEDANCE_INERTIA: 1.0,
})
data.qpos[qpos_adr] = 0.0
data.qvel[dof_adr] = 0.0
mujoco.mj_forward(model, data)
for _ in range(1_000): # 1.0 s of co-simulation
telem = shoulder.read_telemetry(
(TelemetryItems.POSITION, TelemetryItems.VELOCITY)
)
q_dt = float(telem[TelemetryItems.POSITION])
v_dt = float(telem[TelemetryItems.VELOCITY])
tau_c = KC * (q_dt - float(data.qpos[qpos_adr])) + BC * (
v_dt - float(data.qvel[dof_adr])
)
# Advances 1.0 ms (20 AUGUR ticks) at 1,000 Hz telemetry cadence
world.step(loads_by_address={1: tau_c})
data.qfrc_applied[dof_adr] = tau_c
mujoco.mj_step(model, data)
shoulder.disable()
use std::collections::BTreeMap;
use pulsar_rs_sdk::{
PulsarActuatorVirtual, TelemetryItem, VirtualWorld,
};
const KC: f64 = 5_000.0; // PULSE115-60G @ 1,000 Hz
const BC: f64 = 13.0;
fn coupling_step(
world: &VirtualWorld,
joint: &PulsarActuatorVirtual,
joint_addr: u16,
q_mj: f64,
v_mj: f64,
) -> pulsar_rs_sdk::Result<f64> {
// 1. Read Digital Twin shaft state
let telem = joint.read_telemetry(&[TelemetryItem::Position, TelemetryItem::Velocity])?;
let q_dt = telem[&TelemetryItem::Position].as_f64();
let v_dt = telem[&TelemetryItem::Velocity].as_f64();
// 2. Compute compliant-shaft coupling torque
let tau_c = KC * (q_dt - q_mj) + BC * (v_dt - v_mj);
// 3. Advance VirtualWorld by one 1,000 Hz exchange interval (20 ticks = 1.0 ms)
let loads = BTreeMap::from([(joint_addr, tau_c)]);
world.step_with_loads(&loads)?;
// 4. Assign +tau_c to MuJoCo (data.qfrc_applied[dof] = tau_c) and call mj_step()
Ok(tau_c)
}
For multi-joint robots, compute \(\tau_c\) for every coupled joint, pass all loads in a single world.step(loads_by_address=...) / world.step_with_loads(...) (or loads_by_name / step_with_loads_and_names(...)) call, assign all coupled data.qfrc_applied[dof] entries, and step MuJoCo once per exchange (or sub-step round(dt / model.opt.timestep) times for stiff free-body contacts).
Because \(K_c\) sits in series with impedance stiffness \(K\), the effective link stiffness is \(K_{\text{eff}} = (K \cdot K_c) / (K + K_c)\). Raise the exchange rate to 2,000 Hz if stiffer tracking under high loads is required.
Validation
Validate every robot model and coupling implementation with:
- No-load motion matching the standalone AUGUR actuator;
- Joint-load direction and magnitude checks (gravity / passivity in
TORQUEmode with0.0 N·mcommand); - Constant external torque tests;
- Trajectory convergence as the exchange rate increases (e.g. 500, 1,000, and 2,000 Hz);
- Bounded uncommanded energy and passive settling;
- Multi-joint cross-inertial coupling;
- Finite contact loads, bounded penetration, and converging contact trajectories (and free-body momentum transfer when using compliant-shaft coupling);
- Joint-limit and collision behavior.
See Robot modelling for constructing the external robot model in URDF, MJCF, SDF, OpenUSD, or another simulator format.