Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

function callback using std::bind in ros 2 subscription

Hi,

Using std::bind with rclcpp::Node::create_subscription() throws compilation errors.

For example, I cannot use

sub_input_ = node->create_subscription<sensor_msgs::msg::Imu>("input",
  std::bind(
      &input_surface_indices_callback,
      this, <argument1>,<argument2>));

However using lamdas as a callback function is ok in this case. Any help/information on this is welcome.