[ROS2] Node pointer from a LifecycleNode

asked 2019-01-16 03:20:59 -0500

Myzhar gravatar image

updated 2019-01-16 03:34:27 -0500

Hi all,

the problem of LifecycleNode pointers support comes back.

Using ROS2 Bouncy I could not directly publish TF because the broadcaster creator requires only a rclcpp::Node pointer as initialization parameter [see the [related post](https://answers.ros.org/question/302459/ros2-tf2_rostransformbroadcaster-and-rclcpp_lifecyclelifecyclenode/)]

In ROS2 Crystal the problem reappears with image_transport.

Indeed also the functions image_transport::create_publisher and image_transport::create_camera_publisher can be initialized only using a rclcpp::Node pointer.

LifecycleNode is a very useful feature introduced in ROS2, but developers think yet with an eye on ROS1 and they do not take care about the new kind of nodes...

I think that this is a very annoying problem.

PS the only solution that I can imagine is to create a rclcpp::Node component that subscribes to sensor_msgs::msg::Image topics and republish them using image_transport... this is absurd ;)

edit retag flag offensive close merge delete


Have you heard anything with regards to this?

surfertas gravatar image surfertas  ( 2019-08-11 22:49:31 -0500 )edit

There is an open ticket for image transport: https://github.com/ros-perception/ima... I believe the same changes as for geometry2 can easily be applied for the image transport.

Karsten gravatar image Karsten  ( 2019-08-12 12:00:03 -0500 )edit

@Karsten Can you reference the link to the changes in geometry2? Thank you.

surfertas gravatar image surfertas  ( 2019-08-12 21:25:26 -0500 )edit

PR108, i.e. changes like these: https://github.com/ros2/geometry2/pul... Essentially everything which was a rclcpp::Node before becomes a templated Node &&. The free functions like rclcpp::create_subscription take anything "node-like".

Karsten gravatar image Karsten  ( 2019-08-12 22:41:59 -0500 )edit

Any news about this? @Karsten@surfertas

Myzhar gravatar image Myzhar  ( 2020-01-21 10:18:58 -0500 )edit

I don't have any updates on this rather than what I mentioned earlier, that a change to make this work shouldn't be too complicated. I propose to continue the conversation on the referenced github ticket.

Karsten gravatar image Karsten  ( 2020-01-21 15:54:30 -0500 )edit