[Discourse.ros.org] [General] ROS2 Composition

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [General] ROS2 Composition

Dirk Thomas via ros-users


I'm new to ROS2. How Can I spin the node using composition techniques. In the case of publishers, examples shows use of timer to bind the callback function. Is there any other way of continuously sniping the node without binding it to timer.

In composition example.:
     // Use a timer to schedule periodic message publishing.
      timer_ = create_wall_timer(1s, std::bind(&Talker::on_timer, this));

My use case application is creating a video/image (OpenCV) publisher.

Regards,
MJay





---
[Visit Topic](https://discourse.ros.org/t/ros2-composition/2469/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [General] ROS2 Composition

Dirk Thomas via ros-users


In the composition case none of the nodes is in charge of the main function / main thread. Therefore you either have to use a timer to get notified in regular intervals or start your own thread (with all the implications for locking / thread safety).





---
[Visit Topic](https://discourse.ros.org/t/ros2-composition/2469/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>