An Epic Laser Battle

Similar documents
1 Overview Sequencer PS2 Control...26 C O N T E N T S INTRODUCTION...5 USER INTERFACE...6 CONNECTING...7 SIMULATOR...

TUTORIAL. Ve r s i on 1. 0

SSC32 SERVO SEQUENCER GUIDE

Color Tracking Robot

Studuino Block Programming Environment Guide

Scout. Quick Start Guide. WiFi Mobile Robot Development Platform with Multi-DOF Gripping Arms

Single-Axis Camera Stabilizer

Cognex Machine Vision & Mitsubishi Robot Interface/Setup Tutorial Nicholas Bozzelli & Quentin Kilgore Millersville University October 2017

1 CLASSPACK QUICK START

Turn any wall projection interactive with Integrated Arm

Artec Leo. A smart professional 3D scanner for a next-generation user experience

Installation / Set-up of Autoread Camera System to DS1000/DS1200 Inserters

Sense Autonomous 2_11. All rights reserved.

Final Report. EEL 5666 Intelligent Machines Design Laboratory

Artec Leo. A smart professional 3D scanner for a next-generation user experience

Artec Leo. A smart professional 3D scanner for a next-generation user experience

Super Assembling Arms

LEGO BB-8 Release: LEGO BB-8. Learn how to automate a LEGO BB-8for motion, light, and sound using Crazy Circuits. Written By: Joshua

Keyframing an IK Skeleton Maya 2012

USER GUIDE. Security Multi-Sensor

Artec Leo. A smart professional 3D scanner for a next-generation user experience

Artec Leo. A smart professional 3D scanner for a next-generation user experience

Sphero Lightning Lab Cheat Sheet

Instructions for D-55IRXT GameSpy Digital Camera

What is Data Storage?

BONE CONTROLLER ASSET VERSION 0.1 REV 1

Smart Security at Every Corner of Your Home

1. In-app Setup. 2. Physical Installation. 3. Features. 4. Troubleshooting

AUTONOMOUS CONTROL OF AN OMNI-DIRECTIONAL MOBILE ROBOT

WideQuick Remote WideQuick Designer

DRAG RACE Program Manual Firm Ver 2.14

Standalone combined PIR camera with RF transmitter

The Instant Collaborate kit

Getting Started with Crazy Talk 6

Ceilbot vision and mapping system

Petroleum giant in the Gulf pilot module for a RF-based PERIMETER INTRUDER TRACKING SYSTEM

Graph Matching. LabQuest App OBJECTIVES MATERIALS

AE483: Lab #1 Sensor Data Collection and Analysis

Wireless (WiFi g), Dual 5DOF Arm and 1DOF Grippers, Internet Remote Monitoring Robot. Scout 2

Input devices are hardware devices that allow data to be entered into a computer.

user guide AbiBird You will need The AbiBird Sensor and An iphone with ios 10+ OR A Smartphone with Android 5+

Artec Leo. A smart professional 3D scanner for a next-generation user experience

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education. Paper 1 May/June hours

1. Charging. 2. In-app Setup. 3. Physical Installation. 4. Features. 5. Troubleshooting

Smart Security at Every Corner of Your Home

Mobile Autonomous Robotic Sentry (MARS) with Facial Detection and Recognition

TABLE OF CONTENTS 1 INTRODUCTION Overview of Cameramanager go!... 4

Digital Camera Controller

Android Spybot. ECE Capstone Project

SPARTAN ROBOTICS FRC 971

BCSWomen Android programming (with AppInventor) Family fun day World record attempt

CS4758: Rovio Augmented Vision Mapping Project

Discover Robotics & Programming CURRICULUM SAMPLE

CONTROL4 INTEGRATION WITH THE SHADE STORE MOTORS CONTROL4 INTEGRATION OVERVIEW:

Fire Bird V Insect - Nex Robotics

Ctdigi.com. Instruction manual. Production by S & W Technology Labs

Contents Getting Started GV-LPR Application Controls Installation Guidelines

This is an inspection failure, not meeting the requirement of >10k Ohm between either PD battery post and chassis.

L ast month, we used Wi-Fi to control Megabot. One

LAB 1: INTRODUCTION TO DATA STUDIO AND ONE-DIMENSIONAL MOTION

EV3 Programming Workshop for FLL Coaches

for Watlow Controllers Quick Start Guide Version 5.0

How to Use Passive Infrared Sensor Cameras

