Skip to content
Snippets Groups Projects
Commit 7856e189 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Make variable local

parent 188db4be
No related branches found
No related tags found
2 merge requests!140armem/dev -> master,!133Add Object Memory with Class and Instance Segments
......@@ -95,11 +95,12 @@ namespace armarx::armem::server::obj
{
// onConnect can be called multiple times, but addRobot will fail if called more than once with the same ID
// So we need to always make sure to guard a call to addRobot
if (!RobotState::hasRobot("robot"))
{
robot = RobotState::addRobot("robot", VirtualRobot::RobotIO::RobotDescription::eStructure);
}
robotStateComponent = getRobotStateComponent();
const std::string robotKey = "robot";
VirtualRobot::RobotPtr robot = RobotState::hasRobot(robotKey)
? RobotState::getRobot(robotKey)
: RobotState::addRobot(robotKey, VirtualRobot::RobotIO::RobotDescription::eStructure);
robotStateComponent = RobotState::getRobotStateComponent();
getProxyFromProperty(kinematicUnitObserver, "cmp.KinematicUnitObserverName", false, "", false);
......
......@@ -106,9 +106,6 @@ namespace armarx::armem::server::obj
RobotStateComponentInterfacePrx robotStateComponent;
KinematicUnitObserverInterfacePrx kinematicUnitObserver;
VirtualRobot::RobotPtr robot;
clazz::Segment classSegment;
......
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