BaseTest.h
Go to the documentation of this file.
00001 
00020 #define BOOST_TEST_STATIC_LINK
00021 
00022 #include <ros/ros.h>
00023 #include <boost/array.hpp>
00024 #include <iostream>
00025 #include <vector>
00026 #include <string>
00027 #include <glpk.h>
00028 #include <map>
00029 
00030 #include <geometry_msgs/PoseWithCovarianceStamped.h>
00031 #include <visualization_msgs/MarkerArray.h>
00032 #include <sensor_msgs/PointCloud2.h>
00033 #include <tf/transform_datatypes.h>
00034 #include <dynamic_reconfigure/Reconfigure.h>
00035 
00036 #include "asr_msgs/AsrAttributedPoint.h"
00037 
00038 #include "robot_model_services/helper/MathHelper.hpp"
00039 #include "robot_model_services/helper/MapHelper.hpp"
00040 #include "robot_model_services/helper/TypeHelper.hpp"
00041 #include "robot_model_services/robot_model/impl/MILDRobotModel.hpp"
00042 #include "robot_model_services/robot_model/impl/MILDRobotModelWithExactIK.hpp"
00043 #include "robot_model_services/robot_model/impl/MILDRobotState.hpp"
00044 #include <tf/tf.h>
00045 
00046 #include <Eigen/Dense>
00047 #include <Eigen/Geometry>
00048 
00049 #include <ros/master.h>
00050 
00051 using namespace robot_model_services;
00052 
00053 class BaseTest {
00054 protected:
00055     boost::shared_ptr<ros::NodeHandle> mNodeHandle;
00056     ros::Publisher mInitPosePub;
00057     bool silent;
00058 public:
00059     BaseTest();
00060 
00061     BaseTest(bool silent);
00062 
00063     ~BaseTest();
00064 
00065     void init(bool silent);
00066 
00067     void initRosServices();
00068 
00069 
00070     robot_model_services::MILDRobotStatePtr getRobotState(const geometry_msgs::Pose &initialPose);
00071 
00072     void waitForEnter();
00073 
00074     SimpleQuaternion euler2Quaternion( const Precision roll, const Precision pitch, const Precision yaw);
00075 
00076     SimpleQuaternion ZXZ2Quaternion( const Precision roll, const Precision pitch, const Precision yaw);
00077 
00078     template<typename T> bool getParameter(const std::string &key, T &parameter)
00079     {
00080         if (!mNodeHandle->getParam(key, parameter))
00081         {
00082             ROS_ERROR_STREAM(key << " parameter not set!");
00083             return false;
00084         }
00085         else
00086         {
00087             return true;
00088         }
00089     }
00090 };
00091 


asr_robot_model_services
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 Sat Jun 8 2019 18:24:52