Cheetah Software
1.0
|
Interface to set gains/control parameters for simulator and robot These are designed to be updated infrequently. For high frequency data, consider using Driver Inputs or adding to the Robot Debug Data instead. More...
#include <map>
#include <mutex>
#include <string>
#include "Utilities/utilities.h"
#include "cTypes.h"
Go to the source code of this file.
Classes | |
union | ControlParameterValuePtr |
union | ControlParameterValue |
class | ControlParameterCollection |
class | ControlParameter |
class | ControlParameters |
Macros | |
#define | CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH 64 |
#define | INIT_PARAMETER(name) param_##name(#name, name, collection) |
#define | DECLARE_PARAMETER(type, name) |
Enumerations | |
enum | ControlParameterValueKind : u64 { ControlParameterValueKind::FLOAT = 0, ControlParameterValueKind::DOUBLE = 1, ControlParameterValueKind::S64 = 2, ControlParameterValueKind::VEC3_DOUBLE = 3, ControlParameterValueKind::VEC3_FLOAT = 4 } |
Functions | |
ControlParameterValueKind | getControlParameterValueKindFromString (const std::string &str) |
std::string | controlParameterValueKindToString (ControlParameterValueKind valueKind) |
std::string | controlParameterValueToString (ControlParameterValue v, ControlParameterValueKind kind) |
Interface to set gains/control parameters for simulator and robot These are designed to be updated infrequently. For high frequency data, consider using Driver Inputs or adding to the Robot Debug Data instead.
ControlParameter: a single value, either a double, float, or s64. Each control parameter must have a unique name Control parameters know their type as well as if they've been initialized or not ControlParameters must be initialized, either from reading from a file, reading from LCM, or some other way (TODO consider supporting Vec3's?) All control parameters must go in a ControlParameters (for now, just robot settings and sim settings)
TODO - what should happen when this fails?
See test_ControlParameters for an example of how this works
Definition in file ControlParameters.h.
#define CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH 64 |
Definition at line 27 of file ControlParameters.h.
#define DECLARE_PARAMETER | ( | type, | |
name | |||
) |
Definition at line 30 of file ControlParameters.h.
#define INIT_PARAMETER | ( | name | ) | param_##name(#name, name, collection) |
Definition at line 29 of file ControlParameters.h.
|
strong |
Enumerator | |
---|---|
FLOAT | |
DOUBLE | |
S64 | |
VEC3_DOUBLE | |
VEC3_FLOAT |
Definition at line 34 of file ControlParameters.h.
std::string controlParameterValueKindToString | ( | ControlParameterValueKind | valueKind | ) |
Definition at line 16 of file ControlParameters.cpp.
References DOUBLE, FLOAT, S64, VEC3_DOUBLE, and VEC3_FLOAT.
std::string controlParameterValueToString | ( | ControlParameterValue | v, |
ControlParameterValueKind | kind | ||
) |
Definition at line 34 of file ControlParameters.cpp.
References ControlParameterValue::d, DOUBLE, ControlParameterValue::f, FLOAT, ControlParameterValue::i, numberToString(), S64, VEC3_DOUBLE, VEC3_FLOAT, ControlParameterValue::vec3d, and ControlParameterValue::vec3f.
ControlParameterValueKind getControlParameterValueKindFromString | ( | const std::string & | str | ) |
Definition at line 257 of file ControlParameters.cpp.
References DOUBLE, FLOAT, S64, VEC3_DOUBLE, and VEC3_FLOAT.