Real-Life Augmentation of the Xbox Controller

Game Design Unity Workshop

What Is a Program? Pre-Quiz

PRIMAL VIDEO. Steps to Filming. with. iphone PRIMALVIDEO.COM

Autonomous Rubik's Cube Solver Using Image Processing

Create Turtles with Python

STANDALONE INTERFACES USB-DMX 512 & 1024 CHANNELS V.1.1

ios App User Manual Fill in the serial number (case insensitive), login (used to recover password), and choose a password.

CMB16D. 16 Channel DC Controller. User Manual May 25, 2008 V1.01 Copyright Light O Rama, Inc. 2007, 2008 CMB16D. Table of Contents


Mi Smartphone Gimbal Manual Please read the manual carefully before using the product.

(40-455) Student Launcher

OSMO MOBILE 2. User Manual. v

Product information. Hi-Tech Electronics Pte Ltd

Hardware and Software minimum specifications

Simi Reality Motion Systems release their new Simi Motion 2012 System 8.5!

Controlsoft Identity and Access Management Software Controlsoft Identity Access Management Software

PSE90 - Plasma Screen Electric Wall Mount

PSE90 - Plasma Screen Electric Wall Mount

SMART CLASSROOM TRAINING MANUAL

KINEMATICS FOR ANIMATION. Rémi Ronfard, Animation, M2R MOSIG

Week 5: Assignment: Animation

NookBox Installation Guide Camera IR Pet Detector. Installation Guide. NookBox Camera IR Pet Detector (P / E )

A Simple Introduction to Omni Roller Robots (3rd April 2015)

Blender Lesson Ceramic Bowl

User Guide CM2 MAX. Powerful Interactive Presentations Anywhere Anytime. Portable Interactive Whiteboard System

Tech Tips. BeeBots. WeDo

THE POSITION AND ORIENTATION MEASUREMENT OF GONDOLA USING A VISUAL CAMERA

OSMO MOBILE. User Manual V

AdeptSight Pick-and-Place Tutorial

Input/Output Management

Hidden Camera Surveillance

LUMS Mine Detector Project

FAQ. Thump Series. What models are featured in the Thump Series?

Tips on DVD Authoring and DVD Duplication M A X E L L P R O F E S S I O N A L M E D I A

Discover the new world of handheld digital microscopy

Topic 4 - Introduction to Metering on a DSLR

Transcription:

FLOWSTONE.qxd 2/14/2011 3:52 PM Page 20 by the staff of Robot An Epic Laser Battle BETWEEN ROBOTS Behind the Scenes! How we created vision-based programming using FlowStone Last month we introduced FlowStone, a new graphical programming language, in LERN. This issue we dig much deeper with a behind-the-scenes look into how the Lynxmotion BRAT biped and robot arm were programmed with FlowStone to make the featured video you can scan and watch now with your smartphone! We believe this new language from DSPRobotics showcases a new era in programming. Tom Atwood, editor-in-chief SEE THE VIDEO! Scan this code on your smartphone with a bar reader app or type in find.botmag.com/051106 THE CHALLENGE: A. Build a Biped Robot (The Intruder) that could follow a line on the ground using a simple webcam for its vision system. B. Then build a Robot Arm (The Guard) that would protect a given area using another webcam for motion detection and targeting to aim a hi-powered laser (Pen) to defeat the biped intruder. THE ROBOTS For our intruder we used a Biped BRAT from LynxMotion this is a great first step into robotics as it is relatively simple to program and it only has 6 degrees of freedom (DOF), or in layman's terms it has six servos to program. The interface is through a simple RS232 cable which we connected to a USB to RS232 convertor to connect to our laptop. In order to make our Brat wireless we also used a wireless USB Hub, this simply provides four USB ports remotely as if they were directly connected to the Laptop. For our guard robot we used a LynxMotion Robot Arm, similar to the BRAT in as far as it too uses a SC-32 THE GEAR FlowStone Professional V1.1.1 1 x LynxMotion Biped BRAT (The Intruder) 1 x LynxMotion Robot Arm (The Guard) 2 x Webcam (Vision system) 1 x Laser Pen (The Weapon) 1 x Sharp IR Sensor (The Target) 1 x Phidget Spatial 3/3/3 (For balancing the webcam platform) 1 x Phidget Relay Board (Laser Firing) 1 x Wireless USB Hub (BRAT - Coms) 2 x Laptops (The Brains - Intruder and Guard) 2 x USB to RS232 adapter servo board, so our programming has some common elements. The main difference with the arm is that it has a fixed base and our challenge was to move the hand of the robot to a specific point using Inverse Kinematics (IK) to fire the laser. SERVO CONTROL AND INTERFACING The servo control was done using a PC COM port connected to the LynxMotion SC-32 servo board. In FlowStone you gain access to this by using the COM port module, in this case we used a baud rate of 115200, 8 data bits and Com7, which can be seen below: 20 ROBOT MAGAZINE

