7 #include <RobotAPI/interface/units/LaserScannerUnit.h>
9 #include <RobotAPI/libraries/armem_laser_scans/aron/LaserScan.aron.generated.h>
21 fromAron(
const arondto::SensorHeader& aronSensorHeader)
23 return {.
agent = aronSensorHeader.agent,
24 .frame = aronSensorHeader.frame,
25 .timestamp = aron::fromAron<Time>(aronSensorHeader.timestamp)};
36 fromAron(
const arondto::LaserScanStamped& aronLaserScan,
38 std::int64_t& timestamp,
40 std::string& agentName)
42 const auto header =
fromAron(aronLaserScan.header);
46 timestamp = header.timestamp.toMicroSecondsSinceEpoch();
48 agentName = header.agent;
67 arondto::SensorHeader aronSensorHeader;
69 aronSensorHeader.agent = sensorHeader.
agent;
70 aronSensorHeader.frame = sensorHeader.
frame;
73 return aronSensorHeader;
78 arondto::LaserScanStamped& aronLaserScanStamped)
80 aronLaserScanStamped.header =
toAron(laserScanStamped.
header);
87 const std::string& frame,
88 const std::string& agentName,
89 arondto::LaserScanStamped& aronLaserScanStamped)
91 const SensorHeader header{.
agent = agentName, .frame = frame, .timestamp = timestamp};
95 toAron(laserScanStamped, aronLaserScanStamped);