SOLA
Loading...
Searching...
No Matches
amr_kinematics.h
1// Copyright 2023 The SOLA authors
2//
3// This file is part of DAISI.
4//
5// DAISI is free software: you can redistribute it and/or modify it under the terms of the GNU
6// General Public License as published by the Free Software Foundation; version 2.
7//
8// DAISI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
9// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10// Public License for more details.
11//
12// You should have received a copy of the GNU General Public License along with DAISI. If not, see
13// <https://www.gnu.org/licenses/>.
14//
15// SPDX-License-Identifier: GPL-2.0-only
16
17#ifndef DAISI_CPPS_AMR_AMR_KINEMATICS_H_
18#define DAISI_CPPS_AMR_AMR_KINEMATICS_H_
19
20#include "solanet/serializer/serialize.h"
21
22namespace daisi::cpps {
24public:
25 AmrKinematics() = default;
26 AmrKinematics(double max_velocity_m_s, double min_velocity_m_s, double max_acceleration_m_s2,
27 double max_deceleration_m_s2)
28 : max_velocity_m_s_(max_velocity_m_s),
29 min_velocity_m_s_(min_velocity_m_s),
30 max_acceleration_m_s2_(max_acceleration_m_s2),
31 max_deceleration_m_s2_(max_deceleration_m_s2) {}
32
35 double getMaxVelocity() const { return max_velocity_m_s_; }
36 double getMinVelocity() const { return min_velocity_m_s_; }
38
41 double getMaxAcceleration() const { return max_acceleration_m_s2_; }
42 double getMaxDeceleration() const { return max_deceleration_m_s2_; }
44
45 SERIALIZE(max_acceleration_m_s2_, max_deceleration_m_s2_, max_velocity_m_s_, min_velocity_m_s_);
46
47private:
48 double max_velocity_m_s_ = 0.0;
49 double min_velocity_m_s_ = 0.0;
50 double max_acceleration_m_s2_ = 0.0;
51 double max_deceleration_m_s2_ = 0.0;
52};
53} // namespace daisi::cpps
54#endif
Definition amr_kinematics.h:23
double getMaxAcceleration() const
Definition amr_kinematics.h:41
double getMaxVelocity() const
Definition amr_kinematics.h:35