Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef MOVEIT_COLLISION_DETECTION_COLLISION_TOOLS_
00038 #define MOVEIT_COLLISION_DETECTION_COLLISION_TOOLS_
00039
00040 #include <moveit/collision_detection/collision_common.h>
00041 #include <moveit_msgs/CostSource.h>
00042 #include <moveit_msgs/ContactInformation.h>
00043 #include <visualization_msgs/MarkerArray.h>
00044
00045 namespace collision_detection
00046 {
00047 void getCollisionMarkersFromContacts(visualization_msgs::MarkerArray& arr, const std::string& frame_id,
00048 const CollisionResult::ContactMap& con, const std_msgs::ColorRGBA& color,
00049 const ros::Duration& lifetime, const double radius = 0.035);
00050
00051 void getCollisionMarkersFromContacts(visualization_msgs::MarkerArray& arr, const std::string& frame_id,
00052 const CollisionResult::ContactMap& con);
00053
00055 void getCostMarkers(visualization_msgs::MarkerArray& arr, const std::string& frame_id,
00056 std::set<CostSource>& cost_sources);
00057
00058 void getCostMarkers(visualization_msgs::MarkerArray& arr, const std::string& frame_id,
00059 std::set<CostSource>& cost_sources, const std_msgs::ColorRGBA& color,
00060 const ros::Duration& lifetime);
00061
00062 double getTotalCost(const std::set<CostSource>& cost_sources);
00063
00064 void removeCostSources(std::set<CostSource>& cost_sources, const std::set<CostSource>& cost_sources_to_remove,
00065 double overlap_fraction);
00066 void intersectCostSources(std::set<CostSource>& cost_sources, const std::set<CostSource>& a,
00067 const std::set<CostSource>& b);
00068 void removeOverlapping(std::set<CostSource>& cost_sources, double overlap_fraction);
00069
00070 bool getSensorPositioning(geometry_msgs::Point& point, const std::set<CostSource>& cost_sources);
00071
00072 void costSourceToMsg(const CostSource& cost_source, moveit_msgs::CostSource& msg);
00073 void contactToMsg(const Contact& contact, moveit_msgs::ContactInformation& msg);
00074 }
00075
00076 #endif