How do i test ros2 on multiple simulation worlds with diferent scenarios. How do i load the world, scenario, test data. Save the results and compare with expected results, with deviations from expectations.
Asked
Active
Viewed 86 times
1 Answers
1
One solution is to use launch file EventHandlers.
The loop should follow these steps:
- Launch the first node using a launch file and a .yaml parameters file. The name of the node should be defined inside the launch file using a loop, appending a number to the node name. For example: Node_test1, Node_test2, ...
- Inside the node define a function that saves on file the results of your tests.
- Use an event handler to wait for the first node to finish and then run the second node with new parameters.
The .yaml file should have be defined like this:
Node_test1:
ros__parameters:
param_example: 0.01
second_param_example: 10000
Node_test2:
ros__parameters:
param_example: 0.02
second_param_example: 20000
Then you could create a different node which loads all the file inside a folder, does the required computations and finally save the results on another file.

Alesof
- 321
- 2
- 8