Skip to content

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 ​

Public member functions ​

setMaterial ​

cpp
void setMaterial(std::string value)

Override the material on restore, including when it equals the first child's captured material.

setCollisionGroup ​

cpp
void setCollisionGroup(CollisionGroup value)

Override the collision group on restore, including when it equals the first child's captured group.

setCollisionMask ​

cpp
void setCollisionMask(CollisionGroup value)

Override the collision mask on restore, including when it equals the first child's captured mask.

Public attributes ​

objectId ​

cpp
ObjectId objectId

Stable id of the captured object.

objectType ​

cpp
ObjectType objectType

Object type; restore fails if the target's type differs.

bodyType ​

cpp
BodyType bodyType

Body type (static/kinematic/dynamic).

position ​

cpp
Vec<3> position

Position in the world frame (m).

quaternion ​

cpp
Vec<4> quaternion

Orientation quaternion (w, x, y, z), body to world.

linearVelocity ​

cpp
Vec<3> linearVelocity

Linear velocity in the world frame (m/s).

angularVelocity ​

cpp
Vec<3> angularVelocity

Angular velocity in the world frame (rad/s).

material ​

cpp
std::string material

Collision material name (of the first child for a compound).

collisionGroup ​

cpp
CollisionGroup collisionGroup

Collision group (of the first child for a compound).

collisionMask ​

cpp
CollisionGroup collisionMask

Collision mask (of the first child for a compound).

compoundCollisionState ​

cpp
CompoundCollisionState compoundCollisionState

State saved by capture to restore each compound child. A changed scalar overrides its captured property on all children.

RaiSim — physics for robotics and AI.