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

WIP: Add structure to IM::getState() API

parent 752939e2
No related branches found
No related tags found
1 merge request!379Resolve "Problem::getState(structure) doesn't care about structure"
Pipeline #5664 failed
...@@ -26,8 +26,8 @@ class IsMotion ...@@ -26,8 +26,8 @@ class IsMotion
// Queries to the processor: // Queries to the processor:
virtual TimeStamp getTimeStamp() const = 0; virtual TimeStamp getTimeStamp() const = 0;
virtual VectorComposite getState() const = 0; virtual VectorComposite getState(const StateStructure& _structure = "") const = 0;
virtual VectorComposite getState(const TimeStamp& _ts) const = 0; virtual VectorComposite getState(const TimeStamp& _ts, const StateStructure& _structure = "") const = 0;
std::string getStateStructure(){return state_structure_;}; std::string getStateStructure(){return state_structure_;};
void setStateStructure(std::string _state_structure){state_structure_ = _state_structure;}; void setStateStructure(std::string _state_structure){state_structure_ = _state_structure;};
......
...@@ -166,8 +166,8 @@ class ProcessorMotion : public ProcessorBase, public IsMotion ...@@ -166,8 +166,8 @@ class ProcessorMotion : public ProcessorBase, public IsMotion
// Queries to the processor: // Queries to the processor:
TimeStamp getTimeStamp() const override; TimeStamp getTimeStamp() const override;
VectorComposite getState() const override; VectorComposite getState(const StateStructure& _structure = "") const override;
VectorComposite getState(const TimeStamp& _ts) const override; VectorComposite getState(const TimeStamp& _ts, const StateStructure& _structure = "") const override;
/** \brief Gets the delta preintegrated covariance from all integrations so far /** \brief Gets the delta preintegrated covariance from all integrations so far
* \return the delta preintegrated covariance matrix * \return the delta preintegrated covariance matrix
......
...@@ -400,7 +400,7 @@ void ProcessorMotion::processCapture(CaptureBasePtr _incoming_ptr) ...@@ -400,7 +400,7 @@ void ProcessorMotion::processCapture(CaptureBasePtr _incoming_ptr)
postProcess(); postProcess();
} }
VectorComposite ProcessorMotion::getState() const VectorComposite ProcessorMotion::getState(const StateStructure& _structure) const
{ {
if (last_ptr_ == nullptr or last_ptr_->getFrame() == nullptr) // We do not have any info of where to find a valid state if (last_ptr_ == nullptr or last_ptr_->getFrame() == nullptr) // We do not have any info of where to find a valid state
...@@ -474,7 +474,7 @@ VectorComposite ProcessorMotion::getState() const ...@@ -474,7 +474,7 @@ VectorComposite ProcessorMotion::getState() const
// _x needs to have the size of the processor state // _x needs to have the size of the processor state
VectorComposite ProcessorMotion::getState(const TimeStamp& _ts) const VectorComposite ProcessorMotion::getState(const TimeStamp& _ts, const StateStructure& _structure) const
{ {
// We need to search for the capture containing a motion buffer with the queried time stamp // We need to search for the capture containing a motion buffer with the queried time stamp
......
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