11 #include <spdlog/spdlog.h>
17 using namespace flexiv;
23 std::cout <<
"Required arguments: [robot_sn]" << std::endl;
24 std::cout <<
" robot_sn: Serial number of the robot to connect. Remove any space, e.g. Rizon4s-123456" << std::endl;
25 std::cout <<
"Optional arguments: None" << std::endl;
26 std::cout << std::endl;
30 int main(
int argc,
char* argv[])
35 if (argc < 2 || rdk::utility::ProgramArgsExistAny(argc, argv, {
"-h",
"--help"})) {
40 std::string robot_sn = argv[1];
44 ">>> Tutorial description <<<\nThis tutorial runs an automatic recovery process if the "
45 "robot's safety system is in recovery state. See rdk::Robot::recovery() and RDK "
46 "manual for more details.\n");
55 spdlog::info(
"Enabling robot ...");
62 std::this_thread::sleep_for(std::chrono::seconds(8));
66 if (robot.recovery()) {
67 robot.RunAutoRecovery();
71 spdlog::info(
"Robot system is not in recovery state, nothing to be done, exiting ...");
73 }
catch (
const std::exception& e) {
74 spdlog::error(e.what());
Main interface with the robot, containing several function categories and background services.