Struct Robot::Variable

Nested Relationships

This struct is a nested type of Struct Robot.

Struct Documentation

struct Variable

Public Functions

auto generate_valid_value(double init_val = 0.0) const -> double

Generates a valid variable value given an optional initial value (for unbounded joints).

auto is_valid(double val) const -> bool

Returns true if a value is valid given the variable bounds.

auto clamp_to_limits(double val) const -> double

Clamps a configuration to joint limits.

Public Members

double min

Min, max, and middle position values of the variable.

double max
double mid
bool bounded

Whether the variable’s position is bounded.

double half_span

The half-span (min - max) / 2.0 of the variable, or a default value if unbounded.

double max_velocity_rcp
double minimal_displacement_factor