How to use launch_testing for testing executables created by cpp ros2 nodes?

asked 2019-12-10 16:58:45 -0500

ros2user gravatar image

I am trying to explore ways to test ros2 nodes, and so far came across the following methods:


Objective to accomplish: - Is to launch "system under test" node - publish some data on "SUT" node inputs - subscribe to the outputs of "SUT" node - assert and verify "SUT" outputs. - assert if the "SUT" node launches, shuts down properly

I guess, this objective can be accomplished without the above-mentioned packages (launch_testing & launch_testing_ros), but looking for better suggestions.

Also, where can find examples to test cpp ros2 nodes using these launch_testing or launch_testing_ros.

Environment: Ros2 Eloquent, Ubuntu 18.04

edit retag flag offensive close merge delete


Hello! I have this exact same question. Did you by chance figure out what to use for cpp ros2 nodes? I am just leaning towards option 2 since it has a simple "talker" "listener" example that would work for me.

swaroophs gravatar image swaroophs  ( 2020-05-20 03:50:40 -0500 )edit