Base Class#
Abstract Kinematics type.
A kinematics is used to
validated twist in the agent’s frame as feasible
convert between wheel speeds and body twist
returns maximal linear and angular speed
returns the number of degrees of freedom
Negative speed means unconstrained.
Returns the degrees of freedom (between 0 and 3 for planar rigid body kinematics)
- Returns:
The number of degrees of freedom.
Dumps the object to a YAML-string.
- Returns:
The YAML representation
- Return type:
Computes the nearest feasible twist to a desired twist.
- Parameters:
twist – The desired twist
- Returns:
The same desired twist if feasible else the nearest feasible value. How this is defined depends on the concrete sub-class.
Computes the nearest feasible twist to a desired twist, taking into account dynamic constraints
- Parameters:
twist – The desired twist
current – The current twist
time_step – The time step to reach the desired twist
- Returns:
The same desired twist if feasible else the nearest feasible value. How this is defined depends on the concrete sub-class.
Gets the value of the specified property.
- Parameters:
name – The name of the property
- Raise:
std::runtime_error A runtime error if no property is found.
- Returns:
The value of the property
Gets the maximal angular speed.
- Returns:
The maximal angular speed.
Gets the maximal speed.
- Returns:
The maximal speed.
Check whether a type name has been registered.
- Parameters:
type – The associated type name.
- Returns:
True if the type name has been registered.
Returns whether the kinematics has wheels.
- Returns:
True if wheeled, False otherwise.
Load a kinematics modulation from a YAML string.
- Returns:
The loaded kinematics or
None
if loading fails.- Return type:
Kinematics| None
Create an object of a sub-class selected by name.
- Parameters:
type – The associated type name.
- Returns:
An object of a registered sub-class or
None
in case the desired name is not found.
Returns the json-schema that includes registered components.
- Returns:
“anyOf” json-schema of all registered components.
- Return type:
dict[str, typing.Any]
Returns the json-schema of a component
Returns an empty dictionary if a not registered type is requested.
- Parameters:
reference_register_schema – Whether to reference registered components schema in the base class schema.
type (str) – An optional registered type. If not specified, it returns the schema of the base class.
- Returns:
A json-schema of the registered class
- Return type:
dict[str, typing.Any]
Set the value of a named property. Fails silently if no property can be found or if the value has a non-compatible type.
- Parameters:
name – The name of the property
value – The desired value for the property
- Type:
The maximal angular speed.
- Type:
The maximal speed.
- Type:
The registered properties
- Type:
The name associated to the type of an object