raisim::CollisionBody
struct · #include <raisim/object/ArticulatedSystem/JointAndBodies.hpp>
Collision geometry description of a Body, used when building an articulated system (see Body::addCollisionObject()).
Constructors & destructor
CollisionBody
cpp
CollisionBody(
Shape::Type col_shape,
const Vec<4> &col_shapeParam,
const raisim::Vec<3> &col_origin,
const raisim::Mat<3, 3> &col_rotMat,
const std::string &col_name,
const std::string &col_material,
const std::string &col_visualizedMaterial)to add a primitive (fatal for Shape::Mesh)
Parameters
| Parameter | Description |
|---|---|
col_shape (in) | choices, Box, Cylinder, Sphere, Capsule |
col_shapeParam (in) | params associated with shape, for sphere: {radius}, for Box: {lx, ly, lz}, for Cylinder: {radius, height}, for Capsule: {radius, height}, |
col_origin (in) | position of the collision object in the body frame |
col_rotMat (in) | orientation of the collision object relative to the body frame |
col_name (in) | name of the collision body, |
col_material (in) | collision material that defines contact physics |
col_visualizedMaterial (in) | how the collision body should be visualized |
cpp
CollisionBody(
const std::string &col_meshFileName,
const raisim::Vec<3> &col_origin,
const raisim::Mat<3, 3> &col_rotMat,
const raisim::Vec<3> &col_meshScale,
const std::string &col_name,
const std::string &col_material,
const std::string &col_visualizedMaterial)to add mesh
Parameters
| Parameter | Description |
|---|---|
col_meshFileName (in) | file location relative to the resource directory of the articulated system, |
col_origin (in) | position of the collision object in the body frame |
col_rotMat (in) | orientation of the collision object relative to the body frame |
col_meshScale (in) | scaling size, |
col_name (in) | name of the collision body, |
col_material (in) | collision material that defines contact physics |
col_visualizedMaterial (in) | how the collision body should be visualized |
cpp
CollisionBody(
Shape::Type col_shape,
const Vec<4> &col_shapeParam,
const raisim::Vec<3> &col_origin,
const raisim::Mat<3, 3> &col_rotMat,
const raisim::Vec<3> &col_meshScale,
const std::string &col_name,
const std::string &col_material,
const std::string &col_visualizedMaterial,
const std::string &col_meshFileName)primitive or mesh
Parameters
| Parameter | Description |
|---|---|
col_shape (in) | choices, Box, Cylinder, Sphere, mesh, Capsule |
col_shapeParam (in) | params associated with shape, for sphere: {radius}, for Box: {lx, ly, lz}, for Cylinder: {radius, height}, for mesh: None for Capsule: {radius, height}, |
col_origin (in) | position of the collision object in the body frame |
col_rotMat (in) | orientation of the collision object relative to the body frame |
col_meshScale (in) | for mesh only, scaling size, |
col_name (in) | name of the collision body, |
col_material (in) | collision material that defines contact physics |
col_visualizedMaterial (in) | how the collision body should be visualized |
col_meshFileName (in) | file location relative to the resource directory of the articulated system |
Public attributes
shape
cpp
Shape::Type shapeShape type for the collision geometry.
scale
cpp
raisim::Vec<3> scalePer-axis mesh scale.
shapeParam
cpp
raisim::Vec<4> shapeParamShape parameters (dimension depends on shape type).
offset
cpp
raisim::Vec<3> offsetPosition offset from the body frame.
rot
cpp
raisim::Mat<3, 3> rotOrientation offset from the body frame.
name
cpp
std::string nameCollision body name.
materialName
cpp
std::string materialNameMaterial name for contact properties.
collisionVisualizationMaterial
cpp
std::string collisionVisualizationMaterialMaterial name used to visualize collision geometry.
colMeshFileName
cpp
std::string colMeshFileNameMesh file name for mesh collisions.
group
cpp
CollisionGroup groupCollision group bits (default 1).
mask
cpp
CollisionGroup maskCollision mask bits (default: all).