diff --git a/source/RobotAPI/components/armem/server/RobotStateMemory/RobotStateMemory.cpp b/source/RobotAPI/components/armem/server/RobotStateMemory/RobotStateMemory.cpp index 0fb6084879973577bae9e221a0e1e140cc9cc8af..a4821d35bde4bb25074770f9d7497e41b1b1d1a3 100644 --- a/source/RobotAPI/components/armem/server/RobotStateMemory/RobotStateMemory.cpp +++ b/source/RobotAPI/components/armem/server/RobotStateMemory/RobotStateMemory.cpp @@ -72,11 +72,13 @@ namespace armarx::armem::server::robot_state armarx::PropertyDefinitionsPtr RobotStateMemory::createPropertyDefinitions() { + const std::string robotUnitPrefix{sensorValuePrefix}; + armarx::PropertyDefinitionsPtr defs = new ComponentPropertyDefinitions(getConfigIdentifier()); - defs->optional(robotUnitSensorPrefix, "RobotUnit.SensorValuePrefix", "Prefix of all sensor values"); - defs->optional(robotUnitMemoryBatchSize, "RobotUnit.MemoryBatchSize", "The size of the entity snapshot to send to the memory. Min is 1"); - defs->optional(robotUnitPollFrequency, "RobotUnit.UpdateFrequency", "The frequency in Hz to store values. All other values get discarded. Min is 1, max is " + std::to_string(ROBOT_UNIT_MAXIMUM_FREQUENCY)); - defs->optional(robotUnitConfigPath, "robotUnit.ConfigPath", "Specify a configuration file to group the sensor values specifically."); + defs->optional(robotUnitSensorPrefix, robotUnitPrefix + "SensorValuePrefix", "Prefix of all sensor values"); + defs->optional(robotUnitMemoryBatchSize, robotUnitPrefix + "MemoryBatchSize", "The size of the entity snapshot to send to the memory. Min is 1"); + defs->optional(robotUnitPollFrequency, robotUnitPrefix + "UpdateFrequency", "The frequency in Hz to store values. All other values get discarded. Min is 1, max is " + std::to_string(ROBOT_UNIT_MAXIMUM_FREQUENCY)); + defs->optional(robotUnitConfigPath, robotUnitPrefix + "ConfigPath", "Specify a configuration file to group the sensor values specifically."); descriptionSegment.defineProperties(defs); proprioceptionSegment.defineProperties(defs); diff --git a/source/RobotAPI/components/armem/server/RobotStateMemory/RobotStateMemory.h b/source/RobotAPI/components/armem/server/RobotStateMemory/RobotStateMemory.h index 45530f17a5adb6f0d5608123227cca9c66eea089..e8174416e9b547f70af5e5c6b578242a0234743d 100644 --- a/source/RobotAPI/components/armem/server/RobotStateMemory/RobotStateMemory.h +++ b/source/RobotAPI/components/armem/server/RobotStateMemory/RobotStateMemory.h @@ -139,6 +139,8 @@ namespace armarx::armem::server::robot_state // params static constexpr int ROBOT_UNIT_MAXIMUM_FREQUENCY = 100; + static constexpr const char* sensorValuePrefix = "RobotUnit."; + int robotUnitPollFrequency = 50; std::string robotUnitSensorPrefix = "sens.*"; unsigned int robotUnitMemoryBatchSize = 50;