JointView¶
Lightweight wrapper around MuJoCo joint data.
void SetFriction(float Value) { if (geom_friction) geom_friction[0] = (mjtNum)Value; } / @brief Sets the contact solver reference parameters (time constant, damping ratio). */ void SetSolRef(float TimeConst, float DampRatio) { if (geom_solref) { geom_solref[0] = (mjtNum)TimeConst; geom_solref[1] = (mjtNum)DampRatio; } } / @brief Sets the contact solver impedance parameters. / void SetSolImp(float Dmin, float Dmax, float Width) { if (geom_solimp) { geom_solimp[0] = (mjtNum)Dmin; geom_solimp[1] = (mjtNum)Dmax; geom_solimp[2] = (mjtNum)Width; } } FString ToString() const { FString Info = FString::Printf(TEXT("=== Geom ID: %d (%s) ===\n"), id, name ? MjUtils::MjToString(name) : TEXT("None")); Info += FString::Printf(TEXT(" Type: %d | Size: %s\n"), geom_type, FormatVec3(geom_size)); Info += FString::Printf(TEXT(" World Pos: %s\n"), FormatVec3(geom_xpos)); return Info; } }; /**
| Attribute | Value |
|---|---|
| Kind | Struct |
Properties¶
Public Properties¶
| Property | Type | Description |
|---|---|---|
obj_type |
static constexpr mjtObj |
|
id |
int |
|
name |
const char* |
|
jnt_type |
int |
|
jnt_qposadr |
int |
|
jnt_dofadr |
int |
|
jnt_bodyid |
int |
|
jnt_actuatorid |
int |
|
jnt_group |
int |
|
jnt_limited |
mjtBool* |
|
jnt_actfrclimited |
mjtBool* |
|
jnt_actgravcomp |
mjtBool* |
|
jnt_solref |
mjtNum* |
|
jnt_solimp |
mjtNum* |
|
jnt_pos |
mjtNum* |
|
jnt_axis |
mjtNum* |
|
jnt_stiffness |
mjtNum* |
|
jnt_stiffnesspoly |
mjtNum* |
|
jnt_range |
mjtNum* |
|
jnt_actfrcrange |
mjtNum* |
|
jnt_margin |
mjtNum* |
|
jnt_user |
mjtNum* |
|
dof_bodyid |
int |
|
dof_jntid |
int |
|
dof_parentid |
int |
|
dof_treeid |
int |
|
dof_Madr |
int |
|
dof_simplenum |
int |
|
dof_solref |
mjtNum* |
|
dof_solimp |
mjtNum* |
|
dof_frictionloss |
mjtNum* |
|
dof_armature |
mjtNum* |
|
dof_damping |
mjtNum* |
|
dof_dampingpoly |
mjtNum* |
|
dof_invweight0 |
mjtNum* |
|
dof_M0 |
mjtNum* |
|
dof_length |
mjtNum* |
|
qpos |
mjtNum* |
|
qvel |
mjtNum* |
|
qacc |
mjtNum* |
|
xanchor |
mjtNum* |
|
xaxis |
mjtNum* |
obj_type¶
- Type: static constexpr mjtObj
id¶
- Type: int
name¶
- Type: const char*
jnt_type¶
- Type: int
jnt_qposadr¶
- Type: int
jnt_dofadr¶
- Type: int
jnt_bodyid¶
- Type: int
jnt_actuatorid¶
- Type: int
jnt_group¶
- Type: int
jnt_limited¶
- Type: mjtBool*
jnt_actfrclimited¶
- Type: mjtBool*
jnt_actgravcomp¶
- Type: mjtBool*
jnt_solref¶
- Type: mjtNum*
jnt_solimp¶
- Type: mjtNum*
jnt_pos¶
- Type: mjtNum*
jnt_axis¶
- Type: mjtNum*
jnt_stiffness¶
- Type: mjtNum*
jnt_stiffnesspoly¶
- Type: mjtNum*
jnt_range¶
- Type: mjtNum*
jnt_actfrcrange¶
- Type: mjtNum*
jnt_margin¶
- Type: mjtNum*
jnt_user¶
- Type: mjtNum*
dof_bodyid¶
- Type: int
dof_jntid¶
- Type: int
dof_parentid¶
- Type: int
dof_treeid¶
- Type: int
dof_Madr¶
- Type: int
dof_simplenum¶
- Type: int
dof_solref¶
- Type: mjtNum*
dof_solimp¶
- Type: mjtNum*
dof_frictionloss¶
- Type: mjtNum*
dof_armature¶
- Type: mjtNum*
dof_damping¶
- Type: mjtNum*
dof_dampingpoly¶
- Type: mjtNum*
dof_invweight0¶
- Type: mjtNum*
dof_M0¶
- Type: mjtNum*
dof_length¶
- Type: mjtNum*
qpos¶
- Type: mjtNum*
qvel¶
- Type: mjtNum*
qacc¶
- Type: mjtNum*
xanchor¶
- Type: mjtNum*
xaxis¶
- Type: mjtNum*
Functions¶
Public Functions¶
General¶
| Function | Returns | Description |
|---|---|---|
GetPosition() |
float |
Gets the current joint position (radians for hinges, meters for sliders). |
SetPosition() |
void | Directly sets the joint position. Warning: teleports the physics state. |
GetPosition¶
Gets the current joint position (radians for hinges, meters for sliders).
- Signature:
GetPosition() - Returns: float
SetPosition¶
Directly sets the joint position. Warning: teleports the physics state.
- Signature:
SetPosition(floatValue)