Practice the ROS2 Graph Introspection - Node/Topic Snapshot coding problem in ROS2 Core. Browser-based execution with automated grading — no local ROS install required. 0% of engineers pass this challenge.
Implement a graph inspector node that periodically queries the ROS2 graph and logs a structured snapshot.
Your node must:
create_timer(3.0, ...) to take a graph snapshot every 3 secondsself.get_node_names() — returns list of node namesself.get_topic_names_and_types() — returns list of (topic_name, [type_strings])self.get_service_names_and_types() — returns list of (service_name, [type_strings])f"Graph: {n_nodes} nodes, {n_topics} topics, {n_services} services"std_msgs/String on /graph_snapshot containing:{ "nodes": [...], "topics": [...], "services": [...] }
Output: std_msgs/String on /graph_snapshot every 3 seconds
Health monitoring systems use graph introspection to detect when critical nodes crash and need to be restarted. Integration tests use it to assert that all expected topics are present before running a scenario. ROS2's component container and lifecycle manager use it to coordinate node startup order.
get_node_names() returns just names. get_node_names_and_namespaces() returns tuples — don't confuse them.It 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 Medium problem focuses on ROS2 Core skills used in robotics interviews and production systems.