SOLA
Loading...
Searching...
No Matches
daisi
src
path_planning
message
drive_message.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_PATH_PLANNING_MESSAGE_DRIVE_MESSAGE_H_
18
#define DAISI_PATH_PLANNING_MESSAGE_DRIVE_MESSAGE_H_
19
20
#include <ns3/vector.h>
21
22
#include <cstdint>
23
#include <optional>
24
25
#include "solanet/serializer/serialize.h"
26
27
namespace
daisi::path_planning::message {
28
30
class
DriveMessage
{
31
public
:
32
DriveMessage
() =
default
;
33
34
explicit
DriveMessage
(ns3::Vector2D pos) : initialized_(
true
), pos_x_(pos.x), pos_y_(pos.y) {}
35
36
[[nodiscard]]
bool
isInitialized()
const
{
return
initialized_; }
37
38
[[nodiscard]] ns3::Vector2D getGoal()
const
{
return
{pos_x_, pos_y_}; };
39
40
SERIALIZE(pos_x_, pos_y_);
41
42
private
:
43
bool
initialized_ =
false
;
44
double
pos_x_ = 0;
45
double
pos_y_ = 0;
46
};
47
}
// namespace daisi::path_planning::message
48
49
#endif
// DAISI_PATH_PLANNING_MESSAGE_DRIVE_MESSAGE_H_
daisi::path_planning::message::DriveMessage
Message that is send from PickupStation to logical AGV with drive instructions.
Definition
drive_message.h:30
Generated by
1.9.8