Skip to content
Snippets Groups Projects
Commit ffdfb23f authored by Markus Grotz's avatar Markus Grotz Committed by armar-user
Browse files

(MG, FQ) add dependency flag to RobotStateMemory

- the RobotStateMemory requires a running RobotUnit.
parent d3b5966d
No related branches found
No related tags found
No related merge requests found
...@@ -63,6 +63,9 @@ namespace armarx::armem::server::robot_state ...@@ -63,6 +63,9 @@ namespace armarx::armem::server::robot_state
const std::string robotUnitPrefix = robotUnit.sensorValuePrefix; const std::string robotUnitPrefix = robotUnit.sensorValuePrefix;
defs->optional(robotUnit.waitForRobotUnit, "WaitForRobotUnit", "Add the robot unit as dependency to the component. This memory requires a running RobotUnit, therefore we should add it as explicit dependency.");
defs->optional(robotUnit.reader.properties.sensorPrefix, robotUnitPrefix + "SensorValuePrefix", defs->optional(robotUnit.reader.properties.sensorPrefix, robotUnitPrefix + "SensorValuePrefix",
"Prefix of all sensor values."); "Prefix of all sensor values.");
defs->optional(robotUnit.pollFrequency, robotUnitPrefix + "UpdateFrequency", defs->optional(robotUnit.pollFrequency, robotUnitPrefix + "UpdateFrequency",
...@@ -115,6 +118,11 @@ namespace armarx::armem::server::robot_state ...@@ -115,6 +118,11 @@ namespace armarx::armem::server::robot_state
std::vector<std::string> projectIncludePaths = simox::alg::split(pathsString, ";,"); std::vector<std::string> projectIncludePaths = simox::alg::split(pathsString, ";,");
includePaths.insert(includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end()); includePaths.insert(includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end());
} }
if (robotUnit.waitForRobotUnit)
{
usingProxy(robotUnit.plugin->getRobotUnitName());
}
} }
......
...@@ -124,6 +124,8 @@ namespace armarx::armem::server::robot_state ...@@ -124,6 +124,8 @@ namespace armarx::armem::server::robot_state
// queue // queue
std::queue<proprioception::RobotUnitData> dataQueue; std::queue<proprioception::RobotUnitData> dataQueue;
std::mutex dataMutex; std::mutex dataMutex;
bool waitForRobotUnit = false;
}; };
RobotUnit robotUnit; RobotUnit robotUnit;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment