Skip to content
Snippets Groups Projects
Commit 098e0bff authored by armar-user's avatar armar-user
Browse files

Better handle reconnect

parent 66d417e0
No related branches found
No related tags found
No related merge requests found
......@@ -64,8 +64,10 @@ namespace armarx
void RobotToArViz::onConnectComponent()
{
// Load robot.
this->robot = RobotState::addRobot(robotName, VirtualRobot::RobotIO::RobotDescription::eStructure);
if (!RobotState::hasRobot(robotName))
{
this->robot = RobotState::addRobot(robotName, VirtualRobot::RobotIO::RobotDescription::eStructure);
}
// Initialize robot visu element.
this->robotViz = viz::Robot(robot->getName());
......
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