#include <distance_manager.hpp>
Definition at line 50 of file distance_manager.hpp.
DistanceManager::~DistanceManager |
( |
| ) |
|
void DistanceManager::addObjectOfInterest |
( |
const std::string & |
id, |
|
|
PtrIMarkerShape_t |
s |
|
) |
| |
Add a new object of interest that shall be investigated for collisions.
- Parameters
-
s | Pointer to an already created MarkerShape that represent the object of interest (i.e. shape in reference frame of segment). |
Definition at line 177 of file distance_manager.cpp.
Add a new obstacle to the obstacles that shall be managed.
- Parameters
-
s | Pointer to an already created MarkerShape that represent an obstacle. |
Definition at line 171 of file distance_manager.cpp.
void DistanceManager::buildObstacleMesh |
( |
const moveit_msgs::CollisionObject::ConstPtr & |
msg, |
|
|
const tf::StampedTransform & |
transform |
|
) |
| |
|
private |
Build an obstacle from a message containing a mesh.
- Parameters
-
msg | Msg struct that contains mesh info. |
transform | The transformation from a frame in msg header to root_frame_id. |
Definition at line 452 of file distance_manager.cpp.
void DistanceManager::buildObstaclePrimitive |
( |
const moveit_msgs::CollisionObject::ConstPtr & |
msg, |
|
|
const tf::StampedTransform & |
transform |
|
) |
| |
|
private |
Build an obstacle from a message containing a primitive shape.
- Parameters
-
msg | Msg struct that contains mesh info. |
transform | The transformation from a frame in msg header to root_frame_id. |
Definition at line 525 of file distance_manager.cpp.
void DistanceManager::calculate |
( |
| ) |
|
Calculate the distances between the objects of interest (reference frames at KDL::segments) and obstacles. Publishes them on the obstacle_distance topic according to robot_namespace (arm_right, arm_left, ...)
Definition at line 195 of file distance_manager.cpp.
void DistanceManager::clear |
( |
| ) |
|
void DistanceManager::drawObjectsOfInterest |
( |
| ) |
|
void DistanceManager::drawObstacles |
( |
| ) |
|
const std::string DistanceManager::getRootFrame |
( |
| ) |
const |
|
inline |
Eigen::Affine3d DistanceManager::getSynchedCbToBlTransform |
( |
| ) |
|
Get method with mutex access on transform data.
- Returns
- Inverse transformation between chain base and base link.
Definition at line 644 of file distance_manager.cpp.
int DistanceManager::init |
( |
| ) |
|
Initialization of ROS robot structure, parameters, publishers and subscribers.
- Returns
- Error status. If 0 then success.
Definition at line 70 of file distance_manager.cpp.
void DistanceManager::jointstateCb |
( |
const sensor_msgs::JointState::ConstPtr & |
msg | ) |
|
bool DistanceManager::registerLinkOfInterest |
( |
cob_srvs::SetString::Request & |
request, |
|
|
cob_srvs::SetString::Response & |
response |
|
) |
| |
Registers a new link of interest for distance computation.
- Parameters
-
request | The service request for registration of a new link of interest (e.g. link name) |
response | Success message. |
- Returns
- Registration service call successfull or not.
Definition at line 604 of file distance_manager.cpp.
void DistanceManager::registerObstacle |
( |
const moveit_msgs::CollisionObject::ConstPtr & |
msg | ) |
|
Registers an obstacle via message.
- Parameters
-
msg | MoveIt CollisionObject message type. |
Definition at line 404 of file distance_manager.cpp.
void DistanceManager::transform |
( |
| ) |
|
tf Transformation thread between chain_base_link (arm_right_base_link or arm_left_base_link) and the root frame (e.g. base_link)). Runs endless.
Definition at line 310 of file distance_manager.cpp.
void DistanceManager::transformSelfCollisionLinks |
( |
const std::string |
link_name | ) |
|
Thread that runs endless to listen to transforms for the self collision parts of the robot. This will directly update the self collision obstacle pose.
- Parameters
-
link_name | The link name of the self collision checking part. Similar to link name in URDF. |
Definition at line 335 of file distance_manager.cpp.
std::string DistanceManager::chain_base_link_ |
|
private |
std::string DistanceManager::chain_tip_link_ |
|
private |
std::vector<std::string> DistanceManager::joints_ |
|
private |
std::mutex DistanceManager::mtx_ |
|
private |
boost::scoped_ptr<ShapesManager> DistanceManager::object_of_interest_mgr_ |
|
private |
std::mutex DistanceManager::obstacle_mgr_mtx_ |
|
private |
std::string DistanceManager::root_frame_id_ |
|
private |
std::vector<std::string> DistanceManager::segments_ |
|
private |
std::vector<std::thread> DistanceManager::self_collision_transform_threads_ |
|
private |
uint32_t DistanceManager::seq_nr_ = 0 |
|
staticprivate |
bool DistanceManager::stop_sca_threads_ |
|
private |
Eigen::Affine3d DistanceManager::tf_cb_frame_bl_ |
|
private |
The documentation for this class was generated from the following files: