Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
srs_env_model::CCMapPlugin Class Reference

#include <cmap_plugin.h>

Inheritance diagram for srs_env_model::CCMapPlugin:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CCMapPlugin (const std::string &name)
 Constructor.
void enable (bool enabled)
 Enable or disable publishing.
virtual void init (ros::NodeHandle &node_handle)
 Initialize plugin - called in server constructor.
bool lockChanges (bool bLock)
 Enable/disable collision map changes.
virtual void pause (bool bPause, ros::NodeHandle &node_handle)
 Connect/disconnect plugin to/from all topics.

Protected Types

typedef
arm_navigation_msgs::OrientedBoundingBox 
tBox
 Box type.
typedef geometry_msgs::Point32 tBoxPoint
 Point type.
typedef
arm_navigation_msgs::CollisionMap::_boxes_type 
tBoxVec
 Boxes vector type.
typedef COctomapCrawlerBase
< tButServerOcTree::NodeType > 
tOctomapCrawler
 Crawler type.

Protected Member Functions

void addBox (const tBoxPoint &center, const tBoxPoint &size, tBoxVec &boxes)
 Adds box to the collision map.
bool addBoxCallback (srs_env_model::RemoveCube::Request &req, srs_env_model::RemoveCube::Response &res)
 Remove all boxes from cubical volume - service callback function.
bool getCollisionMapSrvCallback (srs_env_model::GetCollisionMap::Request &req, srs_env_model::GetCollisionMap::Response &res)
 Get collision map service call.
void handleOccupiedNode (tButServerOcTree::iterator &it, const SMapWithParameters &mp)
 hook that is called when traversing occupied nodes of the updated Octree (does nothing here)
bool isNearRobot (const btVector3 &point, double extent)
 Test collision point if it is in the collision distance from the robot.
bool isNewCmapSrvCallback (srs_env_model::IsNewCollisionMap::Request &req, srs_env_model::IsNewCollisionMap::Response &res)
 Get true if given timestamp is older then current map time.
bool lockCmapSrvCallback (srs_env_model::LockCollisionMap::Request &req, srs_env_model::LockCollisionMap::Response &res)
 Lock collision map - disable its updates from new point cloud data.
virtual void newMapDataCB (SMapWithParameters &par)
 Set used octomap frame id and timestamp.
virtual void publishInternal (const ros::Time &timestamp)
 Called when new scan was inserted and now all can be published.
bool removeBoxCallback (srs_env_model::RemoveCube::Request &req, srs_env_model::RemoveCube::Response &res)
 Remove all boxes from cubical volume - service callback function.
long removeInsideBox (const tBoxPoint &center, const tBoxPoint &size, tBoxVec &boxes)
 Remove all collision boxes within given box. Box is aligned with axes and uses the same frame id.
void retransformTF (const ros::Time &currentTime)
 retransform map to the new time frame
bool sameCMaps (arm_navigation_msgs::CollisionMap *map1, arm_navigation_msgs::CollisionMap *map2)
 Compare two collision maps and test if they are the same.
virtual bool shouldPublish ()
 Is something to publish and some subscriber to publish to?

Protected Attributes

bool m_bConvertPoint
 Does need input point to be converted?
bool m_bLocked
 Are cmap changes enabled now.
std::string m_cmapFrameId
 Collision map frame id.
ros::Publisher m_cmapPublisher
 Publisher.
std::string m_cmapPublisherName
 Collision map publisher name.
double m_collisionMapLimitRadius
 Collision map distance limit.
long int m_collisionMapVersion
 Collision map version counter.
tDataPtr m_dataBuffer
 Collision map message buffer - used to resolve if collision map has changed.
arm_navigation_msgs::CollisionMap m_dataEmpty
 Empty collision map - used when callers map id is the same as the current map id.
bool m_latchedTopics
ros::Time m_mapTime
 Current cmap timestamp.
bool m_publishCollisionMap
 Is publishing enabled?
tf::Stamped< btVector3 > m_robotBasePosition
 Robot position in the octomap coordinate system.
ros::ServiceServer m_serviceAddCube
 Add cube to cmap service.
ros::ServiceServer m_serviceGetCollisionMap
 Get current collision map service.
ros::ServiceServer m_serviceIsNewCMap
 Is new cmap service.
ros::ServiceServer m_serviceLockCMap
 Lock collision map service.
ros::ServiceServer m_serviceRemoveCube
 Remove cube from map service.
tf::TransformListener m_tfListener
 Transform listener.
Eigen::Matrix3f m_worldToCMapRot
 World to cmap translation and rotation.
Eigen::Matrix4f m_worldToCMapTM
 World to collision map transform matrix.
Eigen::Vector3f m_worldToCMapTrans

Detailed Description

Definition at line 44 of file cmap_plugin.h.


Member Typedef Documentation

Box type.

Definition at line 54 of file cmap_plugin.h.

typedef geometry_msgs::Point32 srs_env_model::CCMapPlugin::tBoxPoint [protected]

Point type.

Definition at line 57 of file cmap_plugin.h.

Boxes vector type.

Definition at line 51 of file cmap_plugin.h.

typedef COctomapCrawlerBase<tButServerOcTree::NodeType> srs_env_model::CCMapPlugin::tOctomapCrawler [protected]

Crawler type.

Definition at line 48 of file cmap_plugin.h.


Constructor & Destructor Documentation

srs_env_model::CCMapPlugin::CCMapPlugin ( const std::string &  name)

Constructor.

Definition at line 35 of file cmap_plugin.cpp.


Member Function Documentation

void srs_env_model::CCMapPlugin::addBox ( const tBoxPoint center,
const tBoxPoint size,
tBoxVec boxes 
) [protected]

Adds box to the collision map.

Parameters:
centerBox center
sizeBox size

Definition at line 481 of file cmap_plugin.cpp.

bool srs_env_model::CCMapPlugin::addBoxCallback ( srs_env_model::RemoveCube::Request &  req,
srs_env_model::RemoveCube::Response &  res 
) [protected]

Remove all boxes from cubical volume - service callback function.

Parameters:
reqRequest
resResponse

Definition at line 506 of file cmap_plugin.cpp.

void srs_env_model::CCMapPlugin::enable ( bool  enabled) [inline]

Enable or disable publishing.

Definition at line 64 of file cmap_plugin.h.

bool srs_env_model::CCMapPlugin::getCollisionMapSrvCallback ( srs_env_model::GetCollisionMap::Request &  req,
srs_env_model::GetCollisionMap::Response &  res 
) [protected]

Get collision map service call.

Parameters:
reqrequest - caller's map version
resresponse - current map and current version

Definition at line 308 of file cmap_plugin.cpp.

void srs_env_model::CCMapPlugin::handleOccupiedNode ( tButServerOcTree::iterator &  it,
const SMapWithParameters mp 
) [protected]

hook that is called when traversing occupied nodes of the updated Octree (does nothing here)

Definition at line 200 of file cmap_plugin.cpp.

void srs_env_model::CCMapPlugin::init ( ros::NodeHandle node_handle) [virtual]

Initialize plugin - called in server constructor.

Reimplemented from srs_env_model::CServerPluginBase.

Definition at line 51 of file cmap_plugin.cpp.

bool srs_env_model::CCMapPlugin::isNearRobot ( const btVector3 &  point,
double  extent 
) [protected]

Test collision point if it is in the collision distance from the robot.

Test collision object if it is in the collision distance from the robot.

Parameters:
pointPosition of the object center - in the world coordinates
extentBounding sphere of the collision object
Returns:

Definition at line 295 of file cmap_plugin.cpp.

bool srs_env_model::CCMapPlugin::isNewCmapSrvCallback ( srs_env_model::IsNewCollisionMap::Request &  req,
srs_env_model::IsNewCollisionMap::Response &  res 
) [protected]

Get true if given timestamp is older then current map time.

Parameters:
reqrequest - caller's map timestamp
resresponse - true, if new map and current timestamp

Definition at line 341 of file cmap_plugin.cpp.

Enable/disable collision map changes.

bool srs_env_model::CCMapPlugin::lockCmapSrvCallback ( srs_env_model::LockCollisionMap::Request &  req,
srs_env_model::LockCollisionMap::Response &  res 
) [protected]

Lock collision map - disable its updates from new point cloud data.

Parameters:
reqrequest - bool - lock/unlock
resresponse -

Definition at line 356 of file cmap_plugin.cpp.

void srs_env_model::CCMapPlugin::newMapDataCB ( SMapWithParameters par) [protected, virtual]

Set used octomap frame id and timestamp.

Implements srs_env_model::COctomapCrawlerBase< tButServerOcTree::NodeType >.

