aron_conversions.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @author Fabian Reister ( fabian dot reister at kit dot edu )
17  * @date 2021
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 
22 #pragma once
23 
24 #include <RobotAPI/interface/units/LaserScannerUnit.h>
30 
32 {
33 
34  namespace arondto
35  {
36  struct LaserScanStamped;
37  } // namespace arondto
38 
39  // struct LaserScan;
40  struct LaserScanStamped;
41 
42  void fromAron(const arondto::LaserScanStamped& aronLaserScan,
43  LaserScan& laserScan,
44  std::int64_t& timestamp,
45  std::string& frame,
46  std::string& agentName);
47 
48  template <typename T>
49  auto
50  fromAron(const aron::data::NDArrayPtr& navigator)
51  {
52  return aron::data::converter::AronVectorConverter::ConvertToVector<T>(navigator);
53  }
54 
55  void fromAron(const arondto::LaserScanStamped& aronLaserScan, LaserScanStamped& laserScan);
56 
57  void toAron(const LaserScan& laserScan,
58  const armem::Time& timestamp,
59  const std::string& frame,
60  const std::string& agentName,
61  arondto::LaserScanStamped& aronLaserScan);
62 
64  toAron(const LaserScan& laserScan)
65  {
67  return AronVectorConverter::ConvertFromVector(laserScan);
68  }
69 
70 
71 } // namespace armarx::armem::laser_scans
armarx::armem::laser_scans::LaserScanStamped
Definition: types.h:40
armarx::aron::data::NDArrayPtr
std::shared_ptr< NDArray > NDArrayPtr
Definition: NDArray.h:46
types.h
StdVectorConverter.h
armarx::aron::converter::AronVectorConverter
::armarx::aron::data::converter::AronVectorConverter AronVectorConverter
Definition: StdVectorConverter.h:165
armarx::armem::laser_scans::fromAron
SensorHeader fromAron(const arondto::SensorHeader &aronSensorHeader)
Definition: aron_conversions.cpp:21
EigenConverter.h
armarx::armem::laser_scans::toAron
int64_t toAron(const armem::Time &timestamp)
Definition: aron_conversions.cpp:59
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
Time.h
armarx::armem::laser_scans
Definition: aron_conversions.cpp:16
NDArray.h