PulsarActuatorVirtual
PulsarActuatorVirtual is the canonical API 2.0.0 class for running virtual PULSAR actuators backed by AUGUR Digital Twin assets. The first public DTwin beta asset release is available for Linux x86_64 and Windows x86_64; see the download page for the current package and manifest.
Source code in pcp_api/pulsar_actuator_virtual.pyi
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 | |
connected
property
Return whether the actuator is connected.
implementation_version
property
Return DTwin model/build metadata for the generic version hook.
Mode
Bases: Enum
Control modes available for Pulsar actuator implementations.
Source code in pcp_api/pulsar_actuator_virtual.pyi
PCP_Items
Bases: Enum
Feedback items available for monitoring actuator state.
Source code in pcp_api/pulsar_actuator_virtual.pyi
PCP_Parameters
Bases: Enum
Parameters that can be read or written through the actuator API.
Source code in pcp_api/pulsar_actuator_virtual.pyi
Rates
Bases: Enum
Feedback update rates for high/low frequency data streams.
Source code in pcp_api/pulsar_actuator_virtual.pyi
SpeedPerformance
Bases: Enum
Performance presets for speed control mode.
Source code in pcp_api/pulsar_actuator_virtual.pyi
TorquePerformance
Bases: Enum
Performance presets for torque control mode.
Source code in pcp_api/pulsar_actuator_virtual.pyi
__init__(adapter_handler=None, address=None, logger=None)
Initialize a virtual actuator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
adapter_handler
|
Any | None
|
Optional preconfigured DTwin actuator wrapper. |
None
|
address
|
int | None
|
Optional virtual PCP address. |
None
|
logger
|
Logger | None
|
Optional logger used for diagnostics. |
None
|
Source code in pcp_api/pulsar_actuator_virtual.pyi
blink(timeout=1.0)
change_address(new_address)
Set the virtual PCP address.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
new_address
|
int
|
New virtual actuator address in the valid actuator range. |
required |
change_impedance_setpoint(setpoint, FF_gain=nan, K_stiff=nan, K_damp=nan, J_imp=nan, ref_ff_torque=nan, ref_impedance_spd=nan, ref_impedance_acel=nan)
Switch to impedance mode and apply an impedance setpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
setpoint
|
float
|
Position reference, in radians. |
required |
FF_gain
|
float
|
Optional feed-forward gain. |
nan
|
K_stiff
|
float
|
Optional impedance stiffness. |
nan
|
K_damp
|
float
|
Optional impedance damping. |
nan
|
J_imp
|
float
|
Optional impedance inertia. |
nan
|
ref_ff_torque
|
float
|
Optional feed-forward torque reference, in Nm. |
nan
|
ref_impedance_spd
|
float
|
Optional impedance speed reference, in rad/s. |
nan
|
ref_impedance_acel
|
float
|
Optional impedance acceleration reference. |
nan
|
Source code in pcp_api/pulsar_actuator_virtual.pyi
change_load(load)
change_mode(mode)
Change the virtual actuator control mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
Mode
|
Control mode to activate. |
required |
change_position_setpoint(setpoint, FF_gain=nan, spd_Ki=nan, spd_Kp=nan, pos_Kp=nan, ref_ff_torque=nan)
Switch to position mode and apply a position setpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
setpoint
|
float
|
Position reference, in radians. |
required |
FF_gain
|
float
|
Optional feed-forward gain. |
nan
|
spd_Ki
|
float
|
Optional speed-loop integral gain. |
nan
|
spd_Kp
|
float
|
Optional speed-loop proportional gain. |
nan
|
pos_Kp
|
float
|
Optional position-loop proportional gain. |
nan
|
ref_ff_torque
|
float
|
Optional feed-forward torque reference, in Nm. |
nan
|
Source code in pcp_api/pulsar_actuator_virtual.pyi
change_setpoint(setpoint)
Change the setpoint for the current control mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
setpoint
|
float
|
Setpoint value for the active mode. |
required |
change_speed_setpoint(setpoint, FF_gain=nan, spd_Ki=nan, spd_Kp=nan, ref_ff_torque=nan)
Switch to speed mode and apply a speed setpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
setpoint
|
float
|
Speed reference, in rad/s. |
required |
FF_gain
|
float
|
Optional feed-forward gain. |
nan
|
spd_Ki
|
float
|
Optional speed-loop integral gain. |
nan
|
spd_Kp
|
float
|
Optional speed-loop proportional gain. |
nan
|
ref_ff_torque
|
float
|
Optional feed-forward torque reference, in Nm. |
nan
|
Source code in pcp_api/pulsar_actuator_virtual.pyi
change_torque_setpoint(setpoint, id_Kp=nan, id_Ki=nan, iq_Kp=nan, iq_Ki=nan)
Switch to torque mode and apply a torque setpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
setpoint
|
float
|
Torque reference, in Nm. |
required |
id_Kp
|
float
|
Optional d-axis current proportional gain. |
nan
|
id_Ki
|
float
|
Optional d-axis current integral gain. |
nan
|
iq_Kp
|
float
|
Optional q-axis current proportional gain. |
nan
|
iq_Ki
|
float
|
Optional q-axis current integral gain. |
nan
|
Source code in pcp_api/pulsar_actuator_virtual.pyi
connect(timeout=1.0)
Connect to the configured virtual actuator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
float
|
Accepted for real API compatibility; unused by the virtual backend. |
1.0
|
Returns:
| Type | Description |
|---|---|
bool
|
|
Source code in pcp_api/pulsar_actuator_virtual.pyi
disconnect()
discover_available_actuators(bindings_path)
staticmethod
Return virtual actuator models available under a bindings path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bindings_path
|
str | Path
|
Directory containing generated DTwin artifacts. |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
Available actuator model names. Missing directories return an empty |
list[str]
|
list. |
Source code in pcp_api/pulsar_actuator_virtual.pyi
get_all_parameters()
get_debug_flags()
get_feedback()
get_info()
get_items_blocking(items, timeout=1.0)
Return requested feedback values from the current simulator state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
items
|
list[PCP_Items]
|
Feedback items to read. Requests are capped at the protocol batch limit. |
required |
timeout
|
float
|
Accepted for real API compatibility; unused by the virtual backend. |
1.0
|
Returns:
| Type | Description |
|---|---|
dict[PCP_Items, float]
|
Mapping from requested feedback items to current values. |
Source code in pcp_api/pulsar_actuator_virtual.pyi
get_measurements()
get_mode()
get_model_version()
get_motor_state()
get_parameters(parameters, timeout=1.0)
Read virtual actuator parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameters
|
list[PCP_Parameters]
|
Parameters to read. |
required |
timeout
|
float
|
Accepted for real API compatibility; unused by the virtual backend. |
1.0
|
Returns:
| Type | Description |
|---|---|
dict[PCP_Parameters, float]
|
Mapping from parameter enum to current value. |
Source code in pcp_api/pulsar_actuator_virtual.pyi
get_parameters_all()
get_sim_rate_hz()
get_sim_time(round_dec=3)
Return the latest simulated time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
round_dec
|
int
|
Decimal places used to round the returned time. |
3
|
get_sim_time_step_s()
Return the DTwin simulation step time in seconds.
The current DTwin artifacts use the wrapper's telemetry log timestep. If a future generated artifact exposes timestep metadata, the backend wrapper will return that value through the same public API.
Source code in pcp_api/pulsar_actuator_virtual.pyi
has_errors()
is_valid_actuator_address(address)
staticmethod
save_config()
send_ping(timeout=1.0)
Return whether the virtual actuator is configured and connected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
float
|
Accepted for real API compatibility; unused by the virtual backend. |
1.0
|
set_actuator(model_name, library_path=None, bindings_root=None)
Configure the digital twin by model name.
When library_path is provided, it is treated as an actuator-library
YAML file. Without a YAML file, the method resolves generated DTwin
artifacts directly from bindings_root or the repo assets folder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_name
|
str
|
Actuator model name to load. |
required |
library_path
|
str | Path | None
|
Optional actuator-library YAML path. |
None
|
bindings_root
|
str | Path | None
|
Optional root used to discover generated artifacts. |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
Configured DTwin actuator wrapper. |
Source code in pcp_api/pulsar_actuator_virtual.pyi
set_actuator_from_paths(library_path, bindings_path)
Configure the digital twin from explicit artifact paths.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
library_path
|
str | Path
|
Path to the generated DTwin shared library. |
required |
bindings_path
|
str | Path
|
Path to the generated Python bindings. |
required |
Returns:
| Type | Description |
|---|---|
Any
|
Configured DTwin actuator wrapper. |
Source code in pcp_api/pulsar_actuator_virtual.pyi
set_can_high_speed(enabled)
set_error_callback(callback)
set_feedback_callback(callback)
set_feedback_items(items)
Configure the feedback items emitted by simulation steps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
items
|
list[PCP_Items]
|
Feedback items to include in emitted snapshots. |
required |
set_feedback_rate(rate)
Configure feedback emission rate for simulation steps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rate
|
Rates | int
|
A |
required |
Source code in pcp_api/pulsar_actuator_virtual.pyi
set_home_position()
set_low_freq_feedback_callback(callback)
set_parameters(parameters)
Write virtual actuator parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameters
|
dict[PCP_Parameters, float]
|
Mapping from parameter enum to the value to write. |
required |
set_speed_performance(performance)
set_torque_performance(performance)
start()
start_steps(step_number)
step(load=None, steps=1)
Advance the simulation explicitly.
This is the main virtual-only extension beyond the real actuator API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
load
|
float | None
|
Optional load torque to apply before stepping. |
None
|
steps
|
int
|
Number of simulation steps to run. |
1
|
Returns:
| Type | Description |
|---|---|
dict[PCP_Items, float]
|
Latest configured feedback snapshot after stepping. |
Source code in pcp_api/pulsar_actuator_virtual.pyi
VirtualActuatorLog
VirtualActuatorLog stores per-step telemetry generated by PulsarActuatorVirtual.
Per-step simulator telemetry log owned by PulsarActuatorVirtual.
Populated by PulsarActuatorVirtual.step() after every simulation tick.
The internal DTwin backend has no knowledge of this structure.