Skip to content

raisim::Rasset::Collider ​

struct · #include <raisim/Rasset.hpp>

One collision shape, posed in the asset's local frame.

Public types ​

Type ​

cpp
enum class Type

Collision shape type, read from the XML type attribute: Cylinder ("cylinder", size = {radius, height}), Capsule ("capsule", size = {radius, height between hemisphere centers}), Sphere ("sphere", size = {radius}), Box ("box", size = full lengths {x, y, z}) and ConvexMesh ("convex_mesh", convex hull of the mesh file).

Enumerator
Cylinder
Capsule
Sphere
Box
ConvexMesh

Public attributes ​

type ​

cpp
Type type

Shape type.

mesh ​

cpp
std::filesystem::path mesh

Mesh file of a ConvexMesh collider, resolved against the descriptor's directory by load().

position ​

cpp
std::array<double, 3> position

Position in the asset frame (m, before instance scaling).

quaternion ​

cpp
std::array<double, 4> quaternion

Orientation in the asset frame (w, x, y, z); must be a unit quaternion.

size ​

cpp
std::array<double, 3> size

Shape dimensions (m, before instance scaling); see Type.

RaiSim — physics for robotics and AI.