CreOS SDK
The CreOS SDK allows you to interact with Avular robots
 
Loading...
Searching...
No Matches
wheel_state.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 18
11 * Author: Robbert-Jan de Jager
12 *
13 * @file Wheel state message containing the position and velocity of the wheels
14 ****************************************************************************/
15#pragma once
16
17#include <compare>
18#include <creos/robot_clock.hpp>
19#include <nlohmann/json.hpp>
20#include <vector>
21
22#include "generic.hpp"
23
24namespace creos_messages {
25
29struct WheelState {
33 float position = 0;
34
38 float velocity = 0;
39
43 auto operator<=>(const WheelState& other) const = default;
44};
45
46NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(WheelState, position, velocity)
47
48
52
56 creos::RobotClock::time_point timestamp;
57
61 std::string frame_id;
62
67 std::vector<WheelState> wheels;
68
70 auto operator<=>(const WheelStates& other) const = default;
71};
72
73NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(WheelStates, timestamp, frame_id, wheels)
74
75} // namespace creos_messages
The messages that are used in the communication between the agent and the client.
Definition accel.hpp:22
Wheel state message containing the position and velocity of one wheel.
Definition wheel_state.hpp:29
auto operator<=>(const WheelState &other) const =default
Compare two WheelState messages.
float position
Position of the wheel [rad].
Definition wheel_state.hpp:33
float velocity
Velocity of the wheel [rad/s].
Definition wheel_state.hpp:38
Wheel state message containing the position and velocity of the wheels.
Definition wheel_state.hpp:51
creos::RobotClock::time_point timestamp
Timestamp of the remote controller state.
Definition wheel_state.hpp:56
auto operator<=>(const WheelStates &other) const =default
Compare two ControllerState messages.
std::string frame_id
Frame id of the wheel states.
Definition wheel_state.hpp:61
std::vector< WheelState > wheels
Wheel states.
Definition wheel_state.hpp:67