BaseTest.h
Go to the documentation of this file.
1 
20 #define BOOST_TEST_STATIC_LINK
21 
22 #include <ros/ros.h>
23 #include <boost/array.hpp>
24 #include <iostream>
25 #include <vector>
26 #include <string>
27 #include <glpk.h>
28 #include <map>
29 
30 #include <geometry_msgs/PoseWithCovarianceStamped.h>
31 #include <visualization_msgs/MarkerArray.h>
32 #include <sensor_msgs/PointCloud2.h>
33 #include <tf/transform_datatypes.h>
34 #include <dynamic_reconfigure/Reconfigure.h>
35 
37 #include "asr_next_best_view/GetNextBestView.h"
38 #include "asr_next_best_view/SetAttributedPointCloud.h"
39 #include "asr_next_best_view/SetInitRobotState.h"
40 #include "asr_next_best_view/ResetCalculator.h"
41 #include "asr_next_best_view/UpdatePointCloud.h"
42 #include "asr_next_best_view/TriggerFrustumVisualization.h"
43 #include "asr_msgs/AsrAttributedPoint.h"
44 
50 #include "robot_model_services/robot_model/impl/MILDRobotModel.hpp"
51 #include "robot_model_services/robot_model/impl/MILDRobotModelWithExactIK.hpp"
52 #include "robot_model_services/robot_model/impl/MILDRobotState.hpp"
53 #include <tf/tf.h>
54 
55 #include <Eigen/Dense>
56 #include <Eigen/Geometry>
57 
58 #include <ros/master.h>
59 
60 using namespace next_best_view;
61 
62 class BaseTest {
63 protected:
74  bool silent;
75 public:
76  BaseTest();
77 
78  BaseTest(bool useRos, bool silent);
79 
80  ~BaseTest();
81 
82  void init(bool useRos, bool silent);
83 
84  void initRosServices();
85 
86  void setInitialPose(const geometry_msgs::Pose &initialPose, boost::shared_ptr<NextBestView> nbv = nullptr);
87 
88  void setInitialRobotState(const geometry_msgs::Pose &initialPose, boost::shared_ptr<NextBestView> nbv = nullptr);
89 
90  robot_model_services::MILDRobotStatePtr getRobotState(const geometry_msgs::Pose &initialPose);
91 
92  void waitForEnter();
93 
94  SimpleQuaternion euler2Quaternion( const Precision roll, const Precision pitch, const Precision yaw);
95 
96  SimpleQuaternion ZXZ2Quaternion( const Precision roll, const Precision pitch, const Precision yaw);
97 
98  template<typename T> bool getParameter(const std::string &key, T &parameter)
99  {
100  if (!mNodeHandle->getParam(key, parameter))
101  {
102  ROS_ERROR_STREAM(key << " parameter not set!");
103  return false;
104  }
105  else
106  {
107  return true;
108  }
109  }
110 };
111 
boost::shared_ptr< ros::NodeHandle > mNodeHandle
Definition: BaseTest.h:64
bool getParameter(const std::string &key, T &parameter)
Definition: BaseTest.h:98
ros::ServiceClient mSetPointCloudClient
Definition: BaseTest.h:67
ros::ServiceClient mTriggerFrustumVisClient
Definition: BaseTest.h:73
ros::ServiceClient mResetCalculatorClient
Definition: BaseTest.h:71
ros::ServiceClient mGetNextBestViewClient
Definition: BaseTest.h:69
this namespace contains all generally usable classes.
ros::ServiceClient mUpdatePointCloudClient
Definition: BaseTest.h:70
bool silent
Definition: BaseTest.h:74
ros::ServiceClient mDynParametersClient
Definition: BaseTest.h:72
ros::ServiceClient mGetPointCloudClient
Definition: BaseTest.h:68
ros::Publisher mInitPosePub
Definition: BaseTest.h:65
#define ROS_ERROR_STREAM(args)
Eigen::Quaternion< Precision > SimpleQuaternion
Definition: typedef.hpp:67
ros::ServiceClient mSetInitRobotStateClient
Definition: BaseTest.h:66
float Precision
Definition: typedef.hpp:36


asr_next_best_view
Author(s): Aumann Florian, Borella Jocelyn, Heller Florian, Meißner Pascal, Schleicher Ralf, Stöckle Patrick, Stroh Daniel, Trautmann Jeremias, Walter Milena, Wittenbeck Valerij
autogenerated on Thu Jan 9 2020 07:20:18