Robot.h
Go to the documentation of this file.
1 //=============================================================================
2 // Copyright (C) 2021-2024 Wageningen University - All Rights Reserved
3 // Author: Gonzalo Mier
4 // BSD-3 License
5 //=============================================================================
6 
7 #pragma once
8 #ifndef FIELDS2COVER_TYPES_ROBOT_H_
9 #define FIELDS2COVER_TYPES_ROBOT_H_
10 
11 #include <gdal/ogr_geometry.h>
12 #include <utility>
13 #include <string>
14 #include <vector>
15 #include <optional>
22 
23 namespace f2c::types {
24 
25 struct Robot {
26  public:
27  explicit Robot(double width, double cov_width = 0.0,
28  double max_curv = 1.0, double max_diff_curv = 0.3);
29  Robot();
30  ~Robot();
31  Robot(const Robot&);
32  Robot(Robot &&);
33  Robot &operator=(const Robot&);
34  Robot &operator=(Robot&&);
35 
36  std::string getName() const;
37  void setName(const std::string& str);
38 
39  double getWidth() const;
40  void setWidth(double);
41 
42  double getCovWidth() const;
43  void setCovWidth(double);
44 
45  double getCruiseVel() const;
46  void setCruiseVel(double);
47 
48  double getTurnVel() const;
49  void setTurnVel(double);
50 
51  double getMinTurningRadius() const;
52  void setMinTurningRadius(double rad);
53 
54  double getMaxCurv() const;
55  void setMaxCurv(double);
56 
57  double getMaxDiffCurv() const;
58  void setMaxDiffCurv(double);
59 
60  private:
61  std::string name_;
62 
64  double width_ {0.0};
66  double cov_width_ {0.0};
67 
69  double cruise_speed_ {1.0};
70 
72  double max_icc_ {1.0}; // [1/m]
73 
75  double linear_curv_change_ {0.3}; // [1/m^2]
76 
78  std::optional<double> turn_vel_;
79 };
80 
81 } // namespace f2c::types
82 
83 #endif // FIELDS2COVER_TYPES_ROBOT_H_
Cell.h
Point.h
f2c::types
Types used by fields2cover library.
Definition: Cell.h:20
Path.h
f2c::types::Robot::getName
std::string getName() const
Definition: Robot.cpp:33
f2c::types::Robot::getMaxDiffCurv
double getMaxDiffCurv() const
Definition: Robot.cpp:89
f2c::types::Robot::getCovWidth
double getCovWidth() const
Definition: Robot.cpp:49
f2c::types::Robot::setName
void setName(const std::string &str)
Definition: Robot.cpp:37
f2c::types::Robot::Robot
Robot()
f2c::types::Robot::setMaxCurv
void setMaxCurv(double)
Definition: Robot.cpp:85
f2c::types::Robot::cov_width_
double cov_width_
Width of the coverage area of the robot.
Definition: Robot.h:66
f2c::types::Robot::getTurnVel
double getTurnVel() const
Definition: Robot.cpp:65
f2c::types::Robot::~Robot
~Robot()
f2c::types::Robot::setWidth
void setWidth(double)
Definition: Robot.cpp:45
f2c::types::Robot::cruise_speed_
double cruise_speed_
Velocity of the robot when not doing turns.
Definition: Robot.h:69
f2c::types::Robot::linear_curv_change_
double linear_curv_change_
Maximum linear curvature change.
Definition: Robot.h:75
LineString.h
2_objective_functions.width
float width
Definition: 2_objective_functions.py:29
f2c::types::Robot::getMaxCurv
double getMaxCurv() const
Definition: Robot.cpp:81
f2c::types::Robot::operator=
Robot & operator=(const Robot &)
f2c::types::Robot::getMinTurningRadius
double getMinTurningRadius() const
Definition: Robot.cpp:73
f2c::types::Robot::turn_vel_
std::optional< double > turn_vel_
Velocity of the robot when doing turns. If not set, cruise_speed_ is used.
Definition: Robot.h:78
f2c::types::Robot::setMaxDiffCurv
void setMaxDiffCurv(double)
Definition: Robot.cpp:93
f2c::types::Robot::width_
double width_
Width of the robot.
Definition: Robot.h:64
MultiLineString.h
f2c::types::Robot::setMinTurningRadius
void setMinTurningRadius(double rad)
Definition: Robot.cpp:77
f2c::types::Robot::setCovWidth
void setCovWidth(double)
Definition: Robot.cpp:53
f2c::types::Robot
Definition: Robot.h:25
f2c::types::Robot::setCruiseVel
void setCruiseVel(double)
Definition: Robot.cpp:61
f2c::types::Robot::setTurnVel
void setTurnVel(double)
Definition: Robot.cpp:69
Cells.h
f2c::types::Robot::getCruiseVel
double getCruiseVel() const
Definition: Robot.cpp:57
f2c::types::Robot::getWidth
double getWidth() const
Definition: Robot.cpp:41
f2c::types::Robot::max_icc_
double max_icc_
Maximum instantaneous curvature change.
Definition: Robot.h:72
f2c::types::Robot::name_
std::string name_
Definition: Robot.h:61


fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31