rclcpp icon indicating copy to clipboard operation
rclcpp copied to clipboard

Implement Unified Node Interface (NodeInterfaces class)

Open methylDragon opened this issue 3 years ago • 17 comments

Finally a longstanding quibble about Nodes and LifecycleNodes and node interfaces has a potential resolution.

Description

This PR introduces the concept of a NodeInterfaces class (that is, a unified adapter for any disparate collection of unique kinds of NodeInterfaces) that allows you to package interfaces into a single object. This is inspired by https://github.com/ros2/rclcpp/issues/831.

This allows you to write functions that take in a single object instead of a collection of node interfaces (or instead of a templated function...), and also supports both Nodes and LifecycleNodes, allowing you to quickly swap any place where you originally passed a Node with a NodeInterfaces. This also means that the issue where Nodes and LifecycleNodes exist on separate inheritance trees can be mitigated a little by using this as a bridging class.

What's more, the template parameters allow you to select which interfaces are made available, and also can serve as type hints to downstream users for which interfaces a function requires.

Additionally, you can aggregate interfaces from different nodes (or mocked interfaces) too, which isn't something you could trivially do if you made your function a template function that takes in a NodeT!

This PR also adds a new method for Nodes and LifecycleNodes to obtain their corresponding NodeInterfaces.

Tests have been implemented for Nodes, LifecycleNodes, and the NodeInterfaces template class itself.

Example

This is best explained with an example.

// Suppose we wanted to get a NodeInterfaces with just a NodeBaseInterface
// Passing a node gets it prebound!
auto base_nh = std::make_shared<NodeInterfaces<node_interfaces::Base>>(node);
base_nh->get_node_base_interface()->get_name(); // Now we can access the base interface!

// Furthermore, because we only specified that we wanted the BaseInterface...
base_nh->get_node_clock_interface(); // This won't work, since it'll be deleted!

// How about a combination?
auto base_and_clock_nh =
  std::make_shared<NodeInterfaces<node_interfaces::Base, node_interfaces::Clock>>(node);
base_and_clock_nh->get_node_base_interface();
base_and_clock_nh->get_node_clock_interface();

// Or from a free function?
get_node_interfaces<node_interfaces::Base>(node);

Not only that, we can aggregate node interfaces too!

auto empty_nh = std::make_shared<NodeInterfaces<node_interfaces::Base>>();

empty_nh->get_node_base_interface();  // Is nullptr
empty_nh->set_node_base_interface(node_a->get_node_base_interface());

And of course, you can just get the NodeInterfaces from nodeTs directly.

node->get_node_interfaces<node_interfaces::Base>(); // And one with just the Base interface
node->get_node_interfaces<node_interfaces::Base, node_interfaces::Clock>(); // Or a combination? :>

lifecycle_node->get_node_interfaces<node_interfaces::Base>(); // And one with just the Base interface
lifecycle_node->get_node_interfaces<node_interfaces::Base, node_interfaces::Clock>(); // Or a combination? :>

Naturally, equivalent methods exist for LifecycleNodes too!

Why is this useful?

(Adapted from https://github.com/ros2/rclcpp/issues/831)

Before you would have to...

create_service(
  std::shared_ptr<node_interfaces::Base> node_base,
  std::shared_ptr<node_interfaces::Services> node_services,
  // ...

// User calls with
auto service = create_service(
  my_node_class->get_node_base_interface(),
  my_node_class->get_node_services_interface(),
...

But now you can:

create_service(
   NodeInterfaces<Base, Services> node_handle,
   // ...

// User calls with
auto service = create_service(
  NodeInterfaces<Base, Services>(my_node_or_lifecycle_node_class),
  // ...

And just like that you can support both Nodes and LifecycleNodes! This also serves as an easy drop-in replacement for any method that takes in an rclcpp::Node or similar shared pointer!

Additional Notes

This uses C++14 compatible template metaprogramming constructs, for backportability. I'm pretty sure there are some C++17/C++20 constructs that would make the implementation more concise though.. For a future time.

EDIT: I realized that fold expressions are C++17... We'll have to find some workaround when backporting. (Actually so is is_same_v :man_facepalming: )

methylDragon avatar Nov 03 '22 06:11 methylDragon

Only thing I'm unsure of if if I should leave the NodeT constructor for NodeHandle explicit.

If it's not explicit we can rely on implicit conversion to allow passing in Node-like objects directly into methods that take in NodeHandle arguments without needing to explicitly instantiate the NodeHandle.. (I think? Maybe the templates won't let that happen, in which case, the point is moot...)

methylDragon avatar Nov 03 '22 07:11 methylDragon

Will build #11111 be the one???

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

methylDragon avatar Nov 03 '22 07:11 methylDragon

I like the overall idea. However I have a couple of questions from looking at your examples.

It seems like there are multiple methods to retrieve each interface (e.g. base and get_node_base_interface), why is that?

Can we implement it in a way such that users can customize it? I.e. If I create a new node interface, I would like to add it there

alsora avatar Nov 03 '22 07:11 alsora

I like the overall idea. However I have a couple of questions from looking at your examples.

It seems like there are multiple methods to retrieve each interface (e.g. base and get_node_base_interface), why is that?

Can we implement it in a way such that users can customize it? I.e. If I create a new node interface, I would like to add it there

It's already implemented in such a way that you can attach a custom interface to the NodeHandle! Just use set_node_XXX_interface(your_interface) or XXX(your_interface) and it'll overwrite/set the interface.

If you mean creating a new type of node interface, I'm not sure if it's possible (I'm already using quite a lot of template metaprogramming wizardry to achieve what we have at the moment...) And in that case, the nodes themselves need to be updated to support the interface, so at that point I'd just ask for a PR for those new interfaces to be added to the NodeHandle class.

The multiple ways for retrieving the interface are just for convenience (or typing less...) I was basing it off the issue over this PR was inspired by. More precisely, the shorter name is for convenience, while the longer name is supposed to use the same names as the node getters for node interfaces.

methylDragon avatar Nov 03 '22 09:11 methylDragon

I'd also like to talk about the name of the new class NodeHandle. I think we should pick something else because really it's not a "handle" (we already have a rcl_node_handle_t which is actually a handle, i.e. an opaque object that is a stand in for another actual thing) and because we had a NodeHandle in ROS 1 which was something very different and that might cause confusion.

Ideally this whole class would be replaced with a constraint but we don't have access to that atm with C++17.

Some ideas from me:

  • NodeWithInterfaces<...>

    • my_func(NodeWithInterface<...>) would read as "my_func takes a Node-like thing with the interfaces ..."
  • NodeWithRequiredInterfaces<...>

  • NodeInterfaces<...>

    • invokes the idea of a collection of interfaces, which may or may not be misleading depending on how we end up implementing this class

How about NodeInterfaceHandle? (Since it's a handler for node interfaces, no matter where they come from). Otherwise, I'm fine with NodeInterfaces also, since this class is just supposed to be an aggregation of interfaces.

I'm less inclined towards the NodeWith... variants because it might confuse users and make them think it's a node as opposed to a node-like thing

methylDragon avatar Nov 08 '22 00:11 methylDragon

@ros-pull-request-builder retest this please

methylDragon avatar Nov 09 '22 08:11 methylDragon

I'd also like to talk about the name of the new class NodeHandle. I think we should pick something else because really it's not a "handle" (we already have a rcl_node_handle_t which is actually a handle, i.e. an opaque object that is a stand in for another actual thing) and because we had a NodeHandle in ROS 1 which was something very different and that might cause confusion.

+1 Of the proposed options, NodeInterfaces<...> seems nice to me.

ivanpauno avatar Nov 09 '22 13:11 ivanpauno

I'd also like to talk about the name of the new class NodeHandle. I think we should pick something else because really it's not a "handle" (we already have a rcl_node_handle_t which is actually a handle, i.e. an opaque object that is a stand in for another actual thing) and because we had a NodeHandle in ROS 1 which was something very different and that might cause confusion.

+1 Of the proposed options, NodeInterfaces<...> seems nice to me.

@ivanpauno

Could I double-check that this +1 is over NodeInterfaceHandle (so +1 to NodeInterfaces even though NodeInterfaceHandle exists?) The multiple inheritance templated example you gave above used NodeInterfaceHandle :grimacing:.

I'll change it to whichever you give the +1 to!

Also, what do you think about putting getters for this node interface aggregate onto Node and LifecycleNode?

methylDragon avatar Nov 10 '22 06:11 methylDragon

I've updated the tests and moved everything to node_interfaces!

RPr is green!

methylDragon avatar Nov 10 '22 08:11 methylDragon

Could I double-check that this +1 is over NodeInterfaceHandle (so +1 to NodeInterfaces even though NodeInterfaceHandle exists?) The multiple inheritance templated example you gave above used NodeInterfaceHandle grimacing. I'll change it to whichever you give the +1 to!

I kept the original naming in my example to avoid confusions. I think that replacing NodeHandle with NodeInterfaces in my example is fine. NodeInterfaceHandle seems a bit long IMHO.

Also, what do you think about putting getters for this node interface aggregate onto Node and LifecycleNode?

I think it would be fine if the NodeInterfaces constructor is implicit. i.e.

// declaration
void my_func(NodeInterfaces<Base, Topics> node);

// usage
rclcpp::Node::SharedPtr node = std::make_shared<MyNodeDerivedClass>(...);
my_func(node);  // works thanks to implicit constructor

Having also a getter is fine though.

ivanpauno avatar Nov 10 '22 13:11 ivanpauno

Could I double-check that this +1 is over NodeInterfaceHandle (so +1 to NodeInterfaces even though NodeInterfaceHandle exists?) The multiple inheritance templated example you gave above used NodeInterfaceHandle grimacing. I'll change it to whichever you give the +1 to!

I kept the original naming in my example to avoid confusions. I think that replacing NodeHandle with NodeInterfaces in my example is fine. NodeInterfaceHandle seems a bit long IMHO.

Also, what do you think about putting getters for this node interface aggregate onto Node and LifecycleNode?

I think it would be fine if the NodeInterfaces constructor is implicit. i.e.

// declaration
void my_func(NodeInterfaces<Base, Topics> node);

// usage
rclcpp::Node::SharedPtr node = std::make_shared<MyNodeDerivedClass>(...);
my_func(node);  // works thanks to implicit constructor

Having also a getter is fine though.

Alright, I'll rename it to NodeInterfaces!

Do you know how to allow an implicit constructor to get past the linters? Since the constructor takes a single argument, the linter screams that it should be explicit...

methylDragon avatar Nov 10 '22 19:11 methylDragon

Do you know how to allow an implicit constructor to get past the linters? Since the constructor takes a single argument, the linter screams that it should be explicit

Is it cpplint? I think // NOLINT(runtime/explicit) on the same line as the constructor would silence that.

sloretz avatar Nov 10 '22 19:11 sloretz

Class has been renamed!

(The only thing that's iffy to me is it makes the include path rclcpp/node_interfaces/node_interfaces.hpp, which could potentially be misleading..)


That, and, I was wondering if it'll be a good idea to have the support classes also forward the interface methods that they support?

So we can do this?

// Instead of (or in addition to..)
node_interfaces->get_base_interface()->get_name();

// We can do
node_interfaces->get_name();

Or will it cause too many potential name clashes?

methylDragon avatar Nov 10 '22 19:11 methylDragon

.. I have no idea how to fix that Windows linking error. All the involved objects are templated, and the other platforms don't complain, so what gives :scream:

methylDragon avatar Nov 11 '22 01:11 methylDragon

Looks good to me. I left a couple of minor comments about style. CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

alsora avatar Nov 13 '22 10:11 alsora

I'm gonna change around a few methods for const correctness..

methylDragon avatar Nov 15 '22 01:11 methylDragon

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

methylDragon avatar Nov 15 '22 03:11 methylDragon

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

methylDragon avatar Dec 02 '22 06:12 methylDragon

The windows instability seems to be unrelated, but I started a rebuild anyway

  • Windows Build Status

methylDragon avatar Dec 02 '22 18:12 methylDragon

I opened https://github.com/methylDragon/rclcpp/pull/1 to suggest a different approach for this pr.

wjwwood avatar Dec 13 '22 00:12 wjwwood

I'll be iterating on the changes incorporated from https://github.com/methylDragon/rclcpp/pull/1

methylDragon avatar Dec 14 '22 19:12 methylDragon

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

methylDragon avatar Dec 14 '22 23:12 methylDragon

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

methylDragon avatar Dec 16 '22 07:12 methylDragon

Re-running windows CI with parantheses around the fold expression (the only issue is cppcheck)

  • Windows Build Status

methylDragon avatar Dec 19 '22 19:12 methylDragon

I realized me adding the parentheses has a ridiculously minuscule chance of changing the behavior for linux machines, but I'm going to run CI just to be sure.

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

methylDragon avatar Dec 20 '22 02:12 methylDragon

Hey @methylDragon @wjwwood, this PR broke RHEL nightly builds when building rclcpp. Can you please take a look?:

  • RHEL Debug: https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_debug/1371/consoleFull
  • RHEL Release: https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_release/1370/consoleFull

Log output:

--- stderr: rclcpp
In file included from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp[K:
/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node_interfaces/node_interfaces.hpp: In instantiation of ‘[Krclcpp::node_interfaces::NodeInterfaces<InterfaceTs>::NodeInterfaces(std::shared_ptr<_Yp>) [with NodeT = rclcpp::Node; InterfaceTs = {rclcpp::node_interfaces::NodeBaseInterface, rclcpp::node_interfaces::NodeGraphInterfac[K’:
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp:47:[K   required from here
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node_interfaces/node_interfaces.hpp:153:[Kerro[Kuse of deleted functio[Krclcpp::Node::Node(const rclcpp::Nod[K’
   : NodeInterfaces([Knode ? *node : throw std::invalid_argument("given node pointer is nullpt[K)
                    [K~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[K
In file included from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/context.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/utilities.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/build/rclcpp/include/rclcpp/logging.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/client.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/callback_group.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp[K:
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node.hpp:1578:[Knot[Kdeclared here
   RCLCPP_DISABLE_COPY([KN[K)
                       [K^[K
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/macros.hpp:27[Knot[Kin definition of macr[KRCLCPP_DISABLE_C[K’
   [K__VA_ARG[K(const __VA_ARGS__ &) = delete; \
   [K^~~~~~~~[K
In file included from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp[K:
/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node_interfaces/node_interfaces.hpp: In instantiation of ‘[Krclcpp::node_interfaces::NodeInterfaces<InterfaceTs>::NodeInterfaces(std::shared_ptr<_Yp>) [with NodeT = rclcpp::Node; InterfaceTs = {rclcpp::node_interfaces::NodeBaseInterfac[K’:
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp:58:[K   required from here
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node_interfaces/node_interfaces.hpp:153:[Kerro[Kuse of deleted functio[Krclcpp::Node::Node(const rclcpp::Nod[K’
   : NodeInterfaces([Knode ? *node : throw std::invalid_argument("given node pointer is nullpt[K)
                    [K~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[K
In file included from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/context.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/utilities.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/build/rclcpp/include/rclcpp/logging.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/client.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/callback_group.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp[K:
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node.hpp:1578:[Knot[Kdeclared here
   RCLCPP_DISABLE_COPY([KN[K)
                       [K^[K
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/macros.hpp:27[Knot[Kin definition of macr[KRCLCPP_DISABLE_C[K’
   [K__VA_ARG[K(const __VA_ARGS__ &) = delete; \
   [K^~~~~~~~[K
In file included from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp[K:
/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node_interfaces/node_interfaces.hpp: In instantiation of ‘[Krclcpp::node_interfaces::NodeInterfaces<InterfaceTs>::NodeInterfaces(std::shared_ptr<_Yp>) [with NodeT = rclcpp::Node; InterfaceTs = {rclcpp::node_interfaces::NodeBaseInterface, rclcpp::node_interfaces::NodeClockInterface, rclcpp::node_interfaces::NodeGraphInterface, rclcpp::node_interfaces::NodeLoggingInterface, rclcpp::node_interfaces::NodeTimersInterface, rclcpp::node_interfaces::NodeTopicsInterface, rclcpp::node_interfaces::NodeServicesInterface, rclcpp::node_interfaces::NodeWaitablesInterface, rclcpp::node_interfaces::NodeParametersInterface, rclcpp::node_interfaces::NodeTimeSourceInterfac[K’:
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp:105:[K   required from here
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node_interfaces/node_interfaces.hpp:153:[Kerro[Kuse of deleted functio[Krclcpp::Node::Node(const rclcpp::Nod[K’
   : NodeInterfaces([Knode ? *node : throw std::invalid_argument("given node pointer is nullpt[K)
                    [K~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[K
In file included from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/context.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/utilities.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/build/rclcpp/include/rclcpp/logging.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/client.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/callback_group.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp[K:
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node.hpp:1578:[Knot[Kdeclared here
   RCLCPP_DISABLE_COPY([KN[K)
                       [K^[K
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/macros.hpp:27[Knot[Kin definition of macr[KRCLCPP_DISABLE_C[K’
   [K__VA_ARG[K(const __VA_ARGS__ &) = delete; \
   [K^~~~~~~~[K
In file included from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp[K:
/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node_interfaces/node_interfaces.hpp: In instantiation of ‘[Krclcpp::node_interfaces::NodeInterfaces<InterfaceTs>::NodeInterfaces(std::shared_ptr<_Yp>) [with NodeT = rclcpp::Node; InterfaceTs = {rclcpp::node_interfaces::NodeBaseInterface, rclcpp::node_interfaces::NodeClockInterface, rclcpp::node_interfaces::NodeGraphInterface, rclcpp::node_interfaces::NodeLoggingInterface, rclcpp::node_interfaces::NodeParametersInterface, rclcpp::node_interfaces::NodeServicesInterface, rclcpp::node_interfaces::NodeTimeSourceInterface, rclcpp::node_interfaces::NodeTimersInterface, rclcpp::node_interfaces::NodeTopicsInterface, rclcpp::node_interfaces::NodeWaitablesInterfac[K’:
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp:201:[K   required from here
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node_interfaces/node_interfaces.hpp:153:[Kerro[Kuse of deleted functio[Krclcpp::Node::Node(const rclcpp::Nod[K’
   : NodeInterfaces([Knode ? *node : throw std::invalid_argument("given node pointer is nullpt[K)
                    [K~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[K
In file included from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/context.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/utilities.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/build/rclcpp/include/rclcpp/logging.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/client.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/callback_group.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node.hpp[K,
                 from [K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_interfaces.cpp[K:
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/node.hpp:1578:[Knot[Kdeclared here
   RCLCPP_DISABLE_COPY([KN[K)
                       [K^[K
[K/home/jenkins-agent/workspace/nightly_linux-rhel_debug/ws/src/ros2/rclcpp/rclcpp/include/rclcpp/macros.hpp:27[Knot[Kin definition of macr[KRCLCPP_DISABLE_C[K’
   [K__VA_ARG[K(const __VA_ARGS__ &) = delete; \
   [K^~~~~~~~[K
gmake[2]: *** [test/rclcpp/CMakeFiles/test_node_interfaces__node_interfaces.dir/build.make:76: test/rclcpp/CMakeFiles/test_node_interfaces__node_interfaces.dir/node_interfaces/test_node_interfaces.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:2943: test/rclcpp/CMakeFiles/test_node_interfaces__node_interfaces.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2

I notice:

Crola1702 avatar Jan 02 '23 14:01 Crola1702

@Crola1702 I'm looking at it!

methylDragon avatar Jan 02 '23 19:01 methylDragon

Hey @methylDragon @wjwwood, this PR broke RHEL nightly builds when building rclcpp. Can you please take a look?:

  • RHEL Debug: https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_debug/1371/consoleFull
  • RHEL Release: https://ci.ros2.org/view/nightly/job/nightly_linux-rhel_release/1370/consoleFull

Log output:

I notice:

Noting that this was fixed in

  • https://github.com/ros2/rclcpp/pull/2075

methylDragon avatar Jan 27 '23 15:01 methylDragon