helpers.hpp
Go to the documentation of this file.
1 /*
2  * helpers.hpp
3  *
4  * Created on: Nov 20, 2019
5  * Author: Edo Jelavic
6  * Institute: ETH Zurich, Robotic Systems Lab
7  */
8 
9 #pragma once
10 
11 #include <pcl/common/common.h>
12 #include <ros/ros.h>
13 #include <chrono>
14 #include <string>
15 
16 namespace grid_map {
17 
18 class GridMapPclLoader;
19 class GridMap;
20 
21 namespace grid_map_pcl {
22 
24 
25 std::string getParameterPath();
26 
27 std::string getOutputBagPath(const ros::NodeHandle& nh);
28 
29 std::string getPcdFilePath(const ros::NodeHandle& nh);
30 
31 std::string getMapFrame(const ros::NodeHandle& nh);
32 
33 std::string getMapRosbagTopic(const ros::NodeHandle& nh);
34 
35 std::string getMapLayerName(const ros::NodeHandle& nh);
36 
37 void saveGridMap(const grid_map::GridMap& gridMap, const ros::NodeHandle& nh, const std::string& mapTopic);
38 
39 inline void printTimeElapsedToRosInfoStream(const std::chrono::system_clock::time_point& start, const std::string& prefix);
40 
41 void processPointcloud(grid_map::GridMapPclLoader* gridMapPclLoader, const ros::NodeHandle& nh);
42 
43 using Point = ::pcl::PointXYZ;
44 using Pointcloud = ::pcl::PointCloud<Point>;
45 enum class XYZ : int { X, Y, Z };
46 
47 Eigen::Affine3f getRigidBodyTransform(const Eigen::Vector3d& translation, const Eigen::Vector3d& intrinsicRpy);
48 Eigen::Matrix3f getRotationMatrix(double angle, XYZ axis);
49 
50 // processing point clouds
51 Eigen::Vector3d calculateMeanOfPointPositions(Pointcloud::ConstPtr inputCloud);
52 Pointcloud::Ptr transformCloud(Pointcloud::ConstPtr inputCloud, const Eigen::Affine3f& transformMatrix);
53 Pointcloud::Ptr loadPointcloudFromPcd(const std::string& filename);
54 
55 } /* namespace grid_map_pcl*/
56 
57 } /* namespace grid_map */
filename
void printTimeElapsedToRosInfoStream(const std::chrono::system_clock::time_point &start, const std::string &prefix)
Definition: helpers.cpp:89
std::string getPcdFilePath(const ros::NodeHandle &nh)
Definition: helpers.cpp:57
std::string getOutputBagPath(const ros::NodeHandle &nh)
Definition: helpers.cpp:49
Eigen::Matrix3f getRotationMatrix(double angle, XYZ axis)
Definition: helpers.cpp:117
Eigen::Vector3d calculateMeanOfPointPositions(Pointcloud::ConstPtr inputCloud)
Definition: helpers.cpp:138
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
void processPointcloud(grid_map::GridMapPclLoader *gridMapPclLoader, const ros::NodeHandle &nh)
Definition: helpers.cpp:95
Pointcloud::Ptr loadPointcloudFromPcd(const std::string &filename)
Definition: helpers.cpp:148
std::string getParameterPath()
Definition: helpers.cpp:44
std::string getMapLayerName(const ros::NodeHandle &nh)
Definition: helpers.cpp:77
Pointcloud::Ptr transformCloud(Pointcloud::ConstPtr inputCloud, const Eigen::Affine3f &transformMatrix)
Definition: helpers.cpp:156
void setVerbosityLevelToDebugIfFlagSet(const ros::NodeHandle &nh)
Definition: helpers.cpp:31
::pcl::PointXYZ Point
Definition: helpers.hpp:43
void saveGridMap(const grid_map::GridMap &gridMap, const ros::NodeHandle &nh, const std::string &mapTopic)
Definition: helpers.cpp:83
::pcl::PointCloud< Point > Pointcloud
Definition: helpers.hpp:44
Eigen::Affine3f getRigidBodyTransform(const Eigen::Vector3d &translation, const Eigen::Vector3d &intrinsicRpy)
Definition: helpers.cpp:104
std::string getMapFrame(const ros::NodeHandle &nh)
Definition: helpers.cpp:65
std::string getMapRosbagTopic(const ros::NodeHandle &nh)
Definition: helpers.cpp:71


grid_map_pcl
Author(s): Dominic Jud , Edo Jelavic
autogenerated on Tue Jun 1 2021 02:13:43