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

ros2 crystal tutorial gtest message and service testing

asked 2019-04-29 02:46:30 -0500

JanOr gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-04-29 16:41:48 -0500

allenh1 gravatar image

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

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-04-29 02:46:30 -0500

Seen: 1,036 times

Last updated: Apr 29 '19