Skip to content

Commit 7a52098

Browse files
committed
Don't allow a running instance to be started. Instance must be stopped first.
1 parent 2c709db commit 7a52098

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fuse_optimizers/src/fixed_lag_smoother.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,12 @@ bool FixedLagSmoother::startServiceCallback(std_srvs::Empty::Request&, std_srvs:
458458

459459
void FixedLagSmoother::start()
460460
{
461+
if (started_)
462+
{
463+
ROS_WARN_STREAM("Requested to start the optimizer while it is already running. Ignoring request.");
464+
return;
465+
}
466+
461467
ROS_INFO_STREAM("Starting optimizer.");
462468
// Tell all the plugins to start
463469
startPlugins();

0 commit comments

Comments
 (0)