Practice the ROS2 Rosbag2 Recording Automation Script coding problem in Tools. Browser-based execution with automated grading — no local ROS install required. 74% of engineers pass this challenge.
Implement a topic statistics monitor node that subscribes to /statistics_target (std_msgs/Float64) and computes running statistics, publishing a summary to /topic_stats (std_msgs/String) as a JSON string every 2 seconds.
Your node must:
/statistics_target (std_msgs/Float64)time.time())create_timer(2.0, ...)), compute and publish a JSON string containing:{
"count": <int>,
"mean": <float>,
"min": <float>,
"max": <float>,
"std_dev": <float>,
"rate_hz": <float>
}
count: total messages received since last reportmean: average valuemin / max: range of valuesstd_dev: population standard deviationrate_hz: average publish rate (messages / elapsed seconds)std_msgs/String on /topic_stats{"count": 0, "rate_hz": 0.0}Data quality validation is non-negotiable in production. Before deploying a SLAM update, engineers verify that sensor bags have correct publish rates, expected value ranges, and no dropped messages. This monitor pattern — subscribe, collect, report — is exactly what ROS2's ros2 topic hz and ros2 topic echo --filter do under the hood.
It is a hands-on Tools 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 rosbag2, automation, odom skills used in robotics interviews and production systems.