parameters.hpp
Go to the documentation of this file.
1 
9 /*****************************************************************************
10  ** Ifdefs
11  *****************************************************************************/
12 
13 #ifndef KOBUKI_PARAMETERS_HPP_
14 #define KOBUKI_PARAMETERS_HPP_
15 
16 /*****************************************************************************
17  ** Includes
18  *****************************************************************************/
19 
20 #include <string>
21 #include "modules/battery.hpp"
22 
23 /*****************************************************************************
24  ** Namespaces
25  *****************************************************************************/
26 
27 namespace kobuki
28 {
29 
30 /*****************************************************************************
31  ** Interface
32  *****************************************************************************/
36 class Parameters
37 {
38 public:
39  Parameters() :
40  device_port("/dev/kobuki"),
41  sigslots_namespace("/kobuki"),
42  simulation(false),
44  battery_capacity(Battery::capacity),
45  battery_low(Battery::low),
46  battery_dangerous(Battery::dangerous),
48  linear_deceleration_limit(-0.3*1.2),
51  {
52  }
54  std::string device_port;
55  std::string sigslots_namespace;
56  bool simulation;
58  double battery_capacity; /* defaults defined in battery.cpp */
59  double battery_low; /* defaults defined in battery.cpp */
60  double battery_dangerous; /* defaults defined in battery.cpp */
61 
66 
74  bool validate()
75  {
76  // not doing anything right now - delete it, if we can find a use case ...
77  return true;
78  }
79 
80  std::string error_msg;
81 };
82 
83 } // namespace kobuki
84 
85 #endif /* KOBUKI_PARAMETERS_HPP_ */
kobuki::Parameters::sigslots_namespace
std::string sigslots_namespace
The first part of a sigslot connection namespace ["/kobuki"].
Definition: parameters.hpp:69
kobuki::Parameters::linear_deceleration_limit
double linear_deceleration_limit
Definition: parameters.hpp:77
kobuki::Parameters::simulation
bool simulation
Whether to put the motors in loopback mode or not [false].
Definition: parameters.hpp:70
battery.hpp
Human friendly batter indicator class.
kobuki::Parameters::enable_acceleration_limiter
bool enable_acceleration_limiter
Enable or disable the acceleration limiter [true].
Definition: parameters.hpp:71
kobuki
Definition: command.hpp:31
kobuki::Parameters::error_msg
std::string error_msg
Provides error messages when parameter validation fails (internal purposes only)
Definition: parameters.hpp:94
kobuki::Battery
Battery level module.
Definition: battery.hpp:46
kobuki::Parameters::linear_acceleration_limit
double linear_acceleration_limit
Definition: parameters.hpp:76
kobuki::Parameters::validate
bool validate()
A validator to ensure the user has supplied correct/sensible parameter values.
Definition: parameters.hpp:88
kobuki::Parameters::angular_acceleration_limit
double angular_acceleration_limit
Definition: parameters.hpp:78
kobuki::Parameters::angular_deceleration_limit
double angular_deceleration_limit
Definition: parameters.hpp:79
kobuki::Parameters::battery_dangerous
double battery_dangerous
Threshold for battery level in danger of depletion [13.2V].
Definition: parameters.hpp:74
kobuki::Parameters::battery_low
double battery_low
Threshold for battery level warnings [14.0V].
Definition: parameters.hpp:73
kobuki::Parameters::device_port
std::string device_port
The serial device port name [/dev/kobuki].
Definition: parameters.hpp:68
kobuki::Parameters::battery_capacity
double battery_capacity
Capacity voltage of the battery [16.5V].
Definition: parameters.hpp:72


kobuki_driver
Author(s): Daniel Stonier , Younghun Ju , Jorge Santos Simon
autogenerated on Wed Mar 2 2022 00:26:14