Skip to content

Commit

Permalink
RST-10147 - optimizer logging changes (#372)
Browse files Browse the repository at this point in the history
* Adding some logging to fuse

* Adding same logs to batch optimizer
  • Loading branch information
DavidLocus committed Jul 18, 2024
1 parent 32aae32 commit 0170b4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fuse_optimizers/src/batch_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,15 @@ bool BatchOptimizer::startServiceCallback(std_srvs::Empty::Request&, std_srvs::E

void BatchOptimizer::start()
{
ROS_INFO_STREAM("Starting optimizer.");
// Tell all the plugins to start
startPlugins();
ROS_INFO_STREAM("Starting optimizer complete.");
}

void BatchOptimizer::stop()
{
ROS_INFO_STREAM("Stopping optimizer.");
// Tell all the plugins to stop
stopPlugins();
// Reset the optimizer state
Expand Down Expand Up @@ -315,6 +318,7 @@ void BatchOptimizer::stop()
std::lock_guard<std::mutex> lock(pending_transactions_mutex_);
pending_transactions_.clear();
}
ROS_INFO_STREAM("Optimizer stopping complete.");
}

} // namespace fuse_optimizers
4 changes: 4 additions & 0 deletions fuse_optimizers/src/fixed_lag_smoother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,17 @@ bool FixedLagSmoother::startServiceCallback(std_srvs::Empty::Request&, std_srvs:

void FixedLagSmoother::start()
{
ROS_INFO_STREAM("Starting optimizer.");
// Tell all the plugins to start
startPlugins();
// Test for auto-start
autostart();
ROS_INFO_STREAM("Starting optimizer complete.");
}

void FixedLagSmoother::stop()
{
ROS_INFO_STREAM("Stopping optimizer.");
// Tell all the plugins to stop
stopPlugins();
// Reset the optimizer state
Expand All @@ -490,6 +493,7 @@ void FixedLagSmoother::stop()
timestamp_tracking_.clear();
lag_expiration_ = ros::Time(0, 0);
}
ROS_INFO_STREAM("Optimizer stopping complete.");
}

void FixedLagSmoother::transactionCallback(
Expand Down

0 comments on commit 0170b4a

Please sign in to comment.