42 #include <visp3/core/vpTime.h>
43 #include <visp3/gui/vpDisplayX.h>
44 #include <visp3/robot/vpRobotBebop2.h>
46 int main(
int argc,
char **argv)
48 #ifdef ENABLE_VISP_NAMESPACE
51 #ifdef VISP_HAVE_ARSDK
54 std::string ip_address =
"192.168.42.1";
57 for (
int i = 1; i < argc; i++) {
58 if (std::string(argv[i]) ==
"--ip" && i + 1 < argc) {
59 ip_address = std::string(argv[i + 1]);
62 else if (std::string(argv[i]) ==
"--hd-resolution") {
65 else if (std::string(argv[i]) ==
"--verbose" || std::string(argv[i]) ==
"-v") {
68 else if (std::string(argv[i]) ==
"--help" || std::string(argv[i]) ==
"-h") {
69 std::cout <<
"\nUsage:\n"
70 <<
" " << argv[0] <<
" [--ip <drone ip>] [--hd-resolution] [--verbose] [-v]"
74 <<
" --ip <drone ip>\n"
75 <<
" IP address of the drone to which you want to connect (default : 192.168.42.1).\n\n"
76 <<
" --hd-resolution\n"
77 <<
" Enables HD 720p video instead of default 480p.\n\n"
79 <<
" Enables verbose (drone information messages are then displayed).\n\n"
81 <<
" Print help message.\n\n"
86 std::cout <<
"Error : unknown parameter " << argv[i] << std::endl
87 <<
"See " << argv[0] <<
" --help" << std::endl;
93 verbose,
true, ip_address);
95 if (drone.isRunning()) {
97 drone.setVideoResolution(stream_res);
99 drone.startStreaming();
102 drone.getRGBaImage(I);
106 #elif defined(VISP_HAVE_GDI)
108 #elif defined(HAVE_OPENCV_HIGHGUI)
111 std::cout <<
"No image viewer is available..." << std::endl;
122 double delta_t = 0.040;
126 drone.setVelocity(vel, 1);
128 drone.getRGBaImage(I);
139 std::cout <<
"Error : failed to setup drone control" << std::endl;
142 std::cout <<
"-- End of test --" << std::endl;
145 std::cout <<
"Caught an exception: " << e << std::endl;
150 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...
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()