Definition at line 128 of file cmap_plugin.cpp.

void srs_env_model::CCMapPlugin::pause ( bool  bPause,
ros::NodeHandle node_handle 
) [virtual]

Connect/disconnect plugin to/from all topics.

Disconnect plugin from all topics

Reimplemented from srs_env_model::CServerPluginBase.

Definition at line 375 of file cmap_plugin.cpp.

void srs_env_model::CCMapPlugin::publishInternal ( const ros::Time timestamp) [protected, virtual]

Called when new scan was inserted and now all can be published.

Implements srs_env_model::CServerPluginBase.

Definition at line 88 of file cmap_plugin.cpp.

bool srs_env_model::CCMapPlugin::removeBoxCallback ( srs_env_model::RemoveCube::Request &  req,
srs_env_model::RemoveCube::Response &  res 
) [protected]

Remove all boxes from cubical volume - service callback function.

Parameters:
reqRequest
resResponse

Definition at line 432 of file cmap_plugin.cpp.

long srs_env_model::CCMapPlugin::removeInsideBox ( const tBoxPoint center,
const tBoxPoint size,
tBoxVec boxes 
) [protected]

Remove all collision boxes within given box. Box is aligned with axes and uses the same frame id.

Parameters:
centerClearing box center
sizeClearing box sizes
Returns:
Number of removed boxes.

Definition at line 389 of file cmap_plugin.cpp.

void srs_env_model::CCMapPlugin::retransformTF ( const ros::Time currentTime) [protected]

retransform map to the new time frame

Parameters:
currentTimetime frame to transform to

Definition at line 554 of file cmap_plugin.cpp.

Compare two collision maps and test if they are the same.

Compare two collision maps.

Parameters:
map1First map to compare
map2Second map to compare
Returns:
true if maps are the same

Definition at line 245 of file cmap_plugin.cpp.

Is something to publish and some subscriber to publish to?

Returns true, if should be data published and are some subscribers.

Implements srs_env_model::CServerPluginBase.

Definition at line 331 of file cmap_plugin.cpp.


Member Data Documentation

Does need input point to be converted?

Definition at line 209 of file cmap_plugin.h.

Are cmap changes enabled now.

Definition at line 212 of file cmap_plugin.h.

Collision map frame id.

Definition at line 169 of file cmap_plugin.h.

Publisher.

Definition at line 157 of file cmap_plugin.h.

Collision map publisher name.

Definition at line 154 of file cmap_plugin.h.

Collision map distance limit.

Definition at line 160 of file cmap_plugin.h.

Collision map version counter.

Definition at line 163 of file cmap_plugin.h.

Collision map message buffer - used to resolve if collision map has changed.

Definition at line 172 of file cmap_plugin.h.

Empty collision map - used when callers map id is the same as the current map id.

Definition at line 175 of file cmap_plugin.h.

Definition at line 206 of file cmap_plugin.h.

Current cmap timestamp.

Definition at line 215 of file cmap_plugin.h.

Is publishing enabled?

Definition at line 178 of file cmap_plugin.h.

Robot position in the octomap coordinate system.

Definition at line 166 of file cmap_plugin.h.

Add cube to cmap service.

Definition at line 193 of file cmap_plugin.h.

Get current collision map service.

Definition at line 181 of file cmap_plugin.h.

Is new cmap service.

Definition at line 184 of file cmap_plugin.h.

Lock collision map service.

Definition at line 187 of file cmap_plugin.h.

Remove cube from map service.

Definition at line 190 of file cmap_plugin.h.

Transform listener.

Definition at line 196 of file cmap_plugin.h.

Eigen::Matrix3f srs_env_model::CCMapPlugin::m_worldToCMapRot [protected]

World to cmap translation and rotation.

Definition at line 202 of file cmap_plugin.h.

Eigen::Matrix4f srs_env_model::CCMapPlugin::m_worldToCMapTM [protected]

World to collision map transform matrix.

Definition at line 199 of file cmap_plugin.h.

Definition at line 203 of file cmap_plugin.h.


The documentation for this class was generated from the following files:


srs_env_model
Author(s): Vit Stancl (stancl@fit.vutbr.cz), Tomas Lokaj, Jan Gorig, Michal Spanel (spanel@fit.vutbr.cz)
autogenerated on Sun Jan 5 2014 11:50:50