FLOWSTONE.qxd 2/14/2011 3:52 PM Page 21

FLOWSTONE.qxd 2/14/2011 3:53 PM Page 22 AN EPIC LASER BATTLE The Com port module is set up to talk to the SC-32 The serial data to control the servos is in the following format: #0 P1482 #1 P1514 #2 P1412 #16 P1449 #17 P1589 #18 P1783 T1000 <CR> Where: # = Servo Number P = Servo Position T = Time to reach position <CR> = Carriage Return or ASCI 13 BIPED MOVEMENT The Biped Movements were based on the biped examples available on the DSPRobotics site, the 'BRAT Trainer, and the 'BRAT Sequencer. These allow you to create sequences of movement for walking, turning left or right for example and then save each individual sequence to disk as a text file. These were then loaded into the sequencer to produce the desired range of movements a bit like a macro: Walk 1 pace, Left a bit, Right a bit etc. In FlowStone you have full access to the PC file system so you can easily save and load files. The hardest part was creating the movement sequences in the first place, a little trial an error was needed to make the biped walk! Here is an array of servo values loaded from a text file. BIPED CAMERA STABILIZATION When the biped walks it rocks side to side, which meant that sometimes the camera would loose sight of the line on the ground. We compensated for this by mounting the webcam on a movable bracket and then used a Phidget Spatial 3/3/3 gyro accelerometer board to detect the movement of the robot. You can see this on the video as the Phidget Spatial 3/3/3. robot rocks right the camera points left a little to compensate. However in the end we just captured the image when the robot was upright as this was the best image to calculate the line detection. ARM MOVEMENT Quite different from the biped the arm was far more sophisticated employing Inverse Kinematics (IK) to move the hand of the arm to a specific point in 3D space. Using the FlowStone IK module we were able to specify the lengths of each limb in the arm and the IK module did the rest. It calculated the correct angles to position the arm while keeping the hand level-since the gripper was gripping the webcam and we wanted to keep it level. So to move the arm we just needed to specify a single point and the arm would move to that position. So once the motion was detected we could wake up the arm and start scanning for targets. VISION SYSTEM The core of both applications was the use of standard webcams, one on the biped and one on the arm. The first task in both programs was to capture an image inside FlowStone, to do this we used the 'webcam' module. This is a standard module that enables access to any installed Windows Webcam device on your PC. The key to this module is the 'Grab' input which grabs an image from the webcam. We used a 'Tick25' module that generates a trigger signal 25 times a second and connected this to the grab input. The output is a bitmap which can be connected to a display module to test the operation of the webcams: The FlowStone Webcam Module connected to a Display Module COLOR DETECTION The color detection was required on both the red target tracking and also the line following for the biped. The way this works it that you specify a target colour range using HSV (hue, saturation, and value) values, fortunately there was also a color to HSV module, as these values can be hard to calculate. There is also a minimum target area input, so it only picks targets of a certain size. There is a visual output showing the live video image plus any detected color targets highlighted in an on screen box. For our program we used the X,Y co-ordinates out to make decisions on what to do next. MOTION DETECTION Motion detection was used to wake up the arm and initiate the target tracking. Setting the Threshold, Duration Here you can see the motion detected, highlighted in blue 22 ROBOT MAGAZINE

