File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,9 @@ class Servo
237237 std::atomic<double > collision_velocity_scale_ = 1.0 ;
238238 std::unique_ptr<CollisionMonitor> collision_monitor_;
239239
240+ // Plugin loader
241+ std::unique_ptr<pluginlib::ClassLoader<online_signal_smoothing::SmoothingBaseClass>> smoother_loader_;
242+
240243 // Pointer to the (optional) smoothing plugin.
241244 pluginlib::UniquePtr<online_signal_smoothing::SmoothingBaseClass> smoother_ = nullptr ;
242245
Original file line number Diff line number Diff line change @@ -139,9 +139,9 @@ void Servo::setSmoothingPlugin()
139139 // Load the smoothing plugin
140140 try
141141 {
142- pluginlib::ClassLoader<online_signal_smoothing::SmoothingBaseClass> smoothing_loader (
142+ smoother_loader_ = std::make_unique< pluginlib::ClassLoader<online_signal_smoothing::SmoothingBaseClass>> (
143143 " moveit_core" , " online_signal_smoothing::SmoothingBaseClass" );
144- smoother_ = smoothing_loader. createUniqueInstance (servo_params_.smoothing_filter_plugin_name );
144+ smoother_ = smoother_loader_-> createUniqueInstance (servo_params_.smoothing_filter_plugin_name );
145145 }
146146 catch (pluginlib::PluginlibException& ex)
147147 {
You can’t perform that action at this time.
0 commit comments