![]() |
FancySafeBot 0.0.1
A safe robotics library
|
Body tree description of a kinematic chain.
#include <fsb_body_tree.h>

Public Member Functions | |
| BodyTree ()=default | |
| Construct a new BodyTree object. | |
| size_t | add_body (size_t parent_body_index, JointType joint_type, const Transform &parent_joint_transform, const Body &body, BodyTreeError &err) |
| Add a body to the body tree. | |
| size_t | add_massless_body (size_t parent_body_index, JointType joint_type, const Transform &parent_joint_transform, const MotionVector &origin_offset, BodyTreeError &err) |
| Add a massless body to the body tree. | |
| BodyTreeError | set_joint_position_limit (size_t joint_index, real_t lower_position, real_t upper_position) |
| Set joint position limits for a joint in the body tree. | |
| BodyTreeError | unset_joint_position_limit (size_t joint_index) |
| Unset joint position limits for a joint in the body tree. | |
| BodyTreeError | get_joint_position_limit (size_t joint_index, bool &is_set, real_t &lower_position, real_t &upper_position) const |
| Get joint position limits for a joint in the body tree. | |
| BodyTreeError | set_joint_velocity_limit (size_t joint_index, real_t max_velocity) |
| Set joint velocity limit for a joint in the body tree. | |
| BodyTreeError | get_joint_velocity_limit (size_t joint_index, real_t &max_velocity) const |
| Get joint velocity limit for a joint in the body tree. | |
| void | set_gravity (const Vec3 &gravity) |
| Set the gravity vector. | |
| Joint | get_joint (size_t joint_index, BodyTreeError &err) const |
| Get a joint object in the body tree. | |
| Body | get_body (size_t body_index, BodyTreeError &err) const |
| Get body object from tree. | |
| BodyTreeError | set_body_mass_props (size_t body_index, const MassProps &mass_props) |
| Set the body mass properties object. | |
| BodyTreeError | set_body_origin_offset (size_t body_index, const MotionVector &origin_offset) |
| Set the body transform offset. | |
| BodyTreeError | set_parent_joint_transform (size_t body_index, const Transform &parent_joint_transform) |
| Set the parent joint transform object. | |
| size_t | get_body_dofs (size_t body_index, BodyTreeError &err) const |
| Get the number of degrees of freedom for a body. | |
| size_t | get_num_bodies () const |
| Get the number of bodies in tree. | |
| size_t | get_num_dofs () const |
| Get the number of body tree degrees of freedom. | |
| size_t | get_num_coordinates () const |
| Get the number of generalized position coordinates. | |
| Vec3 | get_gravity () const |
| Get the gravity vector. | |
| std::array< size_t, MaxSize::bodies > | get_leaves (size_t &num_leaves) const |
| Get a list of body indexes that are leaves (bodies without children) | |
Static Public Attributes | |
| static constexpr size_t | base_index = 0U |
| Index of base body is always 0. | |
| size_t fsb::BodyTree::add_body | ( | size_t | parent_body_index, |
| JointType | joint_type, | ||
| const Transform & | parent_joint_transform, | ||
| const Body & | body, | ||
| BodyTreeError & | err | ||
| ) |
| size_t fsb::BodyTree::add_massless_body | ( | size_t | parent_body_index, |
| JointType | joint_type, | ||
| const Transform & | parent_joint_transform, | ||
| const MotionVector & | origin_offset, | ||
| BodyTreeError & | err | ||
| ) |
| size_t fsb::BodyTree::get_body_dofs | ( | size_t | body_index, |
| BodyTreeError & | err | ||
| ) | const |
Get the number of degrees of freedom for a body.
| body_index | Body index |
| err | Error code |
|
inline |
Get the gravity vector.
| BodyTreeError fsb::BodyTree::get_joint_position_limit | ( | size_t | joint_index, |
| bool & | is_set, | ||
| real_t & | lower_position, | ||
| real_t & | upper_position | ||
| ) | const |
Get joint position limits for a joint in the body tree.
Only single dof joints are supported.
| joint_index | Joint index | |
| [out] | is_set | True if joint position limits are set |
| [out] | lower_position | Minimum joint position limit |
| [out] | upper_position | Maximum joint position limit |
| BodyTreeError fsb::BodyTree::get_joint_velocity_limit | ( | size_t | joint_index, |
| real_t & | max_velocity | ||
| ) | const |
Get joint velocity limit for a joint in the body tree.
Only single dof joints are supported.
| joint_index | Joint index | |
| [out] | max_velocity | Maximum joint velocity limit |
|
inline |
Get a list of body indexes that are leaves (bodies without children)
| num_leaves | Number of leaves in body tree |
|
inline |
Get the number of bodies in tree.
|
inline |
Get the number of generalized position coordinates.
|
inline |
Get the number of body tree degrees of freedom.
|
inline |
Set the gravity vector.
| gravity | Gravity vector |
| BodyTreeError fsb::BodyTree::set_joint_position_limit | ( | size_t | joint_index, |
| real_t | lower_position, | ||
| real_t | upper_position | ||
| ) |
Set joint position limits for a joint in the body tree.
Only single dof joints are supported.
| joint_index | joint index |
| lower_position | Minimum joint position limit |
| upper_position | Maximum joint position limit |
| BodyTreeError fsb::BodyTree::set_joint_velocity_limit | ( | size_t | joint_index, |
| real_t | max_velocity | ||
| ) |
Set joint velocity limit for a joint in the body tree.
Only single dof joints are supported.
| joint_index | Joint index |
| max_velocity | Maximum joint velocity limit |
| BodyTreeError fsb::BodyTree::unset_joint_position_limit | ( | size_t | joint_index | ) |
Unset joint position limits for a joint in the body tree.
Only single dof joints are supported.
| joint_index | Joint index |