FLOWSTONE.qxd 2/14/2011 3:53 PM Page 23 and History you can fine tune how sensitive the detection is. You can even detect the motion direction if necessary so that you detect only objects moving in a certain directions! Once adequate motion is detected the motion output of the module goes from False to True. We used this output to turn on the red 'Motion Detected' LED. wiring them up. The trigger signal was sent through a pulse module to create a one second firing pulse. This signal was also sent to an LED on the application GUI to indicate the firing of the Laser. BIPED LINE FOLLOWING The line following for the biped was achieved using the color detect module to identify the path ahead and three simple biped movement sequences. Forward, Left a bit and Right a bit. Depending on the position of the line at the center balance point of the robot it would move accordingly. The clever thing was that even though the line was at an angle the color detection calculated the center point of the actual line and not the center of the box defining the shape. This can be seen in the image below, look at where the red dot is compared to the bounding box: The Laser mounted on the arm together with the webcam. HOW TO KILL THE BIPED Using the Sharp Infra Red sensor usually used for object detection, the analogue output from the sensor was connected to the analogue in on the LynxMotion SC-32 servo board. This voltage was then read inside FlowStone using the COM port and once over a set trigger level the command to kill all servos was given. This instantly removes the power from the servos so the robot falls to the ground. For a little more drama we delayed the kill signal a little so it was a slow death! See the tape on the floor and the color detection highlighting the path ahead. TARGET TRACKING The colour detection identified where the bipeds red target was in the robot arms' field of view. The next thing was to rotate the base of the arm to track the target so that it was in the centre so the laser could be fired. For this we used the color detect X position out (cx). This gives the center point of the detected color region. We employed a simple algorithm of if the color detection was left, move the arm left a little, or if it was right move the arm right a little. If it was central stop and initiate the laser firing. In reality this worked surprisingly well, however if you wanted to make a more complete solution you could use Flowstone s PID (Proportional,Integral, Derivative) module. This is a proper control system so the arm would move directly to the correct position for firing without any hunting around. FIRING THE LASER Once the arm had locked onto the biped using the colour detect the laser was fired. This was done using a Phidget 0/0/4 USB Relay board that simply closed a relay connected to the laser pens battery and thus firing the laser. All of the Phidgets devices are pre-programmed into FlowStone so it's just a case of drag and drop and Here you can see the bipeds target 'lit up' ready for laser firing! MAY/JUNE 2011 23

FLOWSTONE.qxd 2/14/2011 3:54 PM Page 24 AN EPIC LASER BATTLE. APPLICATION GUI One of the powerful features of FlowStone is the ability to make you own custom GUI (Graphical User Interface). To do this there are lots of premade buttons and switches, LEDs etc. all of which are total editable and customizable, plus all of the usual drawing tools for lines and shapes etc. This means that you can import you own graphics and make a totally unique look for The laser hits the IR sensor. you final application. For this project we made our own background graphic with shaded windows for the video images, plus a custom LED, and switch Tracking the target! Final custom GUI for the Arm Software. MAKING AN EXE One unique feature of FlowStone is that once you are happy with you program running in the development environment. With a single click you can make you very own stand alone EXE program file. Some other graphical languages say that they make a standalone programs but they still need their runtime application installed in order for them to run a bit like Flash. This is not the case with FlowStone as it really does make a stand alone EXE! The great thing about this is that because of this feature you can choose to distribute or even sell you applications! Simply make an EXE at the click of a mouse! CONCLUSION Putting everything together, once the biped was activated to attack in FlowStone, it would then follow the line of tape on the floor using the webcam as a guide, and also transmit the live video back to the base station (laptop) so that we had front row seats. Once the Robot arm had detected the biped movement it would wake up and start tracking for a red target. Locked and loaded it would then fire the laser repeatedly until the target was hit. Once IR sensor had detected a hit from the laser the biped would slowly die and fall to the ground. Secure! Now we have seen behind the scenes there is no doubt that FlowStone is a hugely powerful program allowing 1000's of application to be programmed quickly and efficiently. But make no mistake; even though FlowStone is a graphical programming environment, you still need to have some sort of programming background in order to get the most out of it. The main benefit is its scalability, and accessibility for all levels of programmer, you can start very simply and grow with the program. There is a FREE version of FlowStone available for Education which has all of the functions used in this project available to play with. The main limitation of FlowStone FREE is the project size and the inability to make EXE files. However there is a simple PAYG (pay as you go) system for low use users to make individual EXE file using the free version and chargeable Enterprise and Professional version to meet all levels. The possibilities of using FlowStone are endless and this is a complete and mature piece of software. We will certainly be using it again! FlowStone FREE : FOC FlowStone Enterprise: $296.00 US FlowStone Professional: $745.00 US Links DSPRobotics, www.dsprobotics.com Lynxmotion, www.lynxmotion.com, (866) 512-1024 Phidgets USA, www.phidgetsusa.com, (877) 898-1005 For more information, please see our source guide on page 89. 24 ROBOT MAGAZINE