Struct PhysicalBodyParams#

Inheritance Relationships#

Derived Type#

Struct Documentation#

struct PhysicalBodyParams#

Struct with parameters for a PhysicalBody rigid physical body.

Subclassed by Karana::Dynamics::PhysicalModalBodyParams

Public Functions

PhysicalBodyParams(km::SpatialInertia sp_i = km::SpatialInertia(2.0, km::Vec3(0.3, 0.2, 0.1), Eigen::DiagonalMatrix<double, 3>(3, 2, 1)), km::HomTran body_to_joint_transform = km::HomTran(km::UnitQuaternion(.8, .6, 0, 0), km::Vec3(.2, .3, .4)), km::HomTran inb_to_joint_transform = km::HomTran(km::UnitQuaternion(.5, .5, .5, .5), km::Vec3(.4, .2, .3)), PhysicalHingeParams hinge_params = {}, std::vector<ks::ScenePartSpec> scene_part_specs = {}, std::vector<ks::SceneFileObjectSpec> scene_file_object_specs = {})#

Constructor.

Parameters:
  • sp_i – The spatial inertia to assign to each body

  • body_to_joint_transform – The body to joint transform for the bodies

  • inb_to_joint_transform – The inboard body to joint transform for the bodies

  • hinge_params – The data for the body’s hinge

  • scene_part_specs – List of scene part specs for the body

  • scene_file_object_specs – List of scene file object specs for the body

virtual ~PhysicalBodyParams()#

Destructor.

inline PhysicalBodyParams &operator=(const PhysicalBodyParams &p) noexcept#

copy operator

Parameters:

p – the other params struct

Returns:

the updated params struct

Public Members

km::SpatialInertia sp_i = = km::SpatialInertia(2.0,                    km::Vec3(0.3, 0.2, 0.1),Eigen::DiagonalMatrix<double, 3>(3, 2, 1))#

the spatial inertia to assign to each body

km::HomTran body_to_joint_transform = = km::HomTran(km::UnitQuaternion(.8, .6, 0, 0),             km::Vec3(.2, .3, .4))#

the body to joint transform for the bodies

km::HomTran inb_to_joint_transform = = km::HomTran( km::UnitQuaternion(.5, .5, .5, .5), km::Vec3(.4, .2, .3))#

the inboard body to joint transform for the bodies

PhysicalHingeParams hinge_params#

The data for the body’s hinge.

std::vector<ks::ScenePartSpec> scene_part_specs = {}#

list of scene part specs for the body

std::vector<ks::SceneFileObjectSpec> scene_file_object_specs = {}#

list of scene file object specs for the body