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 = 1; i < argc; i++) {
51 if (std::string(argv[i]) ==
"--ip" && i + 1 < argc) {
52 opt_ip = std::string(argv[++i]);
54 else if (std::string(argv[i]) ==
"--port" && i + 1 < argc) {
55 opt_port = std::atoi(argv[++i]);
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;
89 std::cout <<
"The system is not operational. \nPlease plug the "
90 "emergency stop to the system (or untrigger it)."
100 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