Pulsar SDK
Commands and parameters
Pulsar SDK distinguishes real-time commands (sent during DRIVE_ACTIVE) from device parameters (configuration limits, gains, watchdog settings, and read-only metadata).
Primary commands
A standalone actuator accepts a scalar command whose unit depends on the configured mode (TORQUE: N·m, VELOCITY: rad/s, POSITION: rad, IMPEDANCE: rad):
Commands must be finite and are accepted only in DRIVE_ACTIVE.
Mode-specific command fields and feedforwards
To send feedforward torques, gains, or impedance fields alongside the primary setpoint, pass a mapping containing COMMAND (ControlParam::Command in Rust):
(In Rust, scalar commands use set_command(f64) and mapped commands use set_control(&ControlValues).)
Omitted optional fields (or NaN) leave the actuator's current firmware value unchanged.
| Field (Python / Rust) | Allowed modes |
|---|---|
COMMAND / Command |
all modes (required) |
D_AXIS_CURRENT_KP, D_AXIS_CURRENT_KI / DAxisCurrentKp, DAxisCurrentKi |
torque |
Q_AXIS_CURRENT_KP, Q_AXIS_CURRENT_KI / QAxisCurrentKp, QAxisCurrentKi |
torque |
FEEDFORWARD_GAIN / FeedforwardGain |
velocity, position, impedance |
VELOCITY_KP, VELOCITY_KI / VelocityKp, VelocityKi |
velocity, position |
TORQUE_FEEDFORWARD / TorqueFeedforward |
velocity, position, impedance |
POSITION_KP / PositionKp |
position |
IMPEDANCE_STIFFNESS, IMPEDANCE_DAMPING, IMPEDANCE_INERTIA |
impedance |
IMPEDANCE_VELOCITY_COMMANDED, IMPEDANCE_ACCELERATION_COMMANDED |
impedance |
Group and platform command batches
Selected command batches may include a subset of members; omitted actuators retain their previous command:
Direct batch failures report CommandTransmissionError (Python) or SdkErrorKind::CommandTransmission (Rust) with successful_members identifying writes completed before the failure.
Parameters
Read and write device parameters with typed enums:
use std::collections::BTreeMap;
use pulsar_rs_sdk::{NumericValue, Parameter};
let values = actuator.read_parameters(&[
Parameter::TorqueLimit,
Parameter::PositionKp,
Parameter::CommandTimeoutS,
Parameter::CriticalErrorFallback,
])?;
actuator.set_parameters(&BTreeMap::from([
(Parameter::TorqueLimit, NumericValue::Float(5.0)),
(Parameter::PositionKp, NumericValue::Float(2.0)),
]))?;
Online limit updates during DRIVE_ACTIVE (3.1.0 / 1.1.0)
General parameters can only be written while drive output is inactive (INIT_CONFIG or CONFIG_AND_TELEM). Starting in 3.1.0 / 1.1.0, all 9 limit parameters can be written online during DRIVE_ACTIVE without disabling the actuator:
TORQUE_LIMIT/TorqueLimitPOSITION_LIMIT_MIN,POSITION_LIMIT_MAX/PositionLimitMin,PositionLimitMaxVELOCITY_LIMIT_MIN,VELOCITY_LIMIT_MAX/VelocityLimitMin,VelocityLimitMaxPOSITION_PROFILE_VELOCITY_MIN,POSITION_PROFILE_VELOCITY_MAXVELOCITY_PROFILE_ACCELERATION_MIN,VELOCITY_PROFILE_ACCELERATION_MAX
If a set_parameters mapping sent during DRIVE_ACTIVE contains any non-limit parameter, the entire call is rejected before transmission. Physical set_parameters calls accept at most 12 values per call so every write fits in a single firmware frame.
Unified group and platform parameter updates
Apply one parameter map across every actuator in a group or platform:
Use dedicated methods for MODE (set_mode), COMMAND (set_command/set_control), gain presets (set_torque_gain_preset/set_velocity_gain_preset), PCP_ADDRESS (set_address), TELEMETRY_RATE_HZ (configure), and flash persistence (save_parameters).
See the Python API reference and Rust API reference for the complete parameter list.