====== Brmbot Outdoor ====== {{template>:project:infobox| name=Brmbot Outdoor| image=brmbot-chassis-web.jpg?200| founder=[[user:tutchek]]| interested=[[user:pasky]]\\ [[user:czestmyr]]\\ [[user:joe]]\\ [[user:TMA]]\\ [[user:Archimedes]]\\ [[user:axtheb]] |status=finished}} ~~META: status = finished &relation firstimage = :project:brmbot-chassis-web.jpg ~~ The aim of the project is to build an autonomous outdoor robot platform, which can be used as a basis for the robot which can participate at the outdoor robots contests like Robotour. The project includes: * the hardware part (creating of the skeleton of the robot, which can hold the equipment) * electricity part (the motors, power supply, communication between components ...) * software part (the brain of the robot, localisation, odometry, ...). ===== Goals of the Project ===== We want to participate in the Robotour 2010 contest with the robot as a proof of concept. [Done] Continue development of the robot, be prepared for Robotem Rovně 2011 (implement missing features, improve stability, maneuvrability and mileage). Explore possibilities of Brmbot Outdoor in other contests, even indoor just like Eurobot ===== Status ===== We have well-working chassis with control software, currently developing pathfinding software. ** We have reached place 11/16 at the [[event/robotour2010]] competition on Sep 18 in Bratislava. ** We lost big time in RoRo2011, as we had no working pathfinding. ===== Member subgoals/tasks ===== * [[user:tma|TMA]], [[user:Tutchek|]]: ideas fountain * [[user:joe|Joe]]: GPS, path calculation, main programmer * [[user:archimedes|Archimedes]]: webcam construction, calibration * [[user:axtheb|AxTheB]]: chassis, webcam pathfinding. ===== Chassis ===== ==== Chassis base ==== {{:project:brmbot-p1019204a-web.jpg?200 |}} Originally used chassis from Heng Long's KV-1 1:16 battletank, now widened to have approx. square groud-contact area. It has thank threads with approx. 30cm long ground contact area, and is driven by two crappy speed-400 sized motors, one nearly three times as strong as other. TODO: Get bigger, stronger, higher quality motors with comparable torque. ==== Controller ==== {{ :project:brmbot-p1019194a-web.jpg?200|}} Chassis is driven by arduino with custom motor driver (two full H-bridges). In addition to driving motors it takes care of emergency stop button (Big red button), optical system to measure number of driving wheel rotations on both sides (odometry), proximity sensors (currently IR sensors that give lots of false positives in sunlight). ~~CL~~ ===== Controller software ===== Arduino listens on USBserial console, sketch for former V1 driver is available at [[http://web.natur.cuni.cz/~ax/brm/brmdriver.pde.html]]. Current sketch uses [[/project/brmbot_outdoor/protocol|new protocol]]. Commands available in V1 driver (left side always goes first): S full stop. Response is OK, ON FIRE when big red button has been pressed or HALTED when we were standing due to obstacle anyway. O read odometry. Response is int,int which is number of odometer pulses, left side first. Negative when driving backwards. Fxxxx Limits next drive command to xxxx odometer pulses. 100 pulses is about 80 cm. Gxxxx Like Fxxxx, but doesnt stop when sensors say. Use with caution. D[FR][0..9][FR][0..9] Drive forward/rearward with speed 0..9 (0 is stop), left track first. For example DF9F9 will go full speed[1] forward, DF9R9 will make superspin[2] and DF0F0 is equvalent for S. Response is OK, ON FIRE when big red button has been pressed or HALTED when we are currently still due to obstacle. N Clear the big red button status. P Read proximity sensors. Returns int,int where values over 300 mean "we are very close to obstacle". W retun state of many internal values (pwm values, odometry, sensors, uptime and so on) R returns "ready" When driving straight, chassis will check its odometry and will try to compensate for uneven terrain resistance on tracks so DF9F9 isnt full speed on both tracks but full speed straight forward. Chassis will slow down when it detects nearly obstacle (around 20 cm). After it detects close obstacle it stops and reports "Proximity: int, int" to the console (when one of IR sensors reads value over 350). ===== Sensors ===== Mechanical sensors cannot be used, because contact with any obstacle is fatal. Selected sensor status (by September 7, 2010) * GPS - basic functionality * camera - (assembled) calibration * odometry - functional sensors * obstacle detection - done but there is lots of room for improvement. * Big Red Button - done. ===== Software and GPS ===== {{ :project:brmbot-ctrl.png?600|}} Get current version from: [[http://repo.joe.cz/brmbot]]. Requirements: * ruby1.8 * libgtk-ruby * librexml-ruby * gpsd and gpsd-compatible GPS receiver (if you want to use live GPS tracking) Features: * loads OSM data (stream parser - SAX API) * visualises loaded area with correct lat:lon aspect ratio (calculates local aspect ratio after loading map) * provides screen to map translation and vice versa * finds nearest way and segment and point on segment for given point using correct scale * determining optimal path between two points - nodes, distances, azimuths * uses real metric distances as edge cost * displaying detailed path plan * reasonable logging * reading GPS data from receiver * adjusting the path during movement Missing: * reading compass data * controlling robot movement * extensive logging ~~CL~~ ===== Camera ===== Camera part consists od Logitech Webcam C200 and kitchen ladle, which functions as panoramatic mirror, currently on heavy wooden frame. {{:project:brmcam_mk_i.jpg|}} Geometry calibration surface {{:project:brmcam_calib_place.jpg|}} One of geometry calibration images {{:project:brmcam_calib_example.jpg|}} Resulting calibration function (if the picture is transformed to 480*480 or the formula is transformed) r_pix=141*atan(1.19*r_map) Testing...needs to be tweaked (see below map 8.6x8.6m). {{:project:brm2_05.png|}} Version 1.0 - not perferct, but much better (area 4x4m): {{:project:brm2_05_cor1.png|}} Frames form the real robot configuration from the test ride (robot goes to the left): {{:project:brm_shot_51-1.png|}}{{:project:brm_shot_51-2.png|}}{{:project:brm_shot_51-3.png|}}{{:project:brm_shot_51-4.png|}}{{:project:brm_shot_51-5.png|}} A very naive image processing using this camera (mounted on a smaller robot) is described: http://log.or.cz/?p=133 ~~CL~~ ===== Image processing ===== We use simple pixel-difference based system, working in c1c2c3/o1o2 colorspace as in [[http://portal.acm.org/citation.cfm?id=1782951]] on part of untransformed image from webcam. Source is available at [[https://github.com/AxTheB/brmbotVision|GitHub]]. {{ :project:brmvision.jpg |}} ===== References ===== * Robotour 2010: http://robotika.cz/competitions/robotour/2010/cs * Czech robotics website: http://robotika.cz/ * Eurobot contest: http://eurobot.org/ * pohon pásového robota pomocí akuvrtaček [historka z praxe] 4 vrtačky (celkem 400W), 27 kg, 10 km/h * [[http://zpravy.idnes.cz/maturanti-z-litomysle-vyhrali-v-usa-s-robotem-z-merkuru-p2s-/studium.asp?c=A090519_074108_studium_pje|Maturanti z Litomyšle vyhráli v USA s robotem z merkuru]] * zapojení a deska ultrazvukového detektoru vzdálenosti http://pandatron.cz/?899&ultrazvukovy_detektor_priblizeni * Arduino compatible ultrasonic sensor http://www.makershed.com/ProductDetails.asp?ProductCode=MKPX5&Click=37845 * Celý tank 2400,-: http://www.modelyrc.cz/?p=productsMore&iProduct=20 * Celý tank 1990,-: http://www.modelyrc.cz/?p=productsMore&iProduct=10 * inspirace http://www.fs.cvut.cz/stretech/2009/pdf/1068.pdf * Český dodavatel komponent k robotice: http://shop.snailinstruments.com/ * ... ultrazvukové dálkoměry * ...... http://shop.snailinstruments.com/index.php?main_page=product_info&cPath=65_72&products_id=192 563,- * ...... http://shop.snailinstruments.com/index.php?main_page=product_info&cPath=65_72&products_id=193 616,- * ... IR dálkoměry * ...... http://shop.snailinstruments.com/index.php?main_page=product_info&cPath=65_72&products_id=184 370,- * ......... zapojení (http://hackaday.com/2009/01/05/parts-digital-proximity-sensor-sharp-gp2y0d02/ , http://hackaday.com/2009/02/24/parts-analog-distance-sensors-sharp-gp2d122y0a02/ ) * [[http://www.androlib.com/android.application.cz-brmlab-brmgps-jFxqx.aspx|brmGPS]] - android GPS sw