A per-joint model table for a serial kinematic chain, held in chain order. Build one with the from factories and read it back via rows() or to_tensor().
More...
#include <kinematics_model_table.hpp>
|
| struct | JointRow |
| | One row of the model table: the per-joint URDF fields. More...
|
| |
|
| enum class | JointType { k_revolute = 0
, k_continuous = 1
, k_prismatic = 2
, k_fixed = 3
} |
| | URDF joint type, restricted to arm-relevant joints. More...
|
| |
|
|
| ModelTable (std::vector< JointRow > rows) |
| | Construct directly from rows already in chain order.
|
| |
| xt::xarray< double > | to_tensor () const |
| | Convert to a double tensor of shape (n, 10). Columns: 0..2 xyz, 3..5 rpy, 6..8 axis, 9 joint type as the underlying value of JointType (see enum declaration for the encoding).
|
| |
|
const std::vector< JointRow > & | rows () const |
| | The rows of the table, in chain order.
|
| |
|
| static ModelTable | from (const KinematicsDataURDF &urdf) |
| | Parse a kinematics description into a model table in chain order.
|
| |
| static ModelTable | from (const xt::xarray< double > &tensor) |
| | Inverse of to_tensor: rehydrate an (n, 10) double tensor into a model table. Reconstructed rows have empty name (names are not carried in the tensor).
|
| |
A per-joint model table for a serial kinematic chain, held in chain order. Build one with the from factories and read it back via rows() or to_tensor().
◆ JointType
URDF joint type, restricted to arm-relevant joints.
- Note
- Underlying values are stable and form the wire encoding for column 9 of the tensor produced by
to_tensor().
◆ from() [1/2]
Parse a kinematics description into a model table in chain order.
- Exceptions
-
| viam::sdk::Exception | on parse error, branching / multi-root / disconnected topology, unsupported joint types, or zero axis. |
◆ from() [2/2]
| static ModelTable viam::sdk::ModelTable::from |
( |
const xt::xarray< double > & | tensor | ) |
|
|
static |
Inverse of to_tensor: rehydrate an (n, 10) double tensor into a model table. Reconstructed rows have empty name (names are not carried in the tensor).
- Exceptions
-
| viam::sdk::Exception | on non-2D input, wrong column count, empty input, or invalid joint-type encoding (col 9 must be an integer matching one of the JointType values). |
◆ to_tensor()
| xt::xarray< double > viam::sdk::ModelTable::to_tensor |
( |
| ) |
const |
Convert to a double tensor of shape (n, 10). Columns: 0..2 xyz, 3..5 rpy, 6..8 axis, 9 joint type as the underlying value of JointType (see enum declaration for the encoding).
- Exceptions
-
The documentation for this class was generated from the following file: