raisim::World::SingleBodySnapshotV2
struct · #include <raisim/World.hpp>
Snapshot of a single-body object's runtime state and collision properties. It is intended for fast RL reset/randomization workflows between simulation steps.
Nested classes
classCompoundCollisionState
Public member functions
setMaterial
void setMaterial(std::string value)Override the material on restore, including when it equals the first child's captured material.
setCollisionGroup
void setCollisionGroup(CollisionGroup value)Override the collision group on restore, including when it equals the first child's captured group.
setCollisionMask
void setCollisionMask(CollisionGroup value)Override the collision mask on restore, including when it equals the first child's captured mask.
Public attributes
objectId
ObjectId objectIdStable id of the captured object.
objectType
ObjectType objectTypeObject type; restore fails if the target's type differs.
bodyType
BodyType bodyTypeBody type (static/kinematic/dynamic).
position
Vec<3> positionPosition in the world frame (m).
quaternion
Vec<4> quaternionOrientation quaternion (w, x, y, z), body to world.
linearVelocity
Vec<3> linearVelocityLinear velocity in the world frame (m/s).
angularVelocity
Vec<3> angularVelocityAngular velocity in the world frame (rad/s).
material
std::string materialCollision material name (of the first child for a compound).
collisionGroup
CollisionGroup collisionGroupCollision group (of the first child for a compound).
collisionMask
CollisionGroup collisionMaskCollision mask (of the first child for a compound).
compoundCollisionState
CompoundCollisionState compoundCollisionStateState saved by capture to restore each compound child. A changed scalar overrides its captured property on all children.