An action client in ROS is a node that sends a goal to an action server and can receive feedback and the final result asynchronously.
Click to reveal answer
beginner
How does feedback work in a ROS action client?
Feedback is sent periodically from the action server to the client to inform about the progress of the goal before the final result is ready.
Click to reveal answer
intermediate
Which ROS message type is used to receive feedback in an action client?
The feedback message type is defined in the action definition file and is received via a callback function in the action client.
Click to reveal answer
intermediate
What is the purpose of the feedback callback in a ROS action client?
The feedback callback processes feedback messages from the server, allowing the client to update its state or UI based on progress.
Click to reveal answer
advanced
Describe the typical flow of communication between an action client and server with feedback.
The client sends a goal to the server, the server processes it and sends periodic feedback messages, and finally sends a result when done. The client handles feedback and result asynchronously.
Click to reveal answer
What does a ROS action client do after sending a goal?
ASends another goal immediately
BBlocks until the goal is complete
CWaits for feedback and result asynchronously
DIgnores feedback messages
✗ Incorrect
The action client waits asynchronously for feedback and the final result from the server.
How is feedback received in a ROS action client?
AVia a feedback callback function
BBy polling the server continuously
CThrough a service call
DFeedback is not supported
✗ Incorrect
Feedback is received asynchronously through a callback function registered by the client.
Which of these is NOT part of the ROS action communication?
AGoal
BRequest-Response
CFeedback
DResult
✗ Incorrect
Request-Response is part of ROS services, not actions which use goal, feedback, and result.
What happens if the action server never sends feedback?
AThe client still waits for the final result
BThe client stops waiting immediately
CThe client sends a cancel request
DThe client crashes
✗ Incorrect
Feedback is optional; the client waits for the final result regardless of feedback.
In ROS, what is the main benefit of using feedback in an action client?
ATo restart the action server
BTo speed up the goal processing
CTo cancel the goal automatically
DTo track progress and update UI or logic
✗ Incorrect
Feedback allows the client to track progress and respond accordingly, such as updating a user interface.
Explain how a ROS action client uses feedback to monitor goal progress.
Think about how the client learns about the server's progress before the final result.
You got /4 concepts.
Describe the communication steps between a ROS action client and server including feedback.
Consider the timeline from sending a goal to receiving the final result.
You got /5 concepts.
Practice
(1/5)
1. What is the main purpose of an action client in ROS when using feedback?
easy
A. To directly control robot hardware without feedback
B. To send goals to an action server and receive progress updates
C. To replace service calls with simpler requests
D. To only receive the final result without intermediate updates
Solution
Step 1: Understand the role of an action client
An action client sends goals to an action server and can receive feedback during execution.
Step 2: Identify feedback purpose
Feedback callbacks provide real-time progress updates while the task runs.
Final Answer:
To send goals to an action server and receive progress updates -> Option B
Quick Check:
Action client = send goals + get feedback [OK]
Hint: Action clients send goals and get feedback updates [OK]
Common Mistakes:
Thinking action clients only get final results
Confusing action clients with service clients
Ignoring feedback callbacks
2. Which of the following is the correct way to create an action client with feedback in ROS Python?
easy
A. client = actionlib.SimpleActionClient('move', MoveAction, feedback_cb=feedback_cb)
B. client = actionlib.ActionClient('move', MoveAction, feedback_cb=feedback_cb)
C. client = actionlib.SimpleActionClient('move', MoveAction)
D. client = actionlib.ActionClient('move', MoveAction)
Solution
Step 1: Recall ROS Python action client syntax
The standard way is to use SimpleActionClient with server name and action type.
Step 2: Feedback callback is set separately
Feedback callbacks are registered when sending goals, not in constructor.
Final Answer:
client = actionlib.SimpleActionClient('move', MoveAction) -> Option C
Quick Check:
SimpleActionClient + feedback_cb separate [OK]
Hint: Feedback callback is passed when sending goal, not client creation [OK]
Common Mistakes:
Passing feedback_cb in constructor (wrong)
Using ActionClient instead of SimpleActionClient
Missing action type argument
3. Given this ROS Python snippet, what will be printed if the feedback callback receives progress=50?
A. wait_for_server() should be called before send_goal()
B. feedback_cb cannot be passed to send_goal()
C. TaskGoal() must be assigned to a variable before sending
D. SimpleActionClient requires a third argument for feedback
Solution
Step 1: Check action client usage order
wait_for_server() must be called before sending a goal to ensure server is ready.
Step 2: Identify error in code order
Here, send_goal() is called before wait_for_server(), which is incorrect.
Final Answer:
wait_for_server() should be called before send_goal() -> Option A
Quick Check:
wait_for_server() before send_goal() [OK]
Hint: Always wait for server before sending goal [OK]
Common Mistakes:
Calling send_goal before wait_for_server
Misunderstanding feedback_cb usage
Assuming feedback_cb is constructor argument
5. You want to implement an action client that sends multiple goals sequentially and prints feedback for each. Which approach correctly handles feedback for each goal without mixing updates?
hard
A. Ignore feedback and only wait for final results of each goal
B. Use a single global feedback callback for all goals without distinguishing them
C. Send all goals at once without waiting and use one feedback callback
D. Create a new feedback callback function for each goal that captures its goal ID
Solution
Step 1: Understand feedback handling for multiple goals
Each goal's feedback should be handled separately to avoid mixing progress updates.
Step 2: Use closures or separate callbacks
Creating a unique feedback callback per goal that captures its ID ensures correct feedback association.
Final Answer:
Create a new feedback callback function for each goal that captures its goal ID -> Option D
Quick Check:
Separate feedback callbacks per goal prevent mix-up [OK]
Hint: Use unique feedback callbacks per goal to track progress separately [OK]
Common Mistakes:
Using one callback for all goals causing mixed feedback
Sending all goals simultaneously without control
Ignoring feedback defeats purpose of action client
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.