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

Humble / Rolling in 22.04 Cannot handle callback groups #75

Closed
SteveMacenski opened this issue Jun 15, 2022 · 0 comments
Closed

Humble / Rolling in 22.04 Cannot handle callback groups #75

SteveMacenski opened this issue Jun 15, 2022 · 0 comments

Comments

@SteveMacenski
Copy link
Contributor

SteveMacenski commented Jun 15, 2022

We've been having an issue in Nav2 as of moving to 22.04 that our obstacle layers / costmap collision checkers haven't been working properly ros-navigation/navigation2#3014 -- e.g. no data is getting to our callbacks, which is quite the problem for a vision-based navigation system 😆

It seems to boil down to the fact that when we moved to using a single set of nodes for each process, we starting making a bunch of use of callback groups that were tested and working fine on rolling in 20.04. I checked and Galactic is on 3.X.X of this package so rolling was probably around there when it was on 20.04, but now rolling is on 4.X.X along with Humble, which includes the changes in the PR below.

What appears to be the issue is that #56 incorrectly added an error in one of the constructors for processing subscriber options which includes the callback group request.

  virtual void subscribe(
    NodePtr node,
    const std::string& topic,
    const rmw_qos_profile_t qos,
    rclcpp::SubscriptionOptions options)
  {
    this->subscribe(node.get(), topic, qos, options);
  };

  virtual void subscribe(
    NodeType * node,
    const std::string& topic,
    const rmw_qos_profile_t qos,
    rclcpp::SubscriptionOptions options)
  {
    (void) options;
    RCLCPP_ERROR(
      node->get_logger(),
      "SubscriberBase::subscribe with four arguments has not been overridden");
    this->subscribe(node, topic, qos);
  }

So if the constructor is called with a node type pointer rather than a shared pointer then the options aren't passed and has a warning which seems bogus (?) since the constructor just above it does this fine with another pointer type. This entirely explains the behavior we're seeing if its using the second constructor and throwing out our options because of the type of the node provided.

I believe the fix is to remove the warning and use the option in the this->subscribe() call in the second implementation.

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

No branches or pull requests

1 participant