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 @@ -229,6 +229,9 @@ class Servo
229229 std::atomic<double > collision_velocity_scale_ = 1.0 ;
230230 std::unique_ptr<CollisionMonitor> collision_monitor_;
231231
232+ // Plugin loader
233+ std::unique_ptr<pluginlib::ClassLoader<online_signal_smoothing::SmoothingBaseClass>> smoother_loader_;
234+
232235 // Pointer to the (optional) smoothing plugin.
233236 pluginlib::UniquePtr<online_signal_smoothing::SmoothingBaseClass> smoother_ = nullptr ;
234237
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