FancySafeBot 0.0.1
A safe robotics library
Loading...
Searching...
No Matches
Body Tree

Rigid body tree containing geometry and mass properties of robot model. More...

Classes

class  fsb::BodyTree
 Body tree description of a kinematic chain. More...
 

Enumerations

enum class  fsb::BodyTreeError : uint8_t {
  SUCCESS = 0 , BodyTreeError::BODY_NOT_IN_TREE = 1 , BodyTreeError::JOINT_NOT_IN_TREE = 2 , BodyTreeError::MAX_BODIES_REACHED = 3 ,
  BodyTreeError::PARENT_BODY_NONEXISTENT = 4 , BodyTreeError::MAX_JOINTS_REACHED = 5 , BodyTreeError::MAX_JOINT_COORDINATES_REACHED = 6 , BodyTreeError::MAX_JOINT_DOFS_REACHED = 7 ,
  BodyTreeError::MASS_ZERO = 8 , BodyTreeError::INERTIA_ZERO = 9 , BodyTreeError::MASS_ZERO_WITH_INERTIA = 10 , BodyTreeError::INERTIA_NOT_POS_DEF = 11
}
 Error list for body tree operations. More...
 

Functions

Joint fsb::BodyTree::get_joint (size_t joint_index, BodyTreeError &err) const
 Get a joint object in the body tree.
 
Body fsb::BodyTree::get_body (size_t body_index, BodyTreeError &err) const
 Get body object from tree.
 
BodyTreeError fsb::BodyTree::set_body_mass_props (size_t body_index, const MassProps &mass_props)
 Set the body mass properties object.
 
BodyTreeError fsb::BodyTree::set_body_origin_offset (size_t body_index, const MotionVector &origin_offset)
 Set the body transform offset.
 
BodyTreeError fsb::BodyTree::set_parent_joint_transform (size_t body_index, const Transform &parent_joint_transform)
 Set the parent joint transform object.
 

Detailed Description

Rigid body tree containing geometry and mass properties of robot model.

Enumeration Type Documentation

◆ BodyTreeError

enum class fsb::BodyTreeError : uint8_t
strong

Error list for body tree operations.

Enumerator
BODY_NOT_IN_TREE 

Index does not point to an existing body in tree.

JOINT_NOT_IN_TREE 

Index does not point to an existing joint in tree.

MAX_BODIES_REACHED 

No more bodies can be added to the body tree. Maximum is specified by MaxSize::bodies.

PARENT_BODY_NONEXISTENT 

Parent body index does not point to an existing body in tree.

MAX_JOINTS_REACHED 

No more joints can be added to the body tree. Maximum is specified by MaxSize::joints.

MAX_JOINT_COORDINATES_REACHED 

Joint requires more coordinates than is available. Maximum is specified by MaxSize::coordinates.

MAX_JOINT_DOFS_REACHED 

Joint requires more DoFs than is available. Maximum is specified by MaxSize::dofs.

MASS_ZERO 

Body mass is zero with a non-fixed parent joint.

INERTIA_ZERO 

At least one of the inertia principal components are zero with a non-fixed parent joint.

MASS_ZERO_WITH_INERTIA 

Body mass is set to zero but with non-zero inertia for a fixed parent joint.

INERTIA_NOT_POS_DEF 

Inertia is not positive definite.

Function Documentation

◆ get_body()

Body fsb::BodyTree::get_body ( size_t  body_index,
BodyTreeError err 
) const
inline

Get body object from tree.

Parameters
[in]body_indexBody index
[out]errError code
Returns
Body object

◆ get_joint()

Joint fsb::BodyTree::get_joint ( size_t  joint_index,
BodyTreeError err 
) const
inline

Get a joint object in the body tree.

Parameters
[in]joint_indexJoint index
[out]errError code
Returns
Joint object

◆ set_body_mass_props()

BodyTreeError fsb::BodyTree::set_body_mass_props ( size_t  body_index,
const MassProps mass_props 
)
inline

Set the body mass properties object.

Parameters
body_indexBody index
mass_propsMass properties to set
Returns
Error code

◆ set_body_origin_offset()

BodyTreeError fsb::BodyTree::set_body_origin_offset ( size_t  body_index,
const MotionVector origin_offset 
)
inline

Set the body transform offset.

Parameters
body_indexBody index
origin_offsetOrigin offset transform
Returns
Error code

◆ set_parent_joint_transform()

BodyTreeError fsb::BodyTree::set_parent_joint_transform ( size_t  body_index,
const Transform parent_joint_transform 
)
inline

Set the parent joint transform object.

Parameters
body_indexBody index
parent_joint_transformNominal transform of body's parent joint
Returns
Error code