Wprowadzenie do mobilnych robotów Adam Krechowicz 15 stycznia 2014 Adam Krechowicz Mobilne Roboty 15 stycznia 2014 1 / 54
Wst p Adept MobileRobots Adam Krechowicz Adept c Mobilne Roboty 15 stycznia 2014 2 / 54
Wst p Pioneer Pioneer Mobilne roboty wykorzystywane gªównie w pracach badawczych nap d koªowy sterowane przez wbudowany mikrokontroler wyposa»one w komputer pokªadowy poruszaj ce si samodzielnie Adam Krechowicz Mobilne Roboty 15 stycznia 2014 3 / 54
Wst p Pioneer 3dx Pioneer 3dx Konstrukcja trójkoªowa Zastosowanie w budynkach Wa»y 9 kg Pr dko± maksymalna 1.4 m/s Mo»e unie± 23 kg Adam Krechowicz Mobilne Roboty 15 stycznia 2014 4 / 54
Wst p Pioneer 3at Pioneer 3at Nap d na cztery koªa Stosowany na dowolnym terenie Wa»y 14 kg Pr dko±c maksymalna 0.7 m/s Mo»e unie± 12 kg Adam Krechowicz Mobilne Roboty 15 stycznia 2014 5 / 54
Wyposa»enie Wyposa»enie zderzaki sonary czujnik laserowy odbiornik gps chwytaki kamery»yroskopy Adam Krechowicz Mobilne Roboty 15 stycznia 2014 6 / 54
Wyposa»enie Komputer Komputer pokªadowy Pentium M 1.8GHz 2GB RAM Dysk 80GB Adam Krechowicz Mobilne Roboty 15 stycznia 2014 7 / 54
Wyposa»enie Komputer Komunikacja z robotem Robot Mikrokontroler RS232 Komputer pokªadowy WiFi Komputer steruj cy Adam Krechowicz Mobilne Roboty 15 stycznia 2014 8 / 54
Wyposa»enie Sonary Sonary Adam Krechowicz Mobilne Roboty 15 stycznia 2014 9 / 54
Wyposa»enie Sonary Sonar t2-t1 t Adam Krechowicz Mobilne Roboty 15 stycznia 2014 10 / 54
Wyposa»enie Chwytaki Chwytaki Adam Krechowicz Mobilne Roboty 15 stycznia 2014 11 / 54
Wyposa»enie Dalmierz laserowy Dalmierz laserowy Adam Krechowicz Mobilne Roboty 15 stycznia 2014 12 / 54
Wyposa»enie Dalmierz laserowy Dalmierz laserowy Odbiornik Nadajnik Adam Krechowicz Mobilne Roboty 15 stycznia 2014 13 / 54
Wyposa»enie Odbiornik GPS Odbiornik GPS Adam Krechowicz Mobilne Roboty 15 stycznia 2014 14 / 54
Wyposa»enie Kamery Kamery Adam Krechowicz Mobilne Roboty 15 stycznia 2014 15 / 54
Wyposa»enie Kamery Obraz z kamery Adam Krechowicz Mobilne Roboty 15 stycznia 2014 16 / 54
Wyposa»enie Kamery Obraz z kamery Adam Krechowicz Mobilne Roboty 15 stycznia 2014 17 / 54
Wyposa»enie Kamery Obraz z kamery Adam Krechowicz Mobilne Roboty 15 stycznia 2014 18 / 54
Wyposa»enie Kamery Obraz z kamery Adam Krechowicz Mobilne Roboty 15 stycznia 2014 19 / 54
Wyposa»enie Odometria Sterowanie dyferencyjne Adam Krechowicz Mobilne Roboty 15 stycznia 2014 20 / 54
Wyposa»enie Odometria Odometria Odbiornik Nadajnik t Adam Krechowicz Mobilne Roboty 15 stycznia 2014 21 / 54
Wyposa»enie Odometria Jazda po prostej Adam Krechowicz Mobilne Roboty 15 stycznia 2014 22 / 54
Wyposa»enie Odometria Sterownik PID K p e(t) + u(t) + e(t) K i t 0 e(τ)dτ + Nap d y(t) + K d de(t) dt Adam Krechowicz Mobilne Roboty 15 stycznia 2014 23 / 54
Oprogramowanie Oprogramowanie mobilnych robotów Robot jest serwerem Programy klienckie steruj robotem sterowanie r czne teleoperacja praca autonomiczna praca autonomiczna + zdalna kontrola Adam Krechowicz Mobilne Roboty 15 stycznia 2014 24 / 54
Oprogramowanie ARCOS ARCOS Advanced Robotics Control and Operations rmware robota steruje najwa»niejszymi funkcjami robota odometria PID reagowanie na zablokowania (Stall) komunikacja Adam Krechowicz Mobilne Roboty 15 stycznia 2014 25 / 54
Oprogramowanie Aria Aria Advanced Robot Interface for Applications wysokopoziomowe programowanie robota C++, Java, Python sterowanie odczytywanie danych z czujników budowanie skomplikowanych zachowa«adam Krechowicz Mobilne Roboty 15 stycznia 2014 26 / 54
Oprogramowanie MobileSim MobileSim Adam Krechowicz Mobilne Roboty 15 stycznia 2014 27 / 54
Oprogramowanie ArNetworking ArNetworking ARIA Server Client MobileEyes Adam Krechowicz Mobilne Roboty 15 stycznia 2014 28 / 54
Oprogramowanie MobileEyes MobileEyes Adam Krechowicz Mobilne Roboty 15 stycznia 2014 29 / 54
Oprogramowanie ARNL ARNL Advanced Robotics Navigation and Localization Planowanie tras Nawigacja robota Wykorzystuje mapy Wykorzystuje dalmierz laserowy lub sonary Adam Krechowicz Mobilne Roboty 15 stycznia 2014 30 / 54
Oprogramowanie Mapper3 Mapper3 Adam Krechowicz Mobilne Roboty 15 stycznia 2014 31 / 54
Programowanie Poª czenie Kody zródªowe / MobileRobots Advanced Robotics Interface for Applications (ARIA) Copyright (C) 2004, 2005 ActivMedia Robotics LLC Copyright (C) 2006, 2007, 2008, 2009 MobileRobots Inc. This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 1307 USA If you wish to redistribute ARIA under dierent terms, contact MobileRobots for information about a commercial version of ARIA at robots@mobilerobots.com or MobileRobots Inc, 10 Columbia Drive, Amherst, NH 03031; 800 639 9481 / Adam Krechowicz Mobilne Roboty 15 stycznia 2014 32 / 54
Programowanie Poª czenie Przykªadowy program poª czenie #include "Aria.h" int main(int argc, char argv){ Aria::init(); ArArgumentParser parser(&argc, argv); parser.loaddefaultarguments(); ArRobot robot; ArRobotConnector robotconnector(&parser, &robot); if (! robotconnector.connectrobot(&robot)){ ArLog::log(ArLog::Terse, "Error, could not connect to robot.\n"); robotconnector.logoptions(); Aria::exit(1); } robot.runasync(true); } Adam Krechowicz Mobilne Roboty 15 stycznia 2014 33 / 54
Programowanie Klasa robota Przykªadowy program klasa ArRobot robot.lock(); ArLog::log(ArLog::Normal, "simpleconnect: Pose=(%.2f,%.2f,%.2f), Trans. Vel=%.2f, Battery=%.2fV", robot.getx(), robot.gety(), robot.getth(), robot.getvel(), robot.getbatteryvoltage()); robot.unlock(); Adam Krechowicz Mobilne Roboty 15 stycznia 2014 34 / 54
Programowanie Klasa robota Przykªadowy program poruszanie robot.lock(); robot.enablemotors(); robot.setvel(250); robot.unlock(); ArUtil::sleep(5000); robot.lock(); robot.stop(); robot.unlock(); ArUtil::sleep(1000); robot.lock(); robot.setrotvel(10); robot.unlock(); Adam Krechowicz Mobilne Roboty 15 stycznia 2014 35 / 54
Programowanie Akcje Przykªadowy program akcje ArActionStallRecover recover; ArActionBumpers bumpers; ArActionAvoidFront avoidfrontnear("avoid Front Near", 225, 0); ArActionAvoidFront avoidfrontfar; ArActionConstantVelocity constantvelocity("constant Velocity", 400); robot.addaction(&recover, 100); robot.addaction(&bumpers, 75); robot.addaction(&avoidfrontnear, 50); robot.addaction(&avoidfrontfar, 49); robot.addaction(&constantvelocity, 25); Adam Krechowicz Mobilne Roboty 15 stycznia 2014 36 / 54
Programowanie Akcje Przykªadowy program wªasna akcja class ActionGo : public ArAction { public: ActionGo(); virtual ~ActionGo(void) {}; virtual ArActionDesired fire(aractiondesired currentdesired); virtual void setrobot(arrobot robot); protected: ArRangeDevice mysonar; ArActionDesired mydesired; }; Adam Krechowicz Mobilne Roboty 15 stycznia 2014 37 / 54
Programowanie Akcje Przykªadowy program wªasna akcja ActionGo::ActionGo() : ArAction("Go") { mysonar = NULL; } void ActionGo::setRobot(ArRobot robot) { ArAction::setRobot(robot); mysonar = robot >findrangedevice("sonar"); if (robot == NULL) { ArLog::log(ArLog::Terse, "actionexample: ActionGo: Warning: I found no sonar, deactivating."); deactivate(); } } Adam Krechowicz Mobilne Roboty 15 stycznia 2014 38 / 54
Programowanie Akcje Przykªadowy program wªasna akcja ArActionDesired ActionGo::fire(ArActionDesired currentdesired) { mydesired.reset(); mydesired.setvel(100); return &mydesired; } Adam Krechowicz Mobilne Roboty 15 stycznia 2014 39 / 54
Programowanie Chwytak Przykªadowy program chwytak ArRobot robot; ArGripper gripper(&robot); gripper >liftup(); gripper >liftdown(); gripper >gripclose(); gripper >gripopen(); Adam Krechowicz Mobilne Roboty 15 stycznia 2014 40 / 54
Programowanie Range Devices Przykªadowy program RangeDevices Aria Reference Adam Krechowicz Mobilne Roboty 15 stycznia 2014 41 / 54
Programowanie Kamera Przykªadowy program kamera /////////////////////////////////////////////////////////////////////////// // Copyright (c) 2005 Focus Robotics. All rights reserved. // // Created by : Jason Peck // // This program is free software ; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // /////////////////////////////////////////////////////////////////////////// Adam Krechowicz Mobilne Roboty 15 stycznia 2014 42 / 54
Programowanie Kamera Przykªadowy program kamera #include "cv.h" #include "highgui.h" #include "frcam.h" int main( int argc, char argv ) { FrChannel channel[2]; IplImage frame[2]; char wndname [2][50]; int i; for(i = 0; i < 2; i++) { channel[i] = fropenchannel(i); if (! channel[i]) { printf("demo: fropen failed for device%d\n",i); exit(1); } } Adam Krechowicz Mobilne Roboty 15 stycznia 2014 43 / 54
Programowanie Kamera Przykªadowy program kamera if (frsetchannelinput(channel[0], FR_CHAN_INPUT_TYPE_DISP)) { printf("demo: set INPUT_TYPE failed for device 0\n"); exit(1); } if (frsetchannelinput(channel[1], FR_CHAN_INPUT_TYPE_RT)) { printf("demo: set INPUT_TYPE failed for device 1\n"); exit(1); } sprintf(wndname[0], " Disparity"); sprintf(wndname[1], "Right Calib"); cvnamedwindow(wndname[0], CV_WINDOW_AUTOSIZE); cvmovewindow(wndname[0], 0, 0); cvnamedwindow(wndname[1], CV_WINDOW_AUTOSIZE); cvmovewindow(wndname[1], 0, 520); Adam Krechowicz Mobilne Roboty 15 stycznia 2014 44 / 54
Programowanie Kamera Przykªadowy program kamera for (i = 0; i < 2; i++) { if (frgrabframe(channel[i])) goto out; } for (;;) { for (i = 0; i < 2; i++) { frame[i] = frretrieveframe(channel[i]); if (NULL == frame) goto out; } cvshowimage(wndname[0], frame[0]); cvshowimage(wndname[1], frame[1]); for (i = 0; i < 2; i++) { if (frgrabframe(channel[i])) goto out; } if ( 1 == frcheckkeypress(stat, cvwaitkey(2))) break; } Adam Krechowicz Mobilne Roboty 15 stycznia 2014 45 / 54
Programowanie Kamera Przykªadowy program kamera out: frclosestatustool(stat); for (i = 0; i < 2; i++) { frclosechannel(channel[i]); } } Adam Krechowicz Mobilne Roboty 15 stycznia 2014 46 / 54
Dalsze informacje Mobile Robots Support Strona MobileRobots http://robots.mobilerobots.com Adam Krechowicz Mobilne Roboty 15 stycznia 2014 47 / 54
Dalsze informacje Serwer Cyklon Serwer Cyklon Adam Krechowicz Mobilne Roboty 15 stycznia 2014 48 / 54
Dalsze informacje Kinect Kinect Adam Krechowicz Mobilne Roboty 15 stycznia 2014 49 / 54
Dalsze informacje Kamery Kamery Adam Krechowicz Mobilne Roboty 15 stycznia 2014 50 / 54
Dalsze informacje Kamery Kamery Adam Krechowicz Mobilne Roboty 15 stycznia 2014 51 / 54
Dalsze informacje ROS Robot Operating System http://www.ros.org Adam Krechowicz Mobilne Roboty 15 stycznia 2014 52 / 54
Dalsze informacje Gazebo Gazebo http://gazebosim.org/ Adam Krechowicz Mobilne Roboty 15 stycznia 2014 53 / 54
KONIEC