Pulsar SDK
Virtual actuators
PulsarActuatorVirtual runs a validated AUGUR Digital Twin actuator model inside a deterministic VirtualWorld (fixed 20,000 Hz / 50 µs internal timestep).
Install assets
Install pulsar-assets alongside either SDK using Pixi:
Supported models:
P90P100PULSE98-30GPULSE98-55GPULSE115-60GPULSE115-110G
Create, configure, and step
from pulsar_sdk import (
ControlConfiguration,
Mode,
PulsarActuatorVirtual,
TelemetryItems,
VirtualWorld,
)
world = VirtualWorld()
actuator = PulsarActuatorVirtual(world, model="PULSE115-60G", address=1)
with actuator:
actuator.configure(
ControlConfiguration(
Mode.POSITION,
(TelemetryItems.POSITION, TelemetryItems.VELOCITY),
telemetry_rate_hz=500,
)
)
actuator.enable()
actuator.set_command(0.5)
for _ in range(100):
world.step()
actuator.disable()
use pulsar_rs_sdk::{
ControlConfiguration, Mode, PulsarActuatorVirtual, TelemetryItem,
VirtualWorld,
};
let world = VirtualWorld::new()?;
let actuator = PulsarActuatorVirtual::new(&world, "PULSE115-60G", Some(1))?;
actuator.connect()?;
actuator.configure(&ControlConfiguration::new(
Mode::Position,
[TelemetryItem::Position, TelemetryItem::Velocity],
500.0,
)?)?;
actuator.enable()?;
actuator.set_command(0.5)?;
for _ in 0..100 {
world.step()?;
}
actuator.disable()?;
actuator.disconnect()?;
Without an explicit asset path, VirtualWorld automatically locates pulsar-assets from PULSAR_ASSETS_PATH, the active Pixi/Conda prefix, or an adjacent share/pulsar-assets directory.
How VirtualWorld.step() advances time
- Finds the earliest next periodic telemetry event among connected virtual actuators (or advances one
50 µstick if periodic telemetry is disabled). - Applies supplied external shaft loads across those internal model ticks.
- Advances connected models in registration order.
- Delivers due telemetry and waits for due actuator/group callbacks to complete.
- Returns after callback commands are stored for the next step.
Disconnected actuators do not participate in stepping.
External shaft loads
Pass finite external output-shaft torques in N·m keyed by actuator address or unique group member name. Positive load opposes positive output motion:
use std::collections::BTreeMap;
// By virtual address:
let by_addr = BTreeMap::from([(1_u16, 0.25_f64)]);
world.step_with_loads(&by_addr)?;
// Or by address and/or unique group member name (Rust 1.1.0):
let by_name = BTreeMap::from([("shoulder".to_string(), 0.25_f64)]);
world.step_with_loads_and_names(&BTreeMap::new(), &by_name)?;
Passive states and isolation
- In
INIT_CONFIGandCONFIG_AND_TELEM, virtual actuators remain mechanically movable under external load with passive zero torque. Telemetry is unavailable inINIT_CONFIG, matching physical hardware. - Telemetry staleness uses deterministic simulation time, so pausing in a debugger never triggers spurious timeouts.
- Virtual
BUS_VOLTAGEreports the model's fixed48 Vsupply. - Each actuator instance loads an isolated copy of its generated model library.
zero_position()resets the model on one world-owned50 µstick.
For coupling virtual actuators to MuJoCo or other multibody simulators, read Co-simulation coupling.