Mujoco KDL Wrapper  0.2.2
MuJoCo + KDL bridge for robot kinematics and dynamics
Loading...
Searching...
No Matches
mj_kdl::SceneObject Struct Reference

#include <mj_kdl_wrapper.hpp>

Public Attributes

std::string name
std::string mjcf_path
AttachTarget attach_to
Shape shape = Shape::Unspecified
double size [3]
double pos [3] = { 0.0, 0.0, 0.0 }
float rgba [4]
bool fixed = false
double mass
Condim condim = Condim::Tangential
double friction [3]

Detailed Description

A free-floating or fixed rigid body to place in the scene.

size: BOX - half-extents (x, y, z) SPHERE - {radius, 0, 0} CYLINDER - {radius, half-length, 0} Ignored when mjcf_path is set.

attach_to: Parent in the accumulated scene spec. Default is the worldbody. A child object must appear after its parent in SceneSpec::objects. MuJoCo constraint: a body that carries a freejoint must be a direct child of the worldbody. So a non-fixed primitive (fixed == false) and any mjcf_path asset whose root body owns a freejoint must use AttachKind::World. Fixed primitives and articulated subtrees (no freejoint on the root) may use any kind. mj_compile reports the violation if this rule is broken.

pos: Offset in the resolved parent frame. For MJCF assets, this is the placement frame for the asset's first root body.

fixed: If true the body is welded to its parent (no freejoint); useful for static obstacles or fixtures. Ignored when mjcf_path is set.

Fields without an inline default (size, rgba, mass, friction) must be set explicitly by the caller. They are arbitrary visual/material/dynamic choices, not neutral identities, so the API refuses to invent placeholder values.

Definition at line 196 of file mj_kdl_wrapper.hpp.

Member Data Documentation

◆ attach_to

AttachTarget mj_kdl::SceneObject::attach_to

Definition at line 200 of file mj_kdl_wrapper.hpp.

◆ condim

Condim mj_kdl::SceneObject::condim = Condim::Tangential

Definition at line 207 of file mj_kdl_wrapper.hpp.

◆ fixed

bool mj_kdl::SceneObject::fixed = false

Definition at line 205 of file mj_kdl_wrapper.hpp.

Referenced by admittance_ft::build_scene().

◆ friction

double mj_kdl::SceneObject::friction[3]

Definition at line 208 of file mj_kdl_wrapper.hpp.

◆ mass

double mj_kdl::SceneObject::mass

Definition at line 206 of file mj_kdl_wrapper.hpp.

◆ mjcf_path

std::string mj_kdl::SceneObject::mjcf_path

Definition at line 199 of file mj_kdl_wrapper.hpp.

Referenced by admittance_ft::build_scene().

◆ name

std::string mj_kdl::SceneObject::name

Definition at line 198 of file mj_kdl_wrapper.hpp.

Referenced by admittance_ft::build_scene().

◆ pos

double mj_kdl::SceneObject::pos[3] = { 0.0, 0.0, 0.0 }

Definition at line 203 of file mj_kdl_wrapper.hpp.

Referenced by admittance_ft::build_scene().

◆ rgba

float mj_kdl::SceneObject::rgba[4]

Definition at line 204 of file mj_kdl_wrapper.hpp.

◆ shape

Shape mj_kdl::SceneObject::shape = Shape::Unspecified

Definition at line 201 of file mj_kdl_wrapper.hpp.

◆ size

double mj_kdl::SceneObject::size[3]

Definition at line 202 of file mj_kdl_wrapper.hpp.


The documentation for this struct was generated from the following file: