45 #include <visp3/robot/vpVirtuose.h> 47 int main(
int argc,
char **argv)
49 #if defined(VISP_HAVE_VIRTUOSE) 50 std::string opt_ip =
"localhost";
52 for (
int i = 0; i < argc; i++) {
53 if (std::string(argv[i]) ==
"--ip")
54 opt_ip = std::string(argv[i + 1]);
55 else if (std::string(argv[i]) ==
"--port")
56 opt_port = std::atoi(argv[i + 1]);
57 else if (std::string(argv[i]) ==
"--help" || std::string(argv[i]) ==
"-h") {
58 std::cout <<
"\nUsage: " << argv[0]
59 <<
" [--ip <localhost>] [--port <port>]" 62 <<
"Description: " << std::endl
63 <<
" --ip <localhost>" << std::endl
64 <<
"\tHost IP address. Default value: \"localhost\"." << std::endl
66 <<
" --port <port>" << std::endl
67 <<
"\tCommunication port. Default value: 5000." << std::endl
68 <<
"\tSuggested values: " << std::endl
69 <<
"\t- 5000 to communicate with the Virtuose." << std::endl
70 <<
"\t- 53210 to communicate with the Virtuose equipped with the Glove." << std::endl
78 std::cout <<
"Try to connect to " << opt_ip <<
" port " << opt_port << std::endl;
84 std::cout <<
"The system is operational." << std::endl;
86 std::cout <<
"The current joint values are : " << q.
t() << std::endl;
88 std::cout <<
"The system is not operational. \nPlease plug the " 89 "emergency stop to the system (or untrigger it)." 97 std::cout <<
"You should install Virtuose SDK to use this binary..." << std::endl;
error that can be emited by ViSP classes.
bool getEmergencyStop() const
void setIpAddressAndPort(const std::string &ip, int port)
vpColVector getArticularPosition() const
Implementation of column vector and the associated operations.
const std::string & getStringMessage() const
Send a reference (constant) related the error message (can be empty).