Exotica
|
The class of collision scene. More...
#include <collision_scene.h>
Public Member Functions | |
CollisionScene () | |
virtual | ~CollisionScene () |
virtual void | InstantiateBase (const Initializer &init) |
Instantiates the base properties of the CollisionScene. More... | |
virtual void | Setup () |
Setup additional construction that requires initialiser parameter. More... | |
virtual bool | IsAllowedToCollide (const std::string &o1, const std::string &o2, const bool &self) |
Returns whether two collision objects/shapes are allowed to collide by name. More... | |
virtual bool | IsStateValid (bool self=true, double safe_distance=0.0)=0 |
Checks if the whole robot is valid (collision only). More... | |
virtual bool | IsCollisionFree (const std::string &o1, const std::string &o2, double safe_distance=0.0) |
Checks if two objects are in collision. More... | |
virtual std::vector< CollisionProxy > | GetCollisionDistance (bool self) |
Computes collision distances. More... | |
virtual std::vector< CollisionProxy > | GetCollisionDistance (const std::string &o1, const std::string &o2) |
Computes collision distances between two objects. More... | |
virtual std::vector< CollisionProxy > | GetCollisionDistance (const std::string &o1, const bool &self) |
Gets the closest distance of any collision object which is allowed to collide with any collision object related to object o1. More... | |
virtual std::vector< CollisionProxy > | GetCollisionDistance (const std::string &o1, const bool &self, const bool &disable_collision_scene_update) |
Gets the closest distance of any collision object which is allowed to collide with any collision object related to object o1. More... | |
virtual std::vector< CollisionProxy > | GetCollisionDistance (const std::vector< std::string > &objects, const bool &self) |
Gets the closest distance of any collision object which is allowed to collide with any collision object related to any of the objects. More... | |
virtual std::vector< CollisionProxy > | GetRobotToRobotCollisionDistance (double check_margin) |
Gets the closest distances between links within the robot that are closer than check_margin. More... | |
virtual std::vector< CollisionProxy > | GetRobotToWorldCollisionDistance (double check_margin) |
Gets the closest distances between links of the robot and the environment that are closer than check_margin. More... | |
virtual std::vector< std::string > | GetCollisionWorldLinks ()=0 |
Gets the collision world links. More... | |
virtual std::vector< std::string > | GetCollisionRobotLinks ()=0 |
Gets the collision robot links. More... | |
virtual ContinuousCollisionProxy | ContinuousCollisionCheck (const std::string &o1, const KDL::Frame &tf1_beg, const KDL::Frame &tf1_end, const std::string &o2, const KDL::Frame &tf2_beg, const KDL::Frame &tf2_end) |
Performs a continuous collision check between two objects with a linear interpolation between two given. More... | |
virtual std::vector< ContinuousCollisionProxy > | ContinuousCollisionCast (const std::vector< std::vector< std::tuple< std::string, Eigen::Isometry3d, Eigen::Isometry3d >>> &motion_transforms) |
Performs a continuous collision check by casting the active objects passed in against the static environment. More... | |
virtual Eigen::Vector3d | GetTranslation (const std::string &name)=0 |
Returns the translation of the named collision object. More... | |
void | SetACM (const AllowedCollisionMatrix &acm) |
bool | GetAlwaysExternallyUpdatedCollisionScene () const |
void | SetAlwaysExternallyUpdatedCollisionScene (const bool value) |
double | GetRobotLinkScale () const |
void | SetRobotLinkScale (const double scale) |
double | GetWorldLinkScale () const |
void | SetWorldLinkScale (const double scale) |
double | GetRobotLinkPadding () const |
void | SetRobotLinkPadding (const double padding) |
double | GetWorldLinkPadding () const |
void | SetWorldLinkPadding (const double padding) |
bool | GetReplacePrimitiveShapesWithMeshes () const |
void | SetReplacePrimitiveShapesWithMeshes (const bool value) |
virtual void | UpdateCollisionObjects (const std::map< std::string, std::weak_ptr< KinematicElement >> &objects)=0 |
Creates the collision scene from kinematic elements. More... | |
virtual void | UpdateCollisionObjectTransforms ()=0 |
Updates collision object transformations from the kinematic tree. More... | |
bool | get_replace_cylinders_with_capsules () const |
void | set_replace_cylinders_with_capsules (const bool value) |
void | AssignScene (std::shared_ptr< Scene > scene) |
Sets a scene pointer to the CollisionScene for access to methods. More... | |
Public Member Functions inherited from exotica::Object | |
Object () | |
virtual | ~Object () |
virtual std::string | type () const |
Type Information wrapper: must be virtual so that it is polymorphic... More... | |
std::string | GetObjectName () |
void | InstantiateObject (const Initializer &init) |
virtual std::string | Print (const std::string &prepend) const |
Public Member Functions inherited from exotica::Uncopyable | |
Uncopyable ()=default | |
~Uncopyable ()=default | |
Public Member Functions inherited from exotica::InstantiableBase | |
InstantiableBase ()=default | |
virtual | ~InstantiableBase ()=default |
virtual Initializer | GetInitializerTemplate ()=0 |
virtual void | InstantiateInternal (const Initializer &init)=0 |
virtual std::vector< Initializer > | GetAllTemplates () const =0 |
Public Attributes | |
bool | debug_ = false |
Public Attributes inherited from exotica::Object | |
std::string | ns_ |
std::string | object_name_ |
bool | debug_ |
Protected Attributes | |
bool | needs_update_of_collision_objects_ = true |
Indicates whether TriggerUpdateCollisionObjects needs to be called. More... | |
std::weak_ptr< Scene > | scene_ |
Stores a pointer to the Scene which owns this CollisionScene. More... | |
AllowedCollisionMatrix | acm_ |
The allowed collision matrix. More... | |
bool | always_externally_updated_collision_scene_ = false |
Whether the collision scene is automatically updated - if not, update on queries. More... | |
double | robot_link_scale_ = 1.0 |
Robot link scaling. More... | |
double | world_link_scale_ = 1.0 |
World link scaling. More... | |
double | robot_link_padding_ = 0.0 |
Robot link padding. More... | |
double | world_link_padding_ = 0.0 |
World link padding. More... | |
bool | replace_primitive_shapes_with_meshes_ = false |
Replace primitive shapes with meshes internally (e.g. when primitive shape algorithms are brittle, i.e. in FCL) More... | |
bool | replace_cylinders_with_capsules_ = false |
Replace cylinders with capsules internally. More... | |
std::string | robot_link_replacement_config_ = "" |
Filename for config file (YAML) which contains shape replacements. More... | |
The class of collision scene.
|
inline |
|
inlinevirtual |
|
inline |
Sets a scene pointer to the CollisionScene for access to methods.
|
inlinevirtual |
Performs a continuous collision check by casting the active objects passed in against the static environment.
[in] | motion_transforms | A tuple consisting out of collision object name and its beginning and final transform. |
|
inlinevirtual |
Performs a continuous collision check between two objects with a linear interpolation between two given.
[in] | o1 | The first collision object, by name. |
[in] | tf1_beg | The beginning transform for o1. |
[in] | tf1_end | The end transform for o1. |
[in] | o2 | The second collision object, by name. |
[in] | tf2_beg | The beginning transform for o2. |
[in] | tf2_end | The end transform for o2. |
Reimplemented in exotica::CollisionSceneFCLLatest.
|
inline |
|
inline |
|
inlinevirtual |
Computes collision distances.
self | Indicate if self collision check is required. |
Reimplemented in exotica::CollisionSceneFCLLatest.
|
inlinevirtual |
Gets the closest distance of any collision object which is allowed to collide with any collision object related to object o1.
[in] | o1 | Name of object 1. |
Reimplemented in exotica::CollisionSceneFCLLatest.
|
inlinevirtual |
Gets the closest distance of any collision object which is allowed to collide with any collision object related to object o1.
[in] | o1 | Name of object 1. |
[in] | disable_collision_scene_update | Allows disabling of collision object transforms (requires manual update). |
Reimplemented in exotica::CollisionSceneFCLLatest.
|
inlinevirtual |
Computes collision distances between two objects.
o1 | Name of object 1. |
o2 | Name of object 2. |
Reimplemented in exotica::CollisionSceneFCLLatest.
|
inlinevirtual |
Gets the closest distance of any collision object which is allowed to collide with any collision object related to any of the objects.
[in] | objects | Vector of object names. |
Reimplemented in exotica::CollisionSceneFCLLatest.
|
pure virtual |
Gets the collision robot links.
Implemented in exotica::CollisionSceneFCLLatest.
|
pure virtual |
Gets the collision world links.
Implemented in exotica::CollisionSceneFCLLatest.
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Gets the closest distances between links within the robot that are closer than check_margin.
[in] | check_margin | Margin for distance checks - only objects closer than this margin will be checked |
Reimplemented in exotica::CollisionSceneFCLLatest.
|
inlinevirtual |
Gets the closest distances between links of the robot and the environment that are closer than check_margin.
[in] | check_margin | Margin for distance checks - only objects closer than this margin will be checked |
Reimplemented in exotica::CollisionSceneFCLLatest.
|
pure virtual |
Returns the translation of the named collision object.
[in] | name | Name of the collision object to query. |
Implemented in exotica::CollisionSceneFCLLatest.
|
inline |
|
inline |
|
virtual |
Instantiates the base properties of the CollisionScene.
Reimplemented from exotica::InstantiableBase.
|
virtual |
Returns whether two collision objects/shapes are allowed to collide by name.
o1 | Name of the frame of the collision object (e.g., base_link_collision_0) |
o2 | Name of the frame of the other collision object (e.g., base_link_collision_0) |
Reimplemented in exotica::CollisionSceneFCLLatest.
|
inlinevirtual |
Checks if two objects are in collision.
o1 | Name of object 1. |
o2 | Name of object 2. |
Reimplemented in exotica::CollisionSceneFCLLatest.
|
pure virtual |
Checks if the whole robot is valid (collision only).
self | Indicate if self collision check is required. |
Implemented in exotica::CollisionSceneFCLLatest.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Setup additional construction that requires initialiser parameter.
Reimplemented in exotica::CollisionSceneFCLLatest.
|
inline |
|
inline |
|
pure virtual |
Creates the collision scene from kinematic elements.
objects | Vector kinematic element pointers of collision objects. |
Implemented in exotica::CollisionSceneFCLLatest.
|
pure virtual |
Updates collision object transformations from the kinematic tree.
Implemented in exotica::CollisionSceneFCLLatest.
|
protected |
The allowed collision matrix.
|
protected |
Whether the collision scene is automatically updated - if not, update on queries.
bool exotica::CollisionScene::debug_ = false |
|
protected |
Indicates whether TriggerUpdateCollisionObjects needs to be called.
|
protected |
Replace cylinders with capsules internally.
|
protected |
Replace primitive shapes with meshes internally (e.g. when primitive shape algorithms are brittle, i.e. in FCL)
|
protected |
Robot link padding.
|
protected |
Filename for config file (YAML) which contains shape replacements.
|
protected |
Robot link scaling.
|
protected |
Stores a pointer to the Scene which owns this CollisionScene.
|
protected |
World link padding.
|
protected |
World link scaling.