Skip to content
Snippets Groups Projects
Commit 1cc25449 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

solver_manager fixed STATE_UPDATE using std::copy

Revert "undo changes in state_block"

This reverts commit 789b42d2.

Revert "Revert "undo changes in state_block""

This reverts commit f9fdb5f4526e4e0222bd54568dd75081b03b3597.
parent 46b9d2ff
No related branches found
No related tags found
No related merge requests found
...@@ -58,18 +58,11 @@ void SolverManager::update() ...@@ -58,18 +58,11 @@ void SolverManager::update()
WOLF_DEBUG_COND(state_blocks_.find(state)==state_blocks_.end(), WOLF_DEBUG_COND(state_blocks_.find(state)==state_blocks_.end(),
"Updating the state of an unregistered StateBlock !"); "Updating the state of an unregistered StateBlock !");
// This will throw if StateBlock wasn't registered assert(state_blocks_.find(state)!=state_blocks_.end() &&
// state_blocks_.at(state) = state->getState(); "Updating the state of an unregistered StateBlock !");
// state_blocks_[state] = state->getState();
// if (!registered)
// {
// addStateBlock(state);
// }
// assert(state_blocks_.find(state)!=state_blocks_.end() && Eigen::VectorXs new_state = state->getState();
// "Updating the state of an unregistered StateBlock !"); std::copy(new_state.data(),new_state.data()+new_state.size(),getAssociatedMemBlockPtr(state));
break; break;
} }
...@@ -81,7 +74,10 @@ void SolverManager::update() ...@@ -81,7 +74,10 @@ void SolverManager::update()
assert(state_blocks_.find(state)!=state_blocks_.end() && assert(state_blocks_.find(state)!=state_blocks_.end() &&
"Updating the fix state of an unregistered StateBlock !"); "Updating the fix state of an unregistered StateBlock !");
updateStateBlockStatus(state); if (state_blocks_.find(state)!=state_blocks_.end())
{
updateStateBlockStatus(state);
}
break; break;
} }
......
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