Robotics StackExchange | Archived questions

ros2 crystal tutorial gtest message and service testing

Hi,

I would like to write unit tests to test my ROS2 crystal package based on what is communication. Example: Imagine the package is controlled via service commands and publishing its state in a topic. In the utest then I would like to send service commands and subscribe the state topic to validate if the correct changes appeared. In this problem, I have a lot of problems getting a proper synchronisation between sending commands, subscribing from topics, etc.

Is there any standard procedure for such kind of testing? Are there any tutorials/good example packages for such unit testing with ROS2 crystal?

Asked by JanOr on 2019-04-29 02:46:30 UTC

Comments

Answers

If I'm understanding your question correctly, it sounds like you should look at the test_communication package in ROS 2 for a good idea of how to test your packages. That package is in the system_tests repo (linked below).

https://github.com/ros2/system_tests

Asked by allenh1 on 2019-04-29 16:41:48 UTC

Comments