20 #define BOOST_TEST_STATIC_LINK 22 #include <boost/test/included/unit_test.hpp> 27 #include "geometry_msgs/PoseWithCovarianceStamped.h" 40 std::vector<SimpleVector3> targetCameraPositions;
41 std::vector<SimpleQuaternion> targetCameraOrientations;
45 targetCameraOrientations.push_back(ZXZ2Quaternion(0.0, 0.0, 0.0));
47 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.3));
48 targetCameraOrientations.push_back(ZXZ2Quaternion(0, 0.0, 0 ));
49 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.3));
50 targetCameraOrientations.push_back(ZXZ2Quaternion(90, 0.0, 0 ));
51 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.3));
52 targetCameraOrientations.push_back(ZXZ2Quaternion(180, 0.0, 0 ));
53 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.3));
54 targetCameraOrientations.push_back(ZXZ2Quaternion(270, 0.0, 0 ));
56 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.4));
57 targetCameraOrientations.push_back(ZXZ2Quaternion(-170, 0.0, 0 ));
58 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.4));
59 targetCameraOrientations.push_back(ZXZ2Quaternion(-170, 80.0, 0));
60 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.4));
61 targetCameraOrientations.push_back(ZXZ2Quaternion(-180, 100.0, 0 ));
62 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.4));
63 targetCameraOrientations.push_back(ZXZ2Quaternion(-200, 40.0, 0));
64 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.4));
65 targetCameraOrientations.push_back(ZXZ2Quaternion(-180, -30.0, 0));
66 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.4));
67 targetCameraOrientations.push_back(ZXZ2Quaternion(-190, -50.0, 0));
68 targetCameraPositions.push_back(
SimpleVector3(-0.404993116856, -0.28920769691, 1.4));
69 targetCameraOrientations.push_back(ZXZ2Quaternion(-120, -20.0, 0));
70 targetCameraPositions.push_back(
SimpleVector3(0.804993116856, 0.98920769691, 1.4));
71 targetCameraOrientations.push_back(ZXZ2Quaternion(120, -20.0, 0));
72 targetCameraPositions.push_back(
SimpleVector3(0.004993116856, 2.08920769691, 1.5));
73 targetCameraOrientations.push_back(ZXZ2Quaternion(20, -20.0, 0));
74 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, 0.28920769691, 0.8));
75 targetCameraOrientations.push_back(ZXZ2Quaternion(-10, 0.0, 0));
76 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.7));
77 targetCameraOrientations.push_back(ZXZ2Quaternion(-170, 0.0, 0 ));
78 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -1.28920769691, 0.4));
79 targetCameraOrientations.push_back(ZXZ2Quaternion(-170, 80.0, 0));
80 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -1.28920769691, 0.5));
81 targetCameraOrientations.push_back(ZXZ2Quaternion(-180, 100.0, 0 ));
82 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.0));
83 targetCameraOrientations.push_back(ZXZ2Quaternion(-200, 40.0, 0));
84 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.8));
85 targetCameraOrientations.push_back(ZXZ2Quaternion(-180, -30.0, 0));
86 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.3));
87 targetCameraOrientations.push_back(ZXZ2Quaternion(-190, -50.0, 0));
88 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.1));
89 targetCameraOrientations.push_back(ZXZ2Quaternion(-120, -20.0, 0));
90 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.7));
91 targetCameraOrientations.push_back(ZXZ2Quaternion(120, -20.0, 0));
92 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 1.0));
93 targetCameraOrientations.push_back(ZXZ2Quaternion(20, -20.0, 0));
94 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 0.9));
95 targetCameraOrientations.push_back(ZXZ2Quaternion(-10, 0.0, 0));
97 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 2.5));
98 targetCameraOrientations.push_back(ZXZ2Quaternion(-20, -20.0, 0));
99 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, 0.0));
100 targetCameraOrientations.push_back(ZXZ2Quaternion(-10, 30.0, 0));
101 targetCameraPositions.push_back(
SimpleVector3(0.404993116856, -2.28920769691, -1.0));
102 targetCameraOrientations.push_back(ZXZ2Quaternion(-10, 30.0, 0));
110 double position_x = -0.113948535919;
111 double position_y = -1.60322499275;
112 double rotationAngle = -1.57;
120 geometry_msgs::PoseWithCovarianceStamped startPoseStamped = geometry_msgs::PoseWithCovarianceStamped();
121 geometry_msgs::PoseWithCovariance startPose = geometry_msgs::PoseWithCovariance();
123 startPose.pose.position.x = position_x;
124 startPose.pose.position.y = position_y;
125 startPose.pose.position.z = 0;
126 startPose.pose.orientation.w = rotation.w();
127 startPose.pose.orientation.x = rotation.x();
128 startPose.pose.orientation.y = rotation.y();
129 startPose.pose.orientation.z = rotation.z();
130 startPoseStamped.pose = startPose;
132 pose_pub.
publish(startPoseStamped);
135 myRobotModelPtr->setPanAngleLimits(-60, 60);
136 myRobotModelPtr->setTiltAngleLimits(-180, 180);
139 for (
unsigned int i = 0; i < targetCameraPositions.size(); i++)
161 test_suite* evaluation = BOOST_TEST_SUITE(
"Evaluation NBV");
167 framework::master_test_suite().add(evaluation);
void publish(const boost::shared_ptr< M > &message) const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
Eigen::Matrix< Precision, 3, 1 > SimpleVector3
this namespace contains all generally usable classes.
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define ROS_INFO_STREAM(args)
test_suite * init_unit_test_suite(int argc, char *argv[])
ROSCPP_DECL void spinOnce()
Eigen::Quaternion< Precision > SimpleQuaternion