File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
admittance_controller/include/admittance_controller Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,17 @@ controller_interface::return_type AdmittanceRule::configure(
45
45
{
46
46
try
47
47
{
48
+ // Make sure we destroy the interface first. Otherwise we might run into a segfault
49
+ if (kinematics_loader_)
50
+ {
51
+ kinematics_.reset ();
52
+ }
48
53
kinematics_loader_ =
49
54
std::make_shared<pluginlib::ClassLoader<kinematics_interface::KinematicsInterface>>(
50
55
parameters_.kinematics .plugin_package , " kinematics_interface::KinematicsInterface" );
51
56
kinematics_ = std::unique_ptr<kinematics_interface::KinematicsInterface>(
52
57
kinematics_loader_->createUnmanagedInstance (parameters_.kinematics .plugin_name ));
58
+
53
59
if (!kinematics_->initialize (
54
60
node->get_node_parameters_interface (), parameters_.kinematics .tip ))
55
61
{
You can’t perform that action at this time.
0 commit comments