CreOS SDK
The CreOS SDK allows you to interact with Avular robots
 
Loading...
Searching...
No Matches
accel.hpp
1// Copyright (C) 2024 Avular Holding B.V. - All Rights Reserved
2// You may use this code under the terms of the Avular
3// Software End-User License Agreement.
4//
5// You should have received a copy of the Avular
6// Software End-User License Agreement license with
7// this file, or download it from: avular.com/eula
8//
9/*****************************************************************************
10 * Created on: 2024 July 17
11 * Author: Robbert-Jan de Jager
12 *
13 * @file The accel contains a linear and angular acceleration.
14 ****************************************************************************/
15#pragma once
16
17#include <array>
18#include <creos/messages/generic.hpp>
19#include <creos/robot_clock.hpp>
20#include <nlohmann/json.hpp>
21
22namespace creos_messages {
23
27struct Accel {
31 Vector3d linear = {0, 0, 0};
32
36 Vector3d angular = {0, 0, 0};
37
41 auto operator<=>(const Accel& other) const = default;
42};
43
44NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Accel, linear, angular)
45
46
49struct AccelWithCovariance : public Accel {
56
60 auto operator<=>(const AccelWithCovariance& other) const = default;
61};
62
63NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(AccelWithCovariance, linear, angular, covariance)
64
65
68struct AccelStamped : public Accel {
72 creos::RobotClock::time_point timestamp;
73
77 std::string frame_id;
78
82 auto operator<=>(const AccelStamped& other) const = default;
83};
84
85NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(AccelStamped, linear, angular, timestamp, frame_id)
86
87
94 creos::RobotClock::time_point timestamp;
95
99 std::string frame_id;
100
104 auto operator<=>(const AccelWithCovarianceStamped& other) const = default;
105};
106
107NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(AccelWithCovarianceStamped, linear, angular, covariance, timestamp)
108
109} // namespace creos_messages
Matrix template for a 2D array of type T.
Definition generic.hpp:115
The messages that are used in the communication between the agent and the client.
Definition accel.hpp:22
The Accel message contains the linear and angular acceleration of the robot.
Definition accel.hpp:27
auto operator<=>(const Accel &other) const =default
Compare two Accel messages.
Vector3d linear
Linear acceleration of the robot in the world frame [m/s²].
Definition accel.hpp:31
Vector3d angular
Angular acceleration of the robot in the world frame [rad/s²].
Definition accel.hpp:36
The AccelStamped message contains the linear and angular acceleration of the robot with a timestamp.
Definition accel.hpp:68
creos::RobotClock::time_point timestamp
Timestamp of the estimated linear and angular acceleration.
Definition accel.hpp:72
std::string frame_id
Frame id of the accel.
Definition accel.hpp:77
auto operator<=>(const AccelStamped &other) const =default
Compare two AccelStamped messages.
The AccelWithCovariance message contains the linear and angular acceleration of the robot with a cova...
Definition accel.hpp:49
Matrixd< 6, 6 > covariance
Covariance matrix of the pose The covariance matrix is a 6x6 matrix with the following order: [x,...
Definition accel.hpp:55
auto operator<=>(const AccelWithCovariance &other) const =default
Compare two AccelWithCovariance messages.
The AccelWithCovarianceStamped message contains the linear and angular acceleration of the robot with...
Definition accel.hpp:90
creos::RobotClock::time_point timestamp
Timestamp of the estimated linear and angular acceleration.
Definition accel.hpp:94
std::string frame_id
Frame id of the accel.
Definition accel.hpp:99
auto operator<=>(const AccelWithCovarianceStamped &other) const =default
Compare two AccelWithCovarianceStamped messages.
Vector3d message containing a x, y and z of type double.
Definition generic.hpp:48