47 #include <visp3/core/vpTime.h>
48 #include <visp3/gui/vpDisplayX.h>
49 #include <visp3/robot/vpRobotBebop2.h>
51 int main(
int argc,
char **argv)
53 #ifdef VISP_HAVE_ARSDK
56 std::string ip_address =
"192.168.42.1";
59 for (
int i = 1; i < argc; i++) {
60 if (std::string(argv[i]) ==
"--ip" && i + 1 < argc) {
61 ip_address = std::string(argv[i + 1]);
63 }
else if (std::string(argv[i]) ==
"--hd-resolution") {
65 }
else if (std::string(argv[i]) ==
"--verbose" || std::string(argv[i]) ==
"-v") {
67 }
else if (std::string(argv[i]) ==
"--help" || std::string(argv[i]) ==
"-h") {
68 std::cout <<
"\nUsage:\n"
69 <<
" " << argv[0] <<
" [--ip <drone ip>] [--hd-resolution] [--verbose] [-v]"
73 <<
" --ip <drone ip>\n"
74 <<
" IP address of the drone to which you want to connect (default : 192.168.42.1).\n\n"
75 <<
" --hd-resolution\n"
76 <<
" Enables HD 720p video instead of default 480p.\n\n"
78 <<
" Enables verbose (drone information messages are then displayed).\n\n"
80 <<
" Print help message.\n\n"
84 std::cout <<
"Error : unknown parameter " << argv[i] << std::endl
85 <<
"See " << argv[0] <<
" --help" << std::endl;
91 verbose,
true, ip_address);
93 if (drone.isRunning()) {
95 drone.setVideoResolution(stream_res);
97 drone.startStreaming();
100 drone.getRGBaImage(I);
104 #elif defined(VISP_HAVE_GDI)
106 #elif defined(HAVE_OPENCV_HIGHGUI)
109 std::cout <<
"No image viewer is available..." << std::endl;
120 double delta_t = 0.040;
124 drone.setVelocity(vel, 1);
126 drone.getRGBaImage(I);
136 std::cout <<
"Error : failed to setup drone control" << std::endl;
139 std::cout <<
"-- End of test --" << std::endl;
141 std::cout <<
"Caught an exception: " << e << std::endl;
146 std::cout <<
"Install Parrot ARSDK, configure and build ViSP to use this example..." << std::endl;
Implementation of column vector and the associated operations.
Display for windows using GDI (available on any windows 32 platform).
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
static void display(const vpImage< unsigned char > &I)
static void flush(const vpImage< unsigned char > &I)
error that can be emitted by ViSP classes.
static double rad(double deg)
VISP_EXPORT int wait(double t0, double t)
VISP_EXPORT double measureTimeMs()