diff --git a/Cargo.toml b/Cargo.toml index 67114ab..c270d82 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ members = [ ] [workspace.package] -version = "0.7.9" +version = "0.7.10" authors = [ "Benjamin Bolte ", "Denys Bezmenov ", diff --git a/kos-py/pykos/__init__.py b/kos-py/pykos/__init__.py index c77043f..95709c1 100644 --- a/kos-py/pykos/__init__.py +++ b/kos-py/pykos/__init__.py @@ -1,6 +1,6 @@ """KOS Python client.""" -__version__ = "0.7.9" +__version__ = "0.7.10" from . import services from .client import KOS diff --git a/kos-stub/src/actuator.rs b/kos-stub/src/actuator.rs index d1a047f..4bf6e75 100644 --- a/kos-stub/src/actuator.rs +++ b/kos-stub/src/actuator.rs @@ -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), }]) } diff --git a/kos/proto/kos/actuator.proto b/kos/proto/kos/actuator.proto index 91c524a..7b7c9bc 100644 --- a/kos/proto/kos/actuator.proto +++ b/kos/proto/kos/actuator.proto @@ -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 { diff --git a/kos/src/telemetry_types.rs b/kos/src/telemetry_types.rs index 0024480..0fb26bc 100644 --- a/kos/src/telemetry_types.rs +++ b/kos/src/telemetry_types.rs @@ -43,6 +43,13 @@ pub struct ActuatorState { pub temperature: Option, pub voltage: Option, pub current: Option, + pub torque_enabled: Option, + pub min_position: Option, + pub max_position: Option, + pub kp: Option, + pub kd: Option, + pub ki: Option, + pub max_torque: Option, } #[derive(Clone, Debug, Serialize)] @@ -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, } } }