Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JointGroupPositionController fails to initialize on Rolling due to rclcpp "undeclare_parameter" API change #221

Closed
schornakj opened this issue Aug 11, 2021 · 2 comments · Fixed by #222

Comments

@schornakj
Copy link
Contributor

There have already been some fixes to other controllers for the rclcpp parameter API changes. Currently (as of 0.4.1) the JointGroupPositionController fails to initialize because it tries to undeclare a statically-typed parameter at these lines, which produces an error:

[ros2_control_node-1] [INFO] [1628693935.184140389] [controller_manager]: Loading controller 'position_controller'
[ros2_control_node-1] Exception thrown during init stage with message: parameter 'interface_name' has invalid type: cannot undeclare an statically typed parameter 
[ros2_control_node-1] [ERROR] [1628693935.194137855] [controller_manager]: Could not initialize the controller named 'position_controller'

I wanted to get some additional context and input before I try to fix this myself: why is it necessary to undeclare the interface_name parameter declared by ForwardCommandController, and does anyone else already have a fix in mind?

@gc-robotics
Copy link

gc-robotics commented Aug 14, 2021

I am facing the same issue.

Exception thrown from the following line:

// undeclare interface parameter used in the general forward_command_controller
get_node()->undeclare_parameter("interface_name");

Checking undeclare_parameter, I see the check below is failing:

  if (!parameter_info->second.descriptor.dynamic_typing) {
    throw rclcpp::exceptions::InvalidParameterTypeException{
            name, "cannot undeclare an statically typed parameter"};
  }

I believe the parameter is "interface_name". Not sure where that is added or defined, as I don't have it in my YAML controller definition.

Anyone actively working on this?

@gc-robotics
Copy link

Have just seen the PR. Will wait for the approval. Thanks @schornakj .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants