[ros-users] [Discourse.ros.org] [Next Generation ROS] Robot-localization porting to ROS2

Dirk Thomas ros.discourse at gmail.com
Tue Dec 11 17:18:05 UTC 2018



[quote="Rohita83, post:8, topic:6379"]
As there are few test cases which depends on the rosbag and rosbag is not available in ros2
[/quote]

The upcoming ROS 2 Crystal release does contain [rosbag2](https://github.com/ros2/rosbag2/).

[quote="Rohita83, post:8, topic:6379"]
rostest package is not available in ros2
[/quote]

While not complete or fully features the [launch_testing](https://github.com/ros2/launch/tree/2c64252997bd6da7e2b3edef34a376281390eb83/launch_testing) package provides some ways to write tests based on launch files.

[quote="Rohita83, post:8, topic:6379"]
As the launch.py files are launching multiple nodes, it is not exiting on its own
[/quote]

You should structure you launch-based tests in a way that e.g. one of the processed (usually the one using gtest) terminates after running all tests. You can use event handlers in the launch file to then shutdown all the other processes cleanly. While using the legacy API the tests in the [demo_nodes_cpp](https://github.com/ros2/demos/tree/f2a1d9f5fe694a11fb42f3c036dacd130141ac0e/demo_nodes_cpp/test) package can serve as an example.





---
[Visit Topic](https://discourse.ros.org/t/robot-localization-porting-to-ros2/6379/11) or reply to this email to respond.




More information about the ros-users mailing list