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

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
1

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:

https://github.com/ros2/rclpy/issues/953

https://github.com/ros2/rclpy/pull/960

edit flag offensive delete link more

Comments

1

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

2 followers

Stats

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

Seen: 1,173 times

Last updated: Nov 17 '22