Skip to content
Snippets Groups Projects
Commit 1f496acc authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Add Problem::transformAll()

parent 9f47d66e
No related branches found
No related tags found
2 merge requests!466devel->main,!455Resolve "Implement processor bootstrapping"
...@@ -364,6 +364,7 @@ class Problem : public std::enable_shared_from_this<Problem> ...@@ -364,6 +364,7 @@ class Problem : public std::enable_shared_from_this<Problem>
// All branches ------------------------------------------- // All branches -------------------------------------------
// perturb states // perturb states
void perturb(double amplitude = 0.01); void perturb(double amplitude = 0.01);
void transformAll(const VectorComposite& _transformation);
// Covariances // Covariances
void clearCovariance(); void clearCovariance();
......
...@@ -1255,4 +1255,24 @@ void Problem::perturb(double amplitude) ...@@ -1255,4 +1255,24 @@ void Problem::perturb(double amplitude)
L->perturb(amplitude); L->perturb(amplitude);
} }
void Problem::transformAll(const VectorComposite& _transformation)
{
// TODO: uncomment all calls to transform() below:
// Sensors
for (auto S : getHardware()->getSensorList())
S->transform(_transformation);
// Frames and Captures
for (auto F : getTrajectory()->getFrameMap())
{
F.second->transform(_transformation);
for (auto& C : F.second->getCaptureList())
C->transform(_transformation);
}
// Landmarks
for (auto L : getMap()->getLandmarkList())
L->transform(_transformation);
}
} // namespace wolf } // namespace wolf
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