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