Practice the ROS2 DDS Discovery - Participant Filtering coding problem in ROS2 Core. Browser-based execution with automated grading — no local ROS install required. 0% of engineers pass this challenge.
In ROS2, nodes discover each other automatically via DDS (Data Distribution Service). This discovery is scoped by the ROS_DOMAIN_ID — nodes in different domains are completely invisible to each other. This is how you isolate a robot fleet, a test environment, or a secure subsystem.
secure_nodedomain_id with a default value of 0ROS_DOMAIN_ID environment variable using os.environ.get("ROS_DOMAIN_ID", "0")"Operating in Domain ID: X" where X is the domain ID value"Participant filtering active: secure_node is isolated to this domain"Output (console logs on startup):
[secure_node]: Operating in Domain ID: 42
[secure_node]: Participant filtering active: secure_node is isolated to this domain
Robot A (DOMAIN_ID=0) ←—cannot see—→ Robot B (DOMAIN_ID=1)
Robot A (DOMAIN_ID=0) ←—can see——→ Robot C (DOMAIN_ID=0)
Setting different domain IDs is the simplest way to run multiple independent ROS2 systems on the same network without interference.
os.environ.get("ROS_DOMAIN_ID", "0") returns a string — don't forget int() if you need to compare numericallyimport os at the top of your fileIt is a hands-on ROS2 Core challenge on SimuCode where you implement and run ROS2 code in the browser with runtime-verified tests.
Open this page, sign in, and solve the problem in the built-in IDE. Your solution is graded against real ROS2 execution checks.
This Hard problem focuses on ROS2 Core skills used in robotics interviews and production systems.