diff --git a/nav2_velocity_smoother/src/velocity_smoother.cpp b/nav2_velocity_smoother/src/velocity_smoother.cpp index 6573d74684f..17c9ee718d1 100644 --- a/nav2_velocity_smoother/src/velocity_smoother.cpp +++ b/nav2_velocity_smoother/src/velocity_smoother.cpp @@ -209,6 +209,11 @@ double VelocitySmoother::applyConstraints( void VelocitySmoother::smootherTimer() { + // Wait until the first command is received + if (!command_) { + return; + } + auto cmd_vel = std::make_unique(); // Check for velocity timeout. If nothing received, publish zeros to stop robot