Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
]

[workspace.package]
version = "0.7.9"
version = "0.7.10"
authors = [
"Benjamin Bolte <ben@kscale.dev>",
"Denys Bezmenov <denys@kscale.dev>",
Expand Down
2 changes: 1 addition & 1 deletion kos-py/pykos/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""KOS Python client."""

__version__ = "0.7.9"
__version__ = "0.7.10"

from . import services
from .client import KOS
7 changes: 7 additions & 0 deletions kos-stub/src/actuator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ impl Actuator for StubActuator {
voltage: Some(0.0),
current: Some(0.0),
faults: vec![],
torque_enabled: Some(true),
min_position: Some(-180.0),
max_position: Some(180.0),
kp: Some(1.0),
kd: Some(0.1),
ki: Some(0.01),
max_torque: Some(5.0),
}])
}

Expand Down
25 changes: 16 additions & 9 deletions kos/proto/kos/actuator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,22 @@ message GetActuatorsStateResponse {

// State information for a single actuator.
message ActuatorStateResponse {
uint32 actuator_id = 1; // Actuator ID
bool online = 2; // Online status
optional double position = 3; // Position in degrees
optional double velocity = 4; // Velocity in degrees/second
optional double torque = 5; // Torque in Nm
optional double temperature = 6; // Temperature in Celsius
optional float voltage = 7; // Voltage in volts
optional float current = 8; // Current in amperes
repeated string faults = 9; // Faults
uint32 actuator_id = 1; // Actuator ID
bool online = 2; // Online status
optional double position = 3; // Position in degrees
optional double velocity = 4; // Velocity in degrees/second
optional double torque = 5; // Torque in Nm
optional double temperature = 6; // Temperature in Celsius
optional float voltage = 7; // Voltage in volts
optional float current = 8; // Current in amperes
repeated string faults = 9; // Faults
optional bool torque_enabled = 10; // Torque Enabled
optional double min_position = 11; // Minimum position limit in degrees
optional double max_position = 12; // Maximum position limit in degrees
optional double kp = 13; // Proportional gain
optional double kd = 14; // Derivative gain
optional double ki = 15; // Integral gain
optional double max_torque = 16; // Maximum torque limit in Nm
}

message ParameterDumpRequest {
Expand Down
14 changes: 14 additions & 0 deletions kos/src/telemetry_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ pub struct ActuatorState {
pub temperature: Option<f64>,
pub voltage: Option<f32>,
pub current: Option<f32>,
pub torque_enabled: Option<bool>,
pub min_position: Option<f64>,
pub max_position: Option<f64>,
pub kp: Option<f64>,
pub kd: Option<f64>,
pub ki: Option<f64>,
pub max_torque: Option<f64>,
}

#[derive(Clone, Debug, Serialize)]
Expand Down Expand Up @@ -102,6 +109,13 @@ impl From<&ActuatorStateResponse> for ActuatorState {
temperature: resp.temperature,
voltage: resp.voltage,
current: resp.current,
torque_enabled: resp.torque_enabled,
min_position: resp.min_position,
max_position: resp.max_position,
kp: resp.kp,
kd: resp.kd,
ki: resp.ki,
max_torque: resp.max_torque,
}
}
}
Expand Down