obstacle_distance_moveit.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef COB_OBSTACLE_DISTANCE_MOVEIT__OBSTACLE_DISTANCE_H
19 #define COB_OBSTACLE_DISTANCE_MOVEIT__OBSTACLE_DISTANCE_H
20 
21 #include <map>
22 #include <string.h>
23 #include <boost/thread.hpp>
24 #include <boost/thread/mutex.hpp>
25 
26 #include <ros/ros.h>
30 #include <moveit_msgs/PlanningScene.h>
31 #include <moveit_msgs/GetPlanningScene.h>
32 
33 #include <cob_srvs/SetString.h>
34 #include <cob_control_msgs/ObstacleDistances.h>
35 #include <cob_control_msgs/GetObstacleDistance.h>
36 
39 
41 {
42 public:
44 
45 private:
48 
49  planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_;
51 
55  bool planningSceneCallback(moveit_msgs::GetPlanningScene::Request &req, moveit_msgs::GetPlanningScene::Response &res);
57 
58  std::map<std::string, std::shared_ptr<fcl::CollisionObject> > robot_links_;
59  std::map<std::string, std::shared_ptr<fcl::CollisionObject> > collision_objects_;
60  std::set< std::string > registered_links_;
62 
64  bool calculateDistanceServiceCallback(cob_control_msgs::GetObstacleDistance::Request &req,
65  cob_control_msgs::GetObstacleDistance::Response &res);
66 
69  bool registerCallback(cob_srvs::SetString::Request &req, cob_srvs::SetString::Response &res);
70  bool unregisterCallback(cob_srvs::SetString::Request &req, cob_srvs::SetString::Response &res);
71 
74 
75  cob_control_msgs::ObstacleDistance getDistanceInfo(const std::shared_ptr<fcl::CollisionObject> object_a,
76  const std::shared_ptr<fcl::CollisionObject> object_b);
77 
79 };
80 
81 #endif // COB_OBSTACLE_DISTANCE_MOVEIT__OBSTACLE_DISTANCE_H
planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_
bool registerCallback(cob_srvs::SetString::Request &req, cob_srvs::SetString::Response &res)
bool planningSceneCallback(moveit_msgs::GetPlanningScene::Request &req, moveit_msgs::GetPlanningScene::Response &res)
bool calculateDistanceServiceCallback(cob_control_msgs::GetObstacleDistance::Request &req, cob_control_msgs::GetObstacleDistance::Response &res)
ros::ServiceServer monitored_scene_server_
std::map< std::string, std::shared_ptr< fcl::CollisionObject > > collision_objects_
ros::ServiceServer unregister_server_
void updatedScene(planning_scene_monitor::PlanningSceneMonitor::SceneUpdateType type)
collision_detection::AllowedCollisionMatrix acm_
std::map< std::string, std::shared_ptr< fcl::CollisionObject > > robot_links_
bool unregisterCallback(cob_srvs::SetString::Request &req, cob_srvs::SetString::Response &res)
ros::ServiceServer calculate_obstacle_distance_
std::set< std::string > registered_links_
void calculateDistanceTimerCallback(const ros::TimerEvent &event)
cob_control_msgs::ObstacleDistance getDistanceInfo(const std::shared_ptr< fcl::CollisionObject > object_a, const std::shared_ptr< fcl::CollisionObject > object_b)
void planningSceneTimerCallback(const ros::TimerEvent &event)
ros::ServiceServer register_server_


cob_obstacle_distance_moveit
Author(s): Florian Koehler , Felix Messmer
autogenerated on Sun Dec 6 2020 03:26:02