obstacle_distance_data_types.hpp
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *   http://www.apache.org/licenses/LICENSE-2.0
00009 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 
00018 #ifndef OBSTACLE_DISTANCE_DATA_TYPES_HPP_
00019 #define OBSTACLE_DISTANCE_DATA_TYPES_HPP_
00020 
00021 #include <ros/ros.h>
00022 #include <stdint.h>
00023 #include <unordered_map>
00024 #include <shape_msgs/SolidPrimitive.h>
00025 #include <visualization_msgs/Marker.h>
00026 
00027 #define FCL_BOX_X 0u
00028 #define FCL_BOX_Y 1u
00029 #define FCL_BOX_Z 2u
00030 
00031 #define FCL_RADIUS 0u
00032 #define FCL_CYL_LENGTH 1u
00033 
00034 #define MIN_DISTANCE 0.5 // [m]: filter for distances to be published!
00035 
00036 #define DEFAULT_COL_ALPHA 0.6 // MoveIt! CollisionGeometry does not provide color -> Therefore use default value. 0.5 = Test for taking pictures -> robot arm should be visible behind obstacle
00037 
00038 struct ShapeMsgTypeToVisMarkerType
00039 {
00040     public:
00041         std::unordered_map<uint8_t, uint32_t> map_;
00042         std_msgs::ColorRGBA obstacle_color_;
00043 
00044         ShapeMsgTypeToVisMarkerType()
00045         {
00046             map_[shape_msgs::SolidPrimitive::BOX] = visualization_msgs::Marker::CUBE;
00047             map_[shape_msgs::SolidPrimitive::SPHERE] = visualization_msgs::Marker::SPHERE;
00048             map_[shape_msgs::SolidPrimitive::CYLINDER] = visualization_msgs::Marker::CYLINDER;
00049 
00050             obstacle_color_.r = 1.0;
00051             obstacle_color_.g = 0.0;
00052             obstacle_color_.b = 0.0;
00053             obstacle_color_.a = DEFAULT_COL_ALPHA;
00054         }
00055 };
00056 
00057 
00058 struct TriangleSupport
00059 {
00060     fcl::Vec3f a;
00061     fcl::Vec3f b;
00062     fcl::Vec3f c;
00063 };
00064 
00065 static ShapeMsgTypeToVisMarkerType g_shapeMsgTypeToVisMarkerType;
00066 
00067 #endif /* OBSTACLE_DISTANCE_DATA_TYPES_HPP_ */


cob_obstacle_distance
Author(s): Marco Bezzon
autogenerated on Thu Jun 6 2019 21:19:14