Tesseract
Motion Planning Environment
|
Stores information about how the margins allowed between collision objects. More...
#include <collision_margin_data.h>
Public Types | |
using | Ptr = std::shared_ptr< CollisionMarginData > |
using | ConstPtr = std::shared_ptr< const CollisionMarginData > |
Public Member Functions | |
CollisionMarginData (double default_collision_margin=0) | |
CollisionMarginData (double default_collision_margin, PairsCollisionMarginData pair_collision_margins) | |
CollisionMarginData (PairsCollisionMarginData pair_collision_margins) | |
void | setDefaultCollisionMargin (double default_collision_margin) |
Set the default collision margin. More... | |
double | getDefaultCollisionMargin () const |
Get the default collision margin. More... | |
void | setPairCollisionMargin (const std::string &obj1, const std::string &obj2, double collision_margin) |
Set the margin for a given contact pair. More... | |
double | getPairCollisionMargin (const std::string &obj1, const std::string &obj2) const |
Get the pairs collision margin data. More... | |
const PairsCollisionMarginData & | getPairCollisionMargins () const |
Get Collision Margin Data for stored pairs. More... | |
double | getMaxCollisionMargin () const |
Get the largest collision margin. More... | |
void | incrementMargins (const double &increment) |
Increment all margins by input amount. Useful for inflating or reducing margins. More... | |
void | scaleMargins (const double &scale) |
Scale all margins by input value. More... | |
void | apply (const CollisionMarginData &collision_margin_data, CollisionMarginOverrideType override_type) |
Apply the contents of the provide CollisionMarginData based on the override type. More... | |
bool | operator== (const CollisionMarginData &rhs) const |
bool | operator!= (const CollisionMarginData &rhs) const |
Private Member Functions | |
void | updateMaxCollisionMargin () |
Update the max collision margin. More... | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Private Attributes | |
double | default_collision_margin_ { 0 } |
Stores the collision margin used if no pair-specific one is set. More... | |
double | max_collision_margin_ { 0 } |
Stores the largest collision margin. More... | |
PairsCollisionMarginData | lookup_table_ |
A map of link pair names to contact distance. More... | |
Friends | |
class | boost::serialization::access |
Stores information about how the margins allowed between collision objects.
using tesseract_common::CollisionMarginData::ConstPtr = std::shared_ptr<const CollisionMarginData> |
using tesseract_common::CollisionMarginData::Ptr = std::shared_ptr<CollisionMarginData> |
|
inline |
|
inline |
|
inline |
|
inline |
Apply the contents of the provide CollisionMarginData based on the override type.
collision_margin_data | The collision margin data to apply |
override_type | The type indicating how the provided data should be applied. |
|
inline |
Get the default collision margin.
|
inline |
Get the largest collision margin.
This used when setting the contact distance in the contact manager.
|
inline |
Get the pairs collision margin data.
If a collision margin for the request pair does not exist it returns the default collision margin data.
obj1 | The first object name |
obj2 | The second object name |
|
inline |
Get Collision Margin Data for stored pairs.
|
inline |
Increment all margins by input amount. Useful for inflating or reducing margins.
increment | Amount to increment margins |
bool tesseract_common::CollisionMarginData::operator!= | ( | const CollisionMarginData & | rhs | ) | const |
bool tesseract_common::CollisionMarginData::operator== | ( | const CollisionMarginData & | rhs | ) | const |
|
inline |
Scale all margins by input value.
scale | Value by which all margins are multiplied |
|
private |
|
inline |
Set the default collision margin.
default_collision_margin | New default collision margin |
|
inline |
Set the margin for a given contact pair.
The order of the object names does not matter, that is handled internal to the class.
obj1 | The first object name. Order doesn't matter |
obj2 | The Second object name. Order doesn't matter |
collision_margin | contacts with distance < collision_margin are considered in collision |
|
inlineprivate |
Update the max collision margin.
|
friend |
|
private |
Stores the collision margin used if no pair-specific one is set.
|
private |
A map of link pair names to contact distance.
|
private |
Stores the largest collision margin.