10 #include <spdlog/spdlog.h>
16 using namespace flexiv;
22 std::cout <<
"Required arguments: [robot_sn]" << std::endl;
23 std::cout <<
" robot_sn: Serial number of the robot to connect. Remove any space, e.g. Rizon4s-123456" << std::endl;
24 std::cout <<
"Optional arguments: None" << std::endl;
25 std::cout << std::endl;
29 int main(
int argc,
char* argv[])
34 if (argc < 2 || rdk::utility::ProgramArgsExistAny(argc, argv, {
"-h",
"--help"})) {
39 std::string robot_sn = argv[1];
43 ">>> Tutorial description <<<\nThis tutorial clears minor or critical faults, if any, of "
44 "the connected robot.\n");
56 spdlog::warn(
"Fault occurred on the connected robot, trying to clear ...");
58 if (!robot.ClearFault()) {
59 spdlog::error(
"Fault cannot be cleared, exiting ...");
62 spdlog::info(
"Fault on the connected robot is cleared");
64 spdlog::info(
"No fault on the connected robot");
66 }
catch (
const std::exception& e) {
67 spdlog::error(e.what());
Main interface with the robot, containing several function categories and background services.