Program Listing for File parameters.hpp
↰ Return to documentation for file (include/kobuki_core/parameters.hpp
)
/*****************************************************************************
** Ifdefs
*****************************************************************************/
#ifndef KOBUKI_CORE_PARAMETERS_HPP_
#define KOBUKI_CORE_PARAMETERS_HPP_
/*****************************************************************************
** Includes
*****************************************************************************/
#include <string>
#include "logging.hpp"
#include "modules/battery.hpp"
/*****************************************************************************
** Namespaces
*****************************************************************************/
namespace kobuki
{
/*****************************************************************************
** Interface
*****************************************************************************/
class Parameters
{
public:
Parameters() :
device_port("/dev/kobuki"),
sigslots_namespace("/kobuki"),
simulation(false),
enable_acceleration_limiter(true),
battery_capacity(Battery::capacity),
battery_low(Battery::low),
battery_dangerous(Battery::dangerous),
linear_acceleration_limit(0.3),
linear_deceleration_limit(-0.3*1.2),
angular_acceleration_limit(3.5),
angular_deceleration_limit(-3.5*1.2),
log_level(LogLevel::WARNING)
{
}
std::string device_port;
std::string sigslots_namespace;
bool simulation;
bool enable_acceleration_limiter;
double battery_capacity; /* defaults defined in battery.cpp */
double battery_low; /* defaults defined in battery.cpp */
double battery_dangerous; /* defaults defined in battery.cpp */
double linear_acceleration_limit;
double linear_deceleration_limit;
double angular_acceleration_limit;
double angular_deceleration_limit;
LogLevel log_level;
bool validate()
{
// not doing anything right now - delete it, if we can find a use case ...
return true;
}
std::string error_msg;
};
} // namespace kobuki
#endif /* KOBUKI_CORE_PARAMETERS_HPP_ */