|Tags||No category tags.|
|License||Apache License 2.0|
- Shane Loretz
- Aditya Pande
- Aditya Pande
Launch testing examples
This package contains simple use cases for the
These are designed to help beginners get started with these packages and help them understand the concepts.
There might be situations where nodes, once launched, take some time to actually start and we need to wait for the node to start to perform some action.
We can simulate this using
launch.actions.TimerAction. This example shows one way to detect when a node has been launched.
We delay the launch by 5 seconds, and wait for the node to start with a timeout of 8 seconds.
This test launches multiple nodes, and checks if they were launched successfully using the
This test launches a
talker node, records the topics to a
rosbag and makes sure that the messages were recorded successfully,
then deletes the bag file.
Consider a problem statement where you need to launch a node and check if messages are published on a particular topic.
This example demonstrates how to do that, using a talker node.
It uses the
Event object to end the test as soon as the first message is received on the chatter topic, with a timeout of 5 seconds.
This example demonstrates how to launch a node, set a parameter in it and check if that was successful.
This test is a simple example on how to use the
It launches a process and asserts that it prints "hello_world" to
Finally, it checks if the process exits normally (zero exit code).
@launch_testing.markers.keep_alive decorator ensures that the launch process stays alive long enough for the tests to run.
Changelog for package launch_testing_examples
- Readded WaitForTopics utility (#333)
- Final batch of examples (#327)
- Update maintainers to Aditya Pande and Shane Loretz (#332)
- Updated maintainers (#329)
- Contributors: Aditya Pande, Audrow Nash