utilities.hpp
Go to the documentation of this file.
1 
4 /*****************************************************************************
5 ** Ifdefs
6 *****************************************************************************/
7 
8 #ifndef cost_map_demos_UTILITIES_HPP_
9 #define cost_map_demos_UTILITIES_HPP_
10 
11 /*****************************************************************************
12 ** Includes
13 *****************************************************************************/
14 
15 #include <atomic>
17 #include <iostream>
19 #include <tf/transform_listener.h>
20 #include <thread>
21 
22 /*****************************************************************************
23 ** Namespaces
24 *****************************************************************************/
25 
26 namespace cost_map_demos {
27 
28 /*****************************************************************************
29 ** Transforms
30 *****************************************************************************/
31 
36 public:
38  virtual ~TransformBroadcaster();
39  void add(const std::string& name, tf::Vector3 origin, const tf::Quaternion& orientation);
40 
42  void broadcast();
43  void shutdown();
44 
45 private:
46  std::map<std::string, tf::Transform> transforms;
47  std::thread broadcasting_thread;
48  std::atomic<bool> shutdown_flag;
49 };
50 
51 /*****************************************************************************
52 ** Printing
53 *****************************************************************************/
54 
59 void pretty_print(costmap_2d::Costmap2DROS &ros_costmap);
60 
68 std::ostream& operator <<(std::ostream& stream, costmap_2d::Costmap2DROS& ros_costmap);
69 
70 /*****************************************************************************
71 ** Trailers
72 *****************************************************************************/
73 
74 } // namespace cost_map_demos
75 
76 #endif /* cost_map_demos_UTILITIES_HPP_ */
std::ostream & operator<<(std::ostream &stream, costmap_2d::Costmap2DROS &ros_costmap)
Pretty print a ros cost map in ascii format to stdout.
Definition: utilities.cpp:29
std::map< std::string, tf::Transform > transforms
Definition: utilities.hpp:46
void add(const std::string &name, tf::Vector3 origin, const tf::Quaternion &orientation)
Definition: utilities.cpp:51
Broadcast a set of transforms useful for various demos.
Definition: utilities.hpp:35
std::atomic< bool > shutdown_flag
Definition: utilities.hpp:48
void pretty_print(costmap_2d::Costmap2DROS &ros_costmap)
Pretty print a ros cost map in ascii format to stdout.
Definition: utilities.cpp:20


cost_map_demos
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:04:00