ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Is there an equivalent of rospy.wait_for_message in ros2?

asked 2022-11-10 02:20:38 -0600

Edvard gravatar image

Hi. Sorry for all mistakes, English is not my native language. I have following line of code in my ROS1 project:

trajectory = rospy.wait_for_message('/trajectory_node_list', MarkerArray, 1.0)

How this line should look in ros2? I have find this and this links with similar question but those two was about C++ and newest one was asked more than year ago, so maybe something changed from those time. Appreciate any help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-11-17 19:27:19 -0600

clyde gravatar image

I have not tried it, but I see that this features was added to rclpy Rolling just 2 days ago:

edit flag offensive delete link more



Thank you for your help. I'm working with Foxy for now, but it still a huge help. I'll check it.

Edvard gravatar image Edvard  ( 2022-11-17 23:42:37 -0600 )edit

Question Tools



Asked: 2022-11-10 02:20:38 -0600

Seen: 402 times

Last updated: Nov 17 '22