RobotState#

rb::RobotState<T> is the live state snapshot delivered through StartStateUpdate() or returned by GetState(). The page also covers the smaller state records that appear inside the top-level snapshot.

Header

Header

#include <rby1-sdk/robot_state.h>

Declaration

Namespace

rb

Kind

struct family

Primary role

Represent the live measured state of the robot and its peripherals.

Public Attributes

Field group

Meaning

Notes

system_stat, battery_state

Host-level and battery-related status.

Useful during bring-up and power diagnosis.

power_states, emo_states, joint_states

Per-device and per-joint subsystem state.

These are the main discrete device-status records.

tool_flange_left, tool_flange_right

Tool-flange I/O and status.

Present for both end-effectors.

ft_sensor_left, ft_sensor_right

Force-torque sensor data.

Includes freshness information in nested timestamp helpers.

position, velocity, current, temperature

Main measured vectors.

Aligned with the robot model’s joint ordering.

target_position, target_velocity, target_feedback_gain, target_feedforward_torque

Command targets tracked by the control loop.

Useful when comparing request and measured output.

center_of_mass, gravity, odometry, collisions

Higher-level computed state and environment-related outputs.

Often consumed by monitoring and model-based code.

is_ready

Readiness flag for command execution.

Use alongside ControlManagerState.

Units & Ranges

Field

Unit / encoding

Notes

RobotState::timestamp

Absolute timestamp

Captured as timespec in C++; Python bindings expose a wall-clock time point.

SystemStat::cpu_usage, SystemStat::memory_usage

%

Host resource usage percentages.

SystemStat::uptime, SystemStat::program_uptime

s

Elapsed uptime counters.

BatteryState::voltage, current, level_percent

V, A, %

Battery pack measurements and charge estimate.

PowerState::voltage

V

Supply voltage for one power-controlled device.

JointState::time_since_last_update, ToolFlangeState::time_since_last_update, FTSensorData::time_since_last_update

Elapsed time

Freshness durations stored as timespec.

JointState::position, target_position, RobotState::position, target_position

rad

Joint-space positions in model order.

JointState::velocity, target_velocity, RobotState::velocity, target_velocity

rad/s

Joint-space velocity values in model order.

JointState::current, RobotState::current

A

Joint motor currents.

JointState::torque, target_feedforward_torque, RobotState::torque, target_feedforward_torque, gravity

Nm

Measured torque, feedforward torque, and gravity term are all reported in joint torque units.

JointState::target_feedback_gain, RobotState::target_feedback_gain

Dimensionless

Public headers document the per-joint target gain range as [0, 10].

JointState::temperature, RobotState::temperature

deg C

Joint temperatures are stored as integers.

ToolFlangeState::gyro, acceleration, output_voltage

rad/s, m/s^2, V

End-effector IMU and output-rail measurements.

FTSensorData::force, torque

N, Nm

Three-axis force and torque vectors.

RobotState::odometry

SE(2)

Homogeneous planar pose. Translation terms are in meters and heading is encoded in the rotation block.

RobotState::center_of_mass

m

Center-of-mass position expressed in the base frame.

RobotState::collisions

m

CollisionResult::position1, position2, and distance are all in meters. Signed distance becomes negative on penetration.

Detailed Reference

template<typename T>
struct RobotState#

Public Members

BatteryState battery_state = {}#
Eigen::Vector<double, 3> center_of_mass#
std::vector<dyn::CollisionResult> collisions#
Eigen::Vector<double, T::kRobotDOF> current = {Eigen::Vector<double, T::kRobotDOF>::Zero()}#
std::vector<EMOState> emo_states = {}#
FTSensorData ft_sensor_left#
FTSensorData ft_sensor_right#
Eigen::Vector<double, T::kRobotDOF> gravity#
Eigen::Vector<bool, T::kRobotDOF> is_ready = {Eigen::Vector<bool, T::kRobotDOF>::Constant(false)}#
std::array<JointState, T::kRobotDOF> joint_states = {}#
math::SE2::MatrixType odometry = {math::SE2::Identity()}#
Eigen::Vector<double, T::kRobotDOF> position = {Eigen::Vector<double, T::kRobotDOF>::Zero()}#
std::vector<PowerState> power_states = {}#
SystemStat system_stat = {}#
Eigen::Vector<uint32_t, T::kRobotDOF> target_feedback_gain = {Eigen::Vector<uint32_t, T::kRobotDOF>::Zero()}#
Eigen::Vector<double, T::kRobotDOF> target_feedforward_torque = {Eigen::Vector<double, T::kRobotDOF>::Zero()}#
Eigen::Vector<double, T::kRobotDOF> target_position = {Eigen::Vector<double, T::kRobotDOF>::Zero()}#
Eigen::Vector<double, T::kRobotDOF> target_velocity = {Eigen::Vector<double, T::kRobotDOF>::Zero()}#
Eigen::Vector<int, T::kRobotDOF> temperature = {Eigen::Vector<int, T::kRobotDOF>::Zero()}#
ToolFlangeState tool_flange_left#
ToolFlangeState tool_flange_right#
Eigen::Vector<double, T::kRobotDOF> torque = {Eigen::Vector<double, T::kRobotDOF>::Zero()}#
Eigen::Vector<double, T::kRobotDOF> velocity = {Eigen::Vector<double, T::kRobotDOF>::Zero()}#
struct timestamp#
struct SystemStat#

Public Members

double cpu_usage = {0.}#
double memory_usage = {0.}#
double program_uptime = {0.}#
double uptime = {0.}#
struct BatteryState#

Public Members

double current = {0.}#
double level_percent = {0.}#
double voltage = {0.}#
struct PowerState#

Public Types

enum class State#

Values:

enumerator kUnknown#
enumerator kPowerOn#
enumerator kPowerOff#

Public Members

State state = {State::kUnknown}#
double voltage = {0.}#
struct EMOState#

Public Types

enum class State#

Values:

enumerator kReleased#
enumerator kPressed#

Public Members

State state = {State::kReleased}#
struct JointState#

Public Types

enum class FETState#

Values:

enumerator kUnknown#
enumerator kOn#
enumerator kOff#
enum class InitializationState#

Values:

enumerator kUnknown#
enumerator kInitialized#
enumerator kUninitialized#
enum class RunState#

Values:

enumerator kUnknown#
enumerator kControlOn#
enumerator kControlOff#

Public Members

double current = {0.}#
FETState fet_state = {FETState::kUnknown}#
InitializationState init_state = {InitializationState::kUnknown}#
bool is_ready = {false}#
uint64_t motor_state = {}#
uint32_t motor_type = {}#
double position = {0.}#
bool power_on = {false}#
RunState run_state = {RunState::kUnknown}#
uint32_t target_feedback_gain = {10}#
double target_feedforward_torque = {0.}#
double target_position = {0.}#
double target_velocity = {0.}#
int temperature = {}#
double torque = {0.}#
double velocity = {0.}#
struct time_since_last_update#
struct ToolFlangeState#

Public Members

Eigen::Vector<double, 3> acceleration#
bool digital_input_A = {}#
bool digital_input_B = {}#
bool digital_output_A = {}#
bool digital_output_B = {}#
Eigen::Vector<double, 3> gyro#
int output_voltage#
bool switch_A = {}#
struct time_since_last_update#
struct FTSensorData#

Public Members

Eigen::Vector<double, 3> force#
Eigen::Vector<double, 3> torque#
struct time_since_last_update#

Related Types

Examples

  • get_robot_state.cpp and get_robot_state2.cpp are the most direct examples for this page.