RobotCommandHandler#
rb::RobotCommandHandler<T> is the one-shot command handle returned by
Robot::SendCommand(). It is the simplest way to wait for completion, cancel
the request, or retrieve the resulting feedback object.
Header
Header |
|
Declaration
Namespace |
|
Kind |
|
Primary role |
Track one submitted command until completion and expose its feedback. |
Public Member Functions
Method |
Purpose |
Notes |
|---|---|---|
|
Retrieve the final feedback object or the current command status. |
Use |
|
Block until the command finishes. |
|
|
Check for completion or cancel an in-flight command. |
Cancellation affects the underlying execution request. |
Numeric Parameters & Returns
Method |
Unit / encoding |
Notes |
|---|---|---|
|
|
Timeout used while waiting for one-shot command completion. |
Detailed Reference
-
template<typename T>
class RobotCommandHandler# Robot command handler.
Handles robot command execution and provides status monitoring.
- Template Parameters:
T – Robot model type
Public Functions
-
~RobotCommandHandler()#
-
void Cancel()#
Cancel the command execution.
-
RobotCommandFeedback Get()#
Wait for the command execution and get feedback.
Waits for command completion and returns detailed controller feedback including position errors, control status, and final execution results.
- Returns:
RobotCommandFeedback Final controller state and execution results.
-
bool GetStatus() const#
Get gRPC status.
- Returns:
bool Status information.
-
bool IsDone() const#
Check if the command execution is complete.
- Returns:
True if command is complete, false otherwise.
-
void Wait()#
Wait for the command execution to complete.
This method blocks until the command is done or cancelled.
-
bool WaitFor(int timeout_ms)#
Wait for the command execution with timeout.
- Parameters:
timeout_ms – Timeout [ms].
- Returns:
True if command completed, false if timeout.
Related Types
Examples
demo_motion.cppuses the one-shot command path.stop_command.cppis a compact example of submitting one command and waiting for it to finish.