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

Revision history [back]

click to hide/show revision 1
initial version

You can use the rclpy client library to create topics in your tests that talk to the node being tested. It is no different to using any other library in your test code. You can use lambdas for topic callbacks to make it easier to manage the test code, and you can use the event queuing API to do things like require the node under test to respond within a certain time, or to wait for one single response.

You should play with when to create the node and topic (in the test's setup, or the whole test group's setup, for example) to find the most efficient test execution without creating hidden state that can impact later tests.