10 #include <spdlog/spdlog.h>
15 using namespace flexiv;
21 std::cout <<
"Required arguments: [robot_sn] [test_cycles]" << std::endl;
22 std::cout <<
" robot_sn: Serial number of the robot to connect. Remove any space, e.g. Rizon4s-123456" << std::endl;
23 std::cout <<
" test_cycles: Number of cycles to repeat the instantiation" << 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 < 3 || rdk::utility::ProgramArgsExistAny(argc, argv, {
"-h",
"--help"})) {
39 std::string robot_sn = argv[1];
42 unsigned int test_cycles = std::stoi(argv[2]);
45 for (
size_t i = 1; i <= test_cycles; i++) {
46 spdlog::info(
"Test cycle: {}/{}", i, test_cycles);
52 spdlog::info(
"Enabling robot ...");
56 while (!robot.operational()) {
57 std::this_thread::sleep_for(std::chrono::seconds(1));
59 spdlog::info(
"Robot is now operational");
62 }
catch (
const std::exception& e) {
63 spdlog::error(e.what());
Main interface to control the robot, containing several function categories and background services.