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

#include <rby1-sdk/robot.h>

Declaration

Namespace

rb

Kind

class template

Primary role

Track one submitted command until completion and expose its feedback.

Public Member Functions

Method

Purpose

Notes

Get() and GetStatus()

Retrieve the final feedback object or the current command status.

Use GetStatus() while polling.

Wait() and WaitFor(...)

Block until the command finishes.

WaitFor(...) is the timed variant.

IsDone() and Cancel()

Check for completion or cancel an in-flight command.

Cancellation affects the underlying execution request.

Numeric Parameters & Returns

Method

Unit / encoding

Notes

WaitFor(timeout_ms)

ms

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:

TRobot 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.cpp uses the one-shot command path.

  • stop_command.cpp is a compact example of submitting one command and waiting for it to finish.