From asi
Controls Robstride servo motors on K-Scale robots using Rust library with CAN bus. Provides position, velocity, torque control and state monitoring.
npx claudepluginhub plurigrid/asi --plugin asiThis skill uses the workspace's default tool permissions.
**Trit**: -1 (MINUS - hardware interface/verification)
Implements and debugs Rust-based KOS robot firmware with gRPC services for actuator control, IMU data, and sim2real HAL abstractions across hardware/simulation backends.
Provides patterns for electric motor control including FOC, stepper motor control, encoder interfaces, current sensing, and power electronics for BLDC, PMSM, DC brushed, stepper applications.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Share bugs, ideas, or general feedback.
Trit: -1 (MINUS - hardware interface/verification) Color: #B9172E (Deep Red) URI: skill://kscale-actuator#B9172E
Rust library for controlling actuators on K-Scale robots. Supports Robstride servo motors with CAN bus communication. Provides position, velocity, and torque control modes.
┌────────────────────────────────────────────────────────────────┐
│ ACTUATOR CONTROL STACK │
├────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ KOS Firmware │ │
│ │ ActuatorService (gRPC) │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ actuator crate (Rust) │ │
│ │ ┌─────────────────────────────────────────────────────┐ │ │
│ │ │ ActuatorController │ │ │
│ │ │ ├── configure(kp, kd, torque_limit) │ │ │
│ │ │ ├── command_position(joint_id, position) │ │ │
│ │ │ ├── command_velocity(joint_id, velocity) │ │ │
│ │ │ ├── command_torque(joint_id, torque) │ │ │
│ │ │ └── get_state() -> ActuatorState │ │ │
│ │ └─────────────────────────────────────────────────────┘ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ robstride crate (Rust) │ │
│ │ ├── CAN bus communication │ │
│ │ ├── Motor protocol implementation │ │
│ │ └── Firmware interface │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Hardware │ │
│ │ Robstride Motors (CAN bus @ 1Mbps) │ │
│ └──────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────┘
use kscale_actuator::{ActuatorController, ActuatorConfig};
// Initialize controller
let config = ActuatorConfig {
can_interface: "can0",
motor_ids: vec![1, 2, 3, 4, 5, 6],
};
let mut controller = ActuatorController::new(config)?;
// Configure actuator
controller.configure(1, ActuatorParams {
kp: 100.0,
kd: 10.0,
torque_limit: 40.0,
})?;
// Command position
controller.command_position(1, 0.5)?; // radians
// Get state
let state = controller.get_state(1)?;
println!("Position: {}, Velocity: {}, Torque: {}",
state.position, state.velocity, state.torque);
// Low-level torque control
controller.command_torque(1, 5.0)?; // Nm
kscale-actuator (-1) ⊗ kos-firmware (+1) ⊗ mujoco-scenes (0) = 0 ✓
kos-firmware (+1): Uses actuator crate via HALkbot-humanoid (-1): K-Bot uses these actuatorsrobstride-driver (-1): Low-level motor driver@misc{kscaleactuator2024,
title={K-Scale Actuator Library},
author={K-Scale Labs},
year={2024},
url={https://github.com/kscalelabs/actuator}
}