You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we currently don't have the ROS2 equivalent for the AsyncSpinner, I helped myself out by excluding the executor::spin() function and running this in a separate thread.
Is that the recommended way and how such an asyncspinner could look like in the ROS2 world?
void
spin(rclcpp::executors::multi_threaded_executor::MultiThreadedExecutor * exe)
{
exe->spin();
}
// main
rclcpp::executors::multi_threaded_executor::MultiThreadedExecutor executor;
auto future_handle = std::async(std::launch::async, spin, &executor);
Activity
wjwwood commentedon Jun 5, 2017
This was already asked in the forum (at least I think it is a duplicate):
https://discourse.ros.org/t/async-executor-in-ros2/1575
I'd recommend what I put in the discourse thread or this:
Karsten1987 commentedon Jun 5, 2017
great. thanks for the link. I didn't see that.
itfanr commentedon Jun 26, 2019
For ros2 dashing:
pankhurivanjani commentedon Jul 21, 2019
Hello @itfanr !
I am having issues in implementing it in ROS dashing.
With ROS1 I was using start and stop. What to do in this case?
Also if I have:
where start:
My code is not printing "hi" and "hey". It is not moving to further lines wheras with ROS since I used asyncspinner I had no problem.
Add QoS to metadata (re-do ros2#330) (ros2#335)