How to write ROS integration tests?
How do you write ROS integration tests, where you simulate a running node?
I've written some custom ROS nodes, and now I want to create some automated tests to confirm that they publish certain messages in response to receiving certain messages. These docs briefly mention integration tests and running tests "as a node", but they don't make any sense to me. The example given doesn't actually test the node, and only runs a toy self.assertEquals(1, 1)
.
For my test, I want to start roscore, several dependency nodes, my custom node, then publish messages, then wait N seconds for my node to publish its own messages, and fail if this doesn't happen. Is there any documentation on how to achieve this?
Exmaple of integration with ROS / MAVROS