Airbot SDK 5.1.6
This project is designed for airbot C++SDK
Loading...
Searching...
No Matches
switch_mode.cpp

This example demonstrates how to configure the speed profile and switch robot modes.

This example demonstrates how to configure the speed profile and switch robot modes.Before sending any motion commands, you must switch the robot to the appropriate control mode. By default, the robotic arm starts in RobotMode::PLANNING_POS. To use other control modes, such as servo control, you must explicitly switch to them.

This example shows how to:

Example usage:

#include "airbot_sdk.hpp"
using namespace airbot;
int main() {
auto sdk = std::make_shared<AirbotSdk>("192.168.0.xxx", 50051);
// Set predefined speed profile
sdk->SetSpeedProfile(SpeedProfile::DEFAULT);
// Switch control mode to SERVO_JOINT_POS
sdk->SwitchMode({RobotMode::SERVO_JOINT_POS});
// Alternatively, specify target group name explicitly
sdk->SwitchMode({"arm"}, {RobotMode::SERVO_JOINT_POS});
return 0;
}
Main SDK interface for controlling Airbot robotic arm.
Namespace containing all Airbot SDK related definitions.