parameters.h
Go to the documentation of this file.
1 //=================================================================================================
2 // Copyright (c) 2013, Johannes Meyer, TU Darmstadt
3 // All rights reserved.
4 
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are met:
7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above copyright
10 // notice, this list of conditions and the following disclaimer in the
11 // documentation and/or other materials provided with the distribution.
12 // * Neither the name of the Flight Systems and Automatic Control group,
13 // TU Darmstadt, nor the names of its contributors may be used to
14 // endorse or promote products derived from this software without
15 // specific prior written permission.
16 
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
21 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 //=================================================================================================
28 
29 #ifndef OBJECT_TRACKER_PARAMETERS_H
30 #define OBJECT_TRACKER_PARAMETERS_H
31 
32 #include <string>
33 #include <map>
34 #include <std_msgs/ColorRGBA.h>
35 #include <ros/service_client.h>
36 
37 #include <XmlRpcValue.h>
38 
39 namespace hector_object_tracker {
40 
41  extern std::map<std::string, bool> _project_objects;
42  extern std::map<std::string, bool> _with_orientation;
43  extern std::map<std::string, double> _default_distance;
44  extern std::map<std::string, double> _distance_variance;
45  extern std::map<std::string, double> _angle_variance;
46  extern std::map<std::string, double> _min_height;
47  extern std::map<std::string, double> _max_height;
48  extern std::map<std::string, double> _pending_support;
49  extern std::map<std::string, double> _pending_time;
50  extern std::map<std::string, double> _active_support;
51  extern std::map<std::string, double> _active_time;
52  extern std::map<std::string, double> _inactive_support;
53  extern std::map<std::string, double> _inactive_time;
54  extern std::map<std::string, double> _min_distance_between_objects;
55  extern std::map<std::string, std_msgs::ColorRGBA> _marker_color;
56  extern std::map<std::string, ros::ServiceClientPtr> _distance_to_obstacle_service;
57  extern std::map<std::string, ros::ServiceClientPtr> _get_normal_service;
58 
59  typedef std::pair<ros::ServiceClientPtr, XmlRpc::XmlRpcValue> ServiceClientWithProperties;
60  typedef std::vector<ServiceClientWithProperties> ServiceClientsWithProperties;
61  extern std::map<std::string, ServiceClientsWithProperties> _percept_verification_services;
62  extern std::map<std::string, ServiceClientsWithProperties> _object_verification_services;
63 
64  namespace Parameters {
65  void load(const std::string& class_id = std::string());
66  }
67 
68  template <typename T> static inline T& parameter(std::map<std::string, T>& p, const std::string& class_id = std::string()) {
69  if (p.count(class_id)) return p.at(class_id);
70  return p[std::string()];
71  }
72 
73 } // namespace hector_object_tracker
74 
75 #endif // OBJECT_TRACKER_PARAMETERS_H
std::map< std::string, double > _inactive_support
Definition: parameters.cpp:51
std::map< std::string, double > _pending_support
Definition: parameters.cpp:47
std::map< std::string, ros::ServiceClientPtr > _distance_to_obstacle_service
Definition: parameters.cpp:55
std::map< std::string, double > _inactive_time
Definition: parameters.cpp:52
std::map< std::string, double > _min_height
Definition: parameters.cpp:45
std::map< std::string, double > _active_time
Definition: parameters.cpp:50
std::map< std::string, double > _pending_time
Definition: parameters.cpp:48
std::vector< ServiceClientWithProperties > ServiceClientsWithProperties
Definition: parameters.h:60
std::map< std::string, double > _min_distance_between_objects
Definition: parameters.cpp:53
std::map< std::string, ros::ServiceClientPtr > _get_normal_service
Definition: parameters.cpp:56
std::map< std::string, std_msgs::ColorRGBA > _marker_color
Definition: parameters.cpp:54
std::pair< ros::ServiceClientPtr, XmlRpc::XmlRpcValue > ServiceClientWithProperties
Definition: parameters.h:59
std::map< std::string, bool > _with_orientation
Definition: parameters.cpp:41
std::map< std::string, double > _max_height
Definition: parameters.cpp:46
void load(const std::string &class_id)
Definition: parameters.cpp:62
std::map< std::string, bool > _project_objects
Definition: parameters.cpp:40
std::map< std::string, double > _default_distance
Definition: parameters.cpp:42
std::map< std::string, ServiceClientsWithProperties > _percept_verification_services
Definition: parameters.cpp:57
std::map< std::string, double > _active_support
Definition: parameters.cpp:49
std::map< std::string, double > _angle_variance
Definition: parameters.cpp:44
static T & parameter(std::map< std::string, T > &p, const std::string &class_id=std::string())
Definition: parameters.h:68
std::map< std::string, double > _distance_variance
Definition: parameters.cpp:43
std::map< std::string, ServiceClientsWithProperties > _object_verification_services
Definition: parameters.cpp:58


hector_object_tracker
Author(s): Johannes Meyer
autogenerated on Mon Jun 10 2019 13:35:13