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

small var rename for consistency with convention

parent f115986a
No related branches found
No related tags found
No related merge requests found
Pipeline #4359 passed
...@@ -262,10 +262,10 @@ class Problem : public std::enable_shared_from_this<Problem> ...@@ -262,10 +262,10 @@ class Problem : public std::enable_shared_from_this<Problem>
// State getters // State getters
Eigen::VectorXs getCurrentState ( ) const; Eigen::VectorXs getCurrentState ( ) const;
void getCurrentState (Eigen::VectorXs& state) const; void getCurrentState (Eigen::VectorXs& _state) const;
void getCurrentStateAndStamp (Eigen::VectorXs& state, TimeStamp& _ts) const; void getCurrentStateAndStamp (Eigen::VectorXs& _state, TimeStamp& _ts) const;
Eigen::VectorXs getState (const TimeStamp& _ts) const; Eigen::VectorXs getState (const TimeStamp& _ts) const;
void getState (const TimeStamp& _ts, Eigen::VectorXs& state) const; void getState (const TimeStamp& _ts, Eigen::VectorXs& _state) const;
// Zero state provider // Zero state provider
Eigen::VectorXs zeroState ( ) const; Eigen::VectorXs zeroState ( ) const;
bool priorIsSet() const; bool priorIsSet() const;
......
...@@ -328,42 +328,42 @@ Eigen::VectorXs Problem::getCurrentState() const ...@@ -328,42 +328,42 @@ Eigen::VectorXs Problem::getCurrentState() const
return state; return state;
} }
void Problem::getCurrentState(Eigen::VectorXs& state) const void Problem::getCurrentState(Eigen::VectorXs& _state) const
{ {
if (processor_motion_ptr_ != nullptr) if (processor_motion_ptr_ != nullptr)
processor_motion_ptr_->getCurrentState(state); processor_motion_ptr_->getCurrentState(_state);
else if (trajectory_ptr_->getLastKeyOrAuxFrame() != nullptr) else if (trajectory_ptr_->getLastKeyOrAuxFrame() != nullptr)
trajectory_ptr_->getLastKeyOrAuxFrame()->getState(state); trajectory_ptr_->getLastKeyOrAuxFrame()->getState(_state);
else else
state = zeroState(); _state = zeroState();
} }
void Problem::getCurrentStateAndStamp(Eigen::VectorXs& state, TimeStamp& ts) const void Problem::getCurrentStateAndStamp(Eigen::VectorXs& _state, TimeStamp& ts) const
{ {
if (processor_motion_ptr_ != nullptr) if (processor_motion_ptr_ != nullptr)
{ {
processor_motion_ptr_->getCurrentState(state); processor_motion_ptr_->getCurrentState(_state);
processor_motion_ptr_->getCurrentTimeStamp(ts); processor_motion_ptr_->getCurrentTimeStamp(ts);
} }
else if (trajectory_ptr_->getLastKeyOrAuxFrame() != nullptr) else if (trajectory_ptr_->getLastKeyOrAuxFrame() != nullptr)
{ {
trajectory_ptr_->getLastKeyOrAuxFrame()->getTimeStamp(ts); trajectory_ptr_->getLastKeyOrAuxFrame()->getTimeStamp(ts);
trajectory_ptr_->getLastKeyOrAuxFrame()->getState(state); trajectory_ptr_->getLastKeyOrAuxFrame()->getState(_state);
} }
else else
state = zeroState(); _state = zeroState();
} }
void Problem::getState(const TimeStamp& _ts, Eigen::VectorXs& state) const void Problem::getState(const TimeStamp& _ts, Eigen::VectorXs& _state) const
{ {
// try to get the state from processor_motion if any, otherwise... // try to get the state from processor_motion if any, otherwise...
if (processor_motion_ptr_ == nullptr || !processor_motion_ptr_->getState(_ts, state)) if (processor_motion_ptr_ == nullptr || !processor_motion_ptr_->getState(_ts, _state))
{ {
FrameBasePtr closest_frame = trajectory_ptr_->closestKeyOrAuxFrameToTimeStamp(_ts); FrameBasePtr closest_frame = trajectory_ptr_->closestKeyOrAuxFrameToTimeStamp(_ts);
if (closest_frame != nullptr) if (closest_frame != nullptr)
closest_frame->getState(state); closest_frame->getState(_state);
else else
state = zeroState(); _state = zeroState();
} }
} }
......
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