Drake
|
#include <drake/systems/plants/RigidBody.h>
Classes | |
class | CollisionElement |
Public Member Functions | |
RigidBody () | |
const std::string & | name () const |
Name of the body. More... | |
const std::string & | model_name () const |
An accessor for the name of the model or robot that this rigid body is a part of. More... | |
int | get_model_id () const |
Returns the ID of the model to which this rigid body belongs. More... | |
void | set_model_id (int model_id) |
Sets the ID of the model to which this rigid body belongs. More... | |
void | setJoint (std::unique_ptr< DrakeJoint > joint) |
Sets the parent joint through which this rigid body connects to its parent rigid body. More... | |
const DrakeJoint & | getJoint () const |
An accessor to this rigid body's parent joint. More... | |
bool | hasParent () const |
bool | has_as_parent (const RigidBody &other) const |
Checks if a particular rigid body is the parent of this rigid body. More... | |
void | addVisualElement (const DrakeShapes::VisualElement &elements) |
const DrakeShapes::VectorOfVisualElements & | getVisualElements () const |
void | setCollisionFilter (const DrakeCollision::bitmask &group, const DrakeCollision::bitmask &ignores) |
const DrakeCollision::bitmask & | getCollisionFilterGroup () const |
void | setCollisionFilterGroup (const DrakeCollision::bitmask &group) |
const DrakeCollision::bitmask & | getCollisionFilterIgnores () const |
void | setCollisionFilterIgnores (const DrakeCollision::bitmask &ignores) |
void | addToCollisionFilterGroup (const DrakeCollision::bitmask &group) |
void | ignoreCollisionFilterGroup (const DrakeCollision::bitmask &group) |
void | collideWithCollisionFilterGroup (const DrakeCollision::bitmask &group) |
bool | adjacentTo (const RigidBody &other) const |
bool | CollidesWith (const RigidBody &other) const |
bool | appendCollisionElementIdsFromThisBody (const std::string &group_name, std::vector< DrakeCollision::ElementId > &ids) const |
bool | appendCollisionElementIdsFromThisBody (std::vector< DrakeCollision::ElementId > &ids) const |
void | ApplyTransformToJointFrame (const Eigen::Isometry3d &transform_body_to_joint) |
Transforms all of the visual, collision, and inertial elements associated with this body to the proper joint frame. More... | |
Public Attributes | |
std::string | name_ |
The name of this rigid body. More... | |
std::string | model_name_ |
The name of the model to which this rigid body belongs. More... | |
int | robotnum |
A unique ID for each model. It uses 0-index, starts from 0. More... | |
RigidBody * | parent |
The rigid body that's connected to this rigid body's joint. More... | |
int | body_index |
The index of this rigid body in the rigid body tree. More... | |
int | position_num_start |
The starting index of this rigid body's joint's position value(s) within the parent tree's state vector. More... | |
int | velocity_num_start |
The starting index of this rigid body's joint's velocity value(s) within the parent tree's state vector. More... | |
DrakeShapes::VectorOfVisualElements | visual_elements |
A list of visual elements for this RigidBody. More... | |
std::vector< DrakeCollision::ElementId > | collision_element_ids |
std::map< std::string, std::vector< DrakeCollision::ElementId > > | collision_element_groups |
Eigen::Matrix3Xd | contact_pts |
double | mass |
The mass of this rigid body. More... | |
Eigen::Vector3d | com |
The center of mass of this rigid body. More... | |
drake::SquareTwistMatrix< double > | I |
The spatial rigid body inertia of this rigid body. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const RigidBody &b) |
RigidBody | ( | ) |
|
inline |
void addVisualElement | ( | const DrakeShapes::VisualElement & | elements | ) |
bool adjacentTo | ( | const RigidBody & | other | ) | const |
bool appendCollisionElementIdsFromThisBody | ( | const std::string & | group_name, |
std::vector< DrakeCollision::ElementId > & | ids | ||
) | const |
bool appendCollisionElementIdsFromThisBody | ( | std::vector< DrakeCollision::ElementId > & | ids | ) | const |
void ApplyTransformToJointFrame | ( | const Eigen::Isometry3d & | transform_body_to_joint | ) |
Transforms all of the visual, collision, and inertial elements associated with this body to the proper joint frame.
This is necessary, for instance, to support SDF loading where the child frame can be specified independently from the joint frame. In our RigidBodyTree classes, the body frame IS the joint frame.
transform_body_to_joint | The transform from this body's frame to the joint's frame. |
|
inline |
|
inline |
int get_model_id | ( | ) | const |
Returns the ID of the model to which this rigid body belongs.
|
inline |
|
inline |
const DrakeJoint & getJoint | ( | ) | const |
An accessor to this rigid body's parent joint.
By "parent joint" we mean the joint through which this rigid body connects to its parent rigid body in the rigid body tree.
const DrakeShapes::VectorOfVisualElements & getVisualElements | ( | ) | const |
|
inline |
Checks if a particular rigid body is the parent of this rigid body.
[in] | other | The potential parent of this rigid body. |
bool hasParent | ( | ) | const |
|
inline |
const std::string & model_name | ( | ) | const |
An accessor for the name of the model or robot that this rigid body is a part of.
const std::string & name | ( | ) | const |
Name of the body.
An accessor for the name of the body that this rigid body represents.
void set_model_id | ( | int | model_id | ) |
Sets the ID of the model to which this rigid body belongs.
void setCollisionFilter | ( | const DrakeCollision::bitmask & | group, |
const DrakeCollision::bitmask & | ignores | ||
) |
|
inline |
|
inline |
void setJoint | ( | std::unique_ptr< DrakeJoint > | joint | ) |
Sets the parent joint through which this rigid body connects to its parent rigid body.
[in] | joint | The parent joint of this rigid body. Note that this rigid body assumes ownership of this joint. |
|
friend |
int body_index |
The index of this rigid body in the rigid body tree.
std::map<std::string, std::vector<DrakeCollision::ElementId> > collision_element_groups |
std::vector<DrakeCollision::ElementId> collision_element_ids |
Eigen::Vector3d com |
The center of mass of this rigid body.
Eigen::Matrix3Xd contact_pts |
The spatial rigid body inertia of this rigid body.
double mass |
The mass of this rigid body.
std::string model_name_ |
The name of the model to which this rigid body belongs.
std::string name_ |
The name of this rigid body.
RigidBody* parent |
The rigid body that's connected to this rigid body's joint.
int position_num_start |
The starting index of this rigid body's joint's position value(s) within the parent tree's state vector.
int robotnum |
A unique ID for each model. It uses 0-index, starts from 0.
int velocity_num_start |
The starting index of this rigid body's joint's velocity value(s) within the parent tree's state vector.
DrakeShapes::VectorOfVisualElements visual_elements |
A list of visual elements for this RigidBody.