Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple networking testbed #2

Merged
merged 14 commits into from
Feb 8, 2023
Merged

Conversation

arjo129
Copy link
Member

@arjo129 arjo129 commented Jan 19, 2023

warning This is experimental code and not likely to be stable for
some time.

This repo provides a simple networking test bed using
docker
and docker-compose. You will need to
have both of these tools set up.
Additionally it assumes a checkout from the "discovery_modes_full.repos"

One can test various scenarios use cases using the script and the
docker-compose.yml. To get started simply run:

./test_scenario.bash <path to your ros2 checkout>

This will build a docker image and run a test scenario where a container
publishes a "Hello" message from a test set up. All containers listen on
this setup and report their results to a results folder. In this
repository. You will see the output of rostopic echo /test_topic from
each container in the results folder.

Signed-off-by: Arjo Chakravarty arjo@openrobotics.org

arjo129 and others added 6 commits January 19, 2023 06:13
> ⚠️ This is experimental code and not likely to be stable for
some time.

This repo provides a simple networking test bed using
[docker](https://www.docker.com/)
and [docker-compose](https://docs.docker.com/compose/). You will need to
have both of these tools set up.
Additionally it assumes a checkout from the "discovery_modes_full.repos"

One can test various scenarios use cases using the script and the
`docker-compose.yml`. To get started simply run:
```
./test_scenario.bash <path to your ros2 checkout>
```
This will build a docker image and run a test scenario where a container
publishes a "Hello" message from a test set up. All containers listen on
this setup and report their results to a `results` folder. In this
repository. You will see the output of `rostopic echo /test_topic` from
each container in the results folder.

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
This commit adds a bunch of scripts to inch towards some sort of test
matrix like the one on ROS discourse.

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
@mxgrey
Copy link
Member

mxgrey commented Jan 30, 2023

This is looking extremely promising.

One thing to note is that we've been advised to test scenarios where the two endpoints have different settings. E.g. one endpoint's environment is restricted to local discovery while another endpoint's environment is set to global discovery. We've been advised that mixing the settings could result in unintended behaviors because of bugs in how the settings are handled and/or because of unintuitive behaviors in how multicast packets are handled by the kernel.

If I'm understanding the current scripts here correctly, this is only testing cases where both endpoints have the same environment settings. We could probably just do a nested for-loop to get all the combinations. And instead of setting RES_DIR in the .env files we would set it as $outer_scenario_name/$inner_scenario_name/. Then we can have an expected_results/ directory which we can recursively diff against the produced results/ directory to determine if the tests passed.

@arjo129
Copy link
Member Author

arjo129 commented Jan 30, 2023 via email

This commit makes a few major changes.
* Adds a full test matrix to the `test_scenario` tool.
* Speeds up iteration by relying on workspace to be prebuilt and mounted
  into the container. This makes iteration on the source code a lot
faster.

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
This is very useful for identifying shortfalls and compliances when
iterating. For instance I found FastDDS to completely not be compatible
with the desired matrix.

Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
mxgrey and others added 3 commits February 7, 2023 01:23
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Cleanup scripts - support for samehost and choosing middleware
@arjo129 arjo129 merged commit 52d3888 into osrf:main Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants