40 #include <visp3/robot/vpVirtuose.h>
42 int main(
int argc,
char **argv)
44 #ifdef ENABLE_VISP_NAMESPACE
47 #if defined(VISP_HAVE_VIRTUOSE)
48 std::string opt_ip =
"localhost";
50 for (
int i = 0; i < argc; i++) {
51 if (std::string(argv[i]) ==
"--ip")
52 opt_ip = std::string(argv[i + 1]);
53 else if (std::string(argv[i]) ==
"--port")
54 opt_port = std::atoi(argv[i + 1]);
55 else if (std::string(argv[i]) ==
"--help" || std::string(argv[i]) ==
"-h") {
56 std::cout <<
"\nUsage: " << argv[0]
57 <<
" [--ip <localhost>] [--port <port>]"
60 <<
"Description: " << std::endl
61 <<
" --ip <localhost>" << std::endl
62 <<
"\tHost IP address. Default value: \"localhost\"." << std::endl
64 <<
" --port <port>" << std::endl
65 <<
"\tCommunication port. Default value: 5000." << std::endl
66 <<
"\tSuggested values: " << std::endl
67 <<
"\t- 5000 to communicate with the Virtuose." << std::endl
68 <<
"\t- 53210 to communicate with the Virtuose equipped with the Glove." << std::endl
76 std::cout <<
"Try to connect to " << opt_ip <<
" port " << opt_port << std::endl;
82 std::cout <<
"The system is operational." << std::endl;
84 std::cout <<
"The current joint values are : " << q.
t() << std::endl;
87 std::cout <<
"The system is not operational. \nPlease plug the "
88 "emergency stop to the system (or untrigger it)."
98 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