bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitsim_consts.h
Go to the documentation of this file.
1#ifndef BITSIM_CONSTS_H
2#define BITSIM_CONSTS_H
4#include <filesystem>
5#include <numbers>
6#include <string>
7
8namespace bitsim
9{
10namespace consts
11{
12
16inline const uint_t INVALID_ID = static_cast<uint_t>(-1);
17
21inline const std::string INVALID_STR = std::string("INVALID");
22
26inline const real_t TOLERANCE = 1.0e-8;
27
37std::filesystem::path data_dir();
38
42inline const std::string ROBOTS_DIR = (data_dir() / "robots").string();
43
47inline const std::string SENSORS_DIR = (data_dir() / "sensors").string();
48
52inline std::filesystem::path build_robot_file_path(const std::string filename)
53{
54 return std::filesystem::path(ROBOTS_DIR) / filename;
55}
56
57namespace maths
58{
59
63inline const real_t PI = std::numbers::pi;
64
68inline const real_t G = 9.81;
69} // namespace maths
70
71} // namespace consts
72
73} // namespace bitsim
74
75#endif // BITSIM_CONSTS_H
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
Definition bitsim_consts.h:58
const real_t G
Acceleration due to gravity m/secs.
Definition bitsim_consts.h:68
const real_t PI
The PI constant.
Definition bitsim_consts.h:63
Definition bitsim_consts.cpp:10
const real_t TOLERANCE
Tolerance used around the library.
Definition bitsim_consts.h:26
const std::string ROBOTS_DIR
Path to robots definitions.
Definition bitsim_consts.h:42
std::filesystem::path build_robot_file_path(const std::string filename)
Definition bitsim_consts.h:52
const uint_t INVALID_ID
Invalid id.
Definition bitsim_consts.h:16
const std::string SENSORS_DIR
Path to sensors definitions.
Definition bitsim_consts.h:47
const std::string INVALID_STR
Invalid string.
Definition bitsim_consts.h:21
std::filesystem::path data_dir()
The directory that holds the robot, sensor and world definitions.
Definition bitsim_consts.cpp:12
Definition dc_motor_backend_base.h:9
std::size_t uint_t
uint_t
Definition bitsim_types.h:40
double real_t
real_t
Definition bitsim_types.h:20