mars_lib 0.1.0.2abe2576fe7f
Modular and Robust Sensor-Fusion
Loading...
Searching...
No Matches
pose_measurement_type.h
Go to the documentation of this file.
1// Copyright (C) 2021 Christian Brommer, Control of Networked Systems, University of Klagenfurt, Austria.
2//
3// All rights reserved.
4//
5// This software is licensed under the terms of the BSD-2-Clause-License with
6// no commercial use allowed, the full terms of which are made available
7// in the LICENSE file. No license in patents is granted.
8//
9// You can contact the author at <christian.brommer@ieee.org>
10
11#ifndef POSEMEASUREMENTTYPE_H
12#define POSEMEASUREMENTTYPE_H
13
15#include <Eigen/Dense>
16#include <utility>
17
18namespace mars
19{
21{
22public:
23 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
24
25 Eigen::Vector3d position_;
26 Eigen::Quaternion<double> orientation_;
27
29
30 PoseMeasurementType(Eigen::Vector3d position, const Eigen::Quaternion<double>& orientation)
31 : position_(std::move(position)), orientation_(orientation)
32 {
33 }
34
35 static std::string get_csv_state_header_string()
36 {
37 std::stringstream os;
38 os << "t, ";
39 os << "p_x, p_y, p_z, ";
40 os << "q_w, q_x, q_y, q_z";
41
42 return os.str();
43 }
44
45 std::string to_csv_string(const double& timestamp) const
46 {
47 std::stringstream os;
48 os.precision(17);
49 os << timestamp;
50
51 os << ", " << position_.x() << ", " << position_.y() << ", " << position_.z();
52 os << ", " << orientation_.w() << ", " << orientation_.x() << ", " << orientation_.y() << ", " << orientation_.z();
53
54 return os.str();
55 }
56};
57} // namespace mars
58#endif // POSEMEASUREMENTTYPE_H
Definition measurement_base_class.h:20
Definition pose_measurement_type.h:21
std::string to_csv_string(const double &timestamp) const
Definition pose_measurement_type.h:45
Eigen::Quaternion< double > orientation_
Quaternion [w x y z].
Definition pose_measurement_type.h:26
static std::string get_csv_state_header_string()
Definition pose_measurement_type.h:35
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector3d position_
Position [x y z].
Definition pose_measurement_type.h:25
PoseMeasurementType(Eigen::Vector3d position, const Eigen::Quaternion< double > &orientation)
Definition pose_measurement_type.h:30
Definition buffer.h:27