Choose services, actions, and behavior states
Choose the right interface for a stream, a quick request, or a cancelable task.
Opening the Python editor…
Requirements and learning goals
Before you start
- The learn-go2 simulator from lesson 1
- Familiarity with ROS 2 topics
You will be able to
- Choose the right interface for a stream, a quick request, or a cancelable task.
The browser exercise above works without extra setup. The project brief below assumes the listed prerequisites and gives you a task and checks to perform. Need a guided first project?
Streams, requests, and goals
A continuously distributes messages, such as camera frames. A service answers a request, such as reading a setting. An action represents a longer task, such as navigating to a location, with progress and cancellation.
Choosing the right interface saves you from inventing a separate progress and stop protocol. A navigation goal being accepted means the server will attempt it, not that the robot has arrived.
Existing service and action servers work through their normal interfaces. These remote commands do not require replacing servers with a platform-specific API.
Try cancellation in the navigation simulator exercise, then confirm the observed motion stopped rather than trusting the request acknowledgment.
Read a setting through a service
Keep the shared Go2 simulator running. List its services and . Choose learn-go2 in the Simulator tab whenever the device picker opens.
wendy device ros2 services
wendy device ros2 nodesFind a listed /NODE/get_parameters service. Substitute its actual path below. Standard parameter services use this type:
wendy device ros2 call /NODE/get_parameters rcl_interfaces/srv/GetParameters '{names: [use_sim_time]}'Expect a parameter value in the response. An unset value means that node has not declared that parameter. use_sim_time selects the ROS simulation clock. Keep it false on this Go2 runtime, which timestamps observations using its wall clock.
Inspect a longer task
wendy device ros2 action listAn empty list is expected when only the stock Go2 runtime is running. You have completed this check; do not try sending /navigate_to_pose to this VM. The navigation lesson installs a separate simulator for sending and canceling goals. The distinction matters: a robot publishing sensor topics does not necessarily provide a navigation action.
Make the outcome visible
Represent your app's task as idle, executing, succeeded, failed, or canceled. Show which state it reached. Decide whether a second request is rejected, queued, or replaces the first.
A behavior tree organizes tasks and recovery branches. Each task still needs a clear completion and cancellation rule. For a hackathon, a small explicit state machine is often enough.
Before you move on
Can you do each of these?
- Choose the right interface for a stream, a quick request, or a cancelable task.
0 of 2 checkpoints solved. Try checkpoint 1