Practice the ROS2 Actions - Fibonacci with Feedback coding problem in Actions. Browser-based execution with automated grading — no local ROS install required. 48% of engineers pass this challenge.
Actions are for tasks that take time and need progress updates — navigating to a waypoint, running a calibration, executing a trajectory.
Unlike services (instant response), actions have 3 phases:
Client sends goal ──▶ Server accepts ──▶ Server sends feedback (N times) ──▶ Server sends result
Key API (server side):
from rclpy.action import ActionServer
self.action_server = ActionServer(self, ActionType, '/action_name', self.execute_callback)
def execute_callback(self, goal_handle):
# Send feedback during execution
goal_handle.publish_feedback(feedback_msg)
# Mark as succeeded and return result
goal_handle.succeed()
return result
When to use: Anything that takes more than ~100ms and benefits from progress reporting.
Actions are for long-running tasks that provide feedback and can be cancelled. Implement an Action Server that computes the Fibonacci sequence.
Fibonacci action (custom or example)fibonacciorder (from goal)Input:
order=5Output:
[0, 1], [0, 1, 1], ...[0, 1, 1, 2, 3, 5]async or use threads.succeed.It is a hands-on Actions 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 actions, feedback, server skills used in robotics interviews and production systems.