ros2 / launch_ros

Tools for launching ROS nodes and for writing tests involving ROS nodes.
Apache License 2.0
58 stars 72 forks source link

:woman_farmer: `RuntimeError: Context.init() must only be called once` test regression #407

Closed claraberendsen closed 2 months ago

claraberendsen commented 2 months ago

Bug report

It seems like #402 might have introduced a regression on the tests for all repeated linux jobs.

test_launch_ros.test.test_launch_ros.actions.test_ros_timer.test_timer_uses_sim_time[2-3] test_launch_ros.test.test_launch_ros.actions.test_ros_timer.test_timer_uses_sim_time[3-3]

The error message is:

failed on setup with "RuntimeError: Context.init() must only be called once"

Previous example build without this error: https://ci.ros2.org/view/nightly/job/nightly_linux-aarch64_repeated/2812/ Affected builds: nightly_linux-rhel_repeated#1968 nightly_linux_repeated#3521 nightly_linux-aarch64_repeated#2823

Required Info:

Steps to reproduce issue

Run a build of any of the projects above and see the test fail

claraberendsen commented 2 months ago

It seems to be related to a change in rclpy https://github.com/ros2/rclpy/pull/1298

clalancette commented 2 months ago

This should be fixed by https://github.com/ros2/rclpy/pull/1314

clalancette commented 2 months ago

Closing now that https://github.com/ros2/rclpy/pull/1314 has been merged.