Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions moveit_ros/moveit_servo/include/moveit_servo/servo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ class Servo
std::atomic<double> collision_velocity_scale_ = 1.0;
std::unique_ptr<CollisionMonitor> collision_monitor_;

// Plugin loader
std::unique_ptr<pluginlib::ClassLoader<online_signal_smoothing::SmoothingBaseClass>> smoother_loader_;

// Pointer to the (optional) smoothing plugin.
pluginlib::UniquePtr<online_signal_smoothing::SmoothingBaseClass> smoother_ = nullptr;

Expand Down
4 changes: 2 additions & 2 deletions moveit_ros/moveit_servo/src/servo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ void Servo::setSmoothingPlugin()
// Load the smoothing plugin
try
{
pluginlib::ClassLoader<online_signal_smoothing::SmoothingBaseClass> smoothing_loader(
smoother_loader_ = std::make_unique<pluginlib::ClassLoader<online_signal_smoothing::SmoothingBaseClass>>(
"moveit_core", "online_signal_smoothing::SmoothingBaseClass");
smoother_ = smoothing_loader.createUniqueInstance(servo_params_.smoothing_filter_plugin_name);
smoother_ = smoother_loader_->createUniqueInstance(servo_params_.smoothing_filter_plugin_name);
}
catch (pluginlib::PluginlibException& ex)
{
Expand Down
Loading