Skip to content

Resolve "Fix Regression with point_cloud_filter_transform_node"

Joshua Whitley requested to merge 532-fix-point-cloud-filter-transform-node into master

Closes #532 (closed)

@christopher.ho @esteve I have confirmed experimentally what I expected before but had not tested: For a class to be Component-compliant it must have one and only one constructor with the signature ClassName(const rclcpp::NodeOptions & options). The problematic commit mentioned in the above issue did all of the following:

  • Added a constructor which had the rclcpp::NodeOptions argument defaulted.
  • Did not remove the original constructor.
  • Used the rclcpp_components_register_node CMake macro's EXECUTABLE argument.
  • Missed the RCLCPP_COMPONENTS_REGISTER_NODE preprocessor macro.

Because of this combination, the node could be run but the executable wouldn't be able to load the Component and didn't register it with the ROS service. In addition, the constructor used for the integration test was not the Component-compliant constructor so the only place that this would be noticed is if it ran as part of a processing pipeline.

This MR:

  • Removes the explicit constructor
  • Adds the missing preprocessor macro
  • Changes the test to use the Component-compliant constructor.
Edited by Joshua Whitley

Merge request reports