Low-Level Motion Service Interfaces
Introduction
Low-Level Motion Service Interface: Primarily used for controlling the robot's underlying modules.
| Function | C++ | C# |
|---|---|---|
| Clear system errors | ✔ | ✔ |
| Get joint data | ✔ | |
| Get shutdown status | ✔ |
Clear system errors
C++ Interface
void ClearLatestHistory()
Description
Clears the current error.
Parameters
| Parameter Name | Type | Required/Default | Description |
|---|---|---|---|
| - | - | - | None. |
Return Value
| Type | Description |
|---|---|
void | No return value. |
Example
cpp
Lenovo::Daystar::SDK sdk;
if (!sdk.isConnected()) {
std::cerr << "Can not connect SDK server with default settings"
<< std::endl;
return 1;
} else {
std::cout << "Connected with default settings" << std::endl;
}
auto &sport = sdk.getSport();
sport.ClearLatestHistory();Notes
- Ensure the input joint selection mask is valid.
C# Interface
void ClearRobotError()
Description
Clears the robot's underlying errors.
Parameters
| Parameter Name | Type | Required/Default | Description |
|---|---|---|---|
| - | - | - | None. |
Return Value
| Type | Description |
|---|---|
void | No return value. |
Get Joint Data
C# Interface
Task<JointsActivePVQReply> GetJointsActivePVQ()
Description
Get sensor data (position, velocity, torque).
Parameters
| Parameter Name | Type | Required/Default | Description |
|---|---|---|---|
| - | - | - | None. |
Return Value
| Type | Description |
|---|---|
Task<JointsActivePVQReply> | Task returning JointsActivePVQReply containing sensor data (position, velocity, torque). |
Example
csharp
_robotSDKManager?.InitialRobot(RobotType.IS, this, this);
_robotSportClient = _robotSDKManager.CreateRobotSportClient();
JointsActivePVQReply reply = await _robotSportClient?.GetJointsActivePVQ();Get Joint Status
C# Interface
JointsStatusReply GetJointsStatus()
Description
Get joint status (e.g., temperature).
Parameters
| Parameter Name | Type | Required/Default | Description |
|---|---|---|---|
| - | - | - | None. |
Return Value
| Type | Description |
|---|---|
JointsStatusReply | Object containing joint status data (e.g., temperature). |
Example
csharp
_robotSDKManager?.InitialRobot(RobotType.IS, this, this);
_robotSportClient = _robotSDKManager.CreateRobotSportClient();
JointsStatusReply reply = _robotSportClient?.GetJointsStatus();