Trossen Distance Sensor  Top Banner
Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Sentient Turret

  1. #1

    Sentient Turret

    Hi all this is my first project that I have done with equipment from Trossen Robotics. Basically how it all started is I live in South Africa probably one of the worst countries in the world right now when it comes to crime! One of my friends is a distributer of PepperBall self-defense systems. So he said he wanted to build some sort of automated gun. And well so I said I would have a look and then I found Trossen online and it all started.

    The idea was for a gun turret that could operate in two modes one manual where you would move your mouse over the video feed and click to shoot. So the gun would get its target coordinates from your cursor. And the other to track the object it self and if the object either went into a restricted area or got too close it will shoot.

    So I got some servos and the Phidgets 4 x servo controller board, bend and twisted some aluminum developed some software all in C# and there you go an automated gun turret!

    I will update this soon with more pictures and some video of it actually working.



    Here is a very quick video of it in a bit of action:
    http://www.youtube.com/watch?v=gaAHz8ajtKs


    This is a quick test to calibrate the firing servo there is no ammunition in the gun and the cylinder was used and was empty by shot two. But it worked so that part is okay. But I will update the fire mechanism with a solenoid soon.



    Hope you guys will like it. Gerhard
    Last edited by ekoos7; 12-06-2007 at 12:33 PM. Reason: Add video

  2. Re: Sentient Turret

    Did you use code that you wrote to handle the video or is that just another application? If it's some other app, how did you get the coordinates of the mouse for that window?

    Cool project!

  3. #3

    Re: Sentient Turret (To - fish123456)

    Quote Originally Posted by fish123456 View Post
    Did you use code that you wrote to...
    No I developed all the code myself. The turret has two modes manual and automatic. The video below is of the manual control I will update the video soon with a better example and maybe enlarge the cursor to give a better view. I will also get a video up of it in auto mode where it will track moving objects and shoot under certain conditions. The manual mode works quite simple to calculate the coordinates but the object tracker has quite a bit more math.

    Calibration: First the turret has to be calibrated via a lazer pointer placed inside the mussel of the gun. The calibration application lets you move the turret up and down and left and right. The turret must also be level to get the best result for accuracy. You then have to place the lazer center top, bottom, left and right and each time select position then the coordinates will be saved in an Xml file. Thus your video camera and turret are then linked in their current respected positions. You will note on the video that is placed on the back camera bracket. So if the camera is fastened the turret can be moved and the calibration will stay valid. Also the width and height of the video must stay the same for the calibration to say valid.

    Manual mode: The calibration file can then be imported into the manual turret control application (Obviously later all of this will be integrated into a single application). So now when the relative cursor position to the video is retrieved the coordinates for each servo can be calculated and send to the servo control. And then the gun targets the actual target in real time.

    If you did have a video feed that for some reason could only be accessed via some type of proprietary software. It would be quite possible to still use the turret with the video feed as one could use a global mouse hook and plot the position of the video window onscreen and use similar calculations to control the turret.

    Thanks
    Last edited by ekoos7; 12-06-2007 at 10:04 AM. Reason: Edit Quote

  4. Trossen Distance Sensor  Thread Banner
  5. #4

    Re: Sentient Turret

    I rated this post 'good', although I have my doubts about using technology for the suppresion of fellow primates. Yes, an excellent development of resources to solve a problem, but since meat-based analog devices (MBADs) already possess the skill to track and aim, and underemployment of said MBADs is also a problem, enabling a bot to take over disciplinary duties might just add to the problem of crime. The possibility of exchanging the pepper-balls with something more sinister is troubling.
    I know, the genie is out of the bottle anyway. But I will not equip Otto the Robot with anything other than intelligence-gathering devices. That is more than enough to get him into trouble as it is.
    That said, you did a really ingenious job with simple off-the-shelf components and raw materials. As a proof-of-concept, it is a tour de force. The flexibility of manual and auto modes makes this truly innovative and open ended. I just wish it would hurl insults instead.
    And that those insults would hurt.
    And they would be enough.

  6. #5

    Re: Sentient Turret

    Quote Originally Posted by kdwyer View Post
    I rated this post 'good', although I have....

    Thanks for the post Kdwyer much appreciated and I do understand your dilemma in having the intellect to perceive the consequence that such a development might bring to any society. But I must stress that I do live in Africa and by that many rules in European societies no longer are valid as the majority do not necessary perceive reality in the same manner as say your average European. I am myself of European decent but I am South African by more than ten generations. Hence myself and my parents and theirs and so on all are literally made of Africa’s minerals and water. So by this alone I am as African as any other African.

    So first you will note that this is a PepperBall gun and not lethal to most living things larger than rats. I did once shot a rat in the house with my PepperBall gun and it was a bit messy. I could post the image but it might upset sensitive viewers. And well the goal is not to replace any one outside of your house patrolling you lawn with a PepperBall gun. But more to give you that functionality to deter some individual or leopard from trying to enter your property unlawfully without casing serious injury to the intruder. Secondly the system does actually give a verbal warning before action is taken. And perhaps that would disencourage most, even leopards.
    Last edited by ekoos7; 12-06-2007 at 10:08 AM. Reason: Edit Quote

  7. #6
    Join Date
    Sep 2006
    Location
    Carol Stream, Illinois
    Posts
    1,695
    Images
    118
    Rep Power
    90

    Re: Sentient Turret

    Hey fish,

    I wasn't too sure if this was what you were asking, but:

    In C#, any event that passes the MouseEventArgs object, has the X and Y Properties.

    For example (if you already know what I'm talking about, feel free to skip over this), if you create a new C# Form Application, select the form that was just created, and click on the lightening bolt in the Properties Grid on the right, you'll see MouseClick, MouseDoubleClick, MouseDown, MouseMove & MouseUp. If you double click on any of these, Visual Studio will automatically create the event handler for you and take you to the code editor. In the code editor, you'll see that each one of these handlers have the MouseEventArgs object as the second parameter passed. Go into any of these handlers and type "e" (no quotes) and you'll see that each one has the Property X and Y, which will give you the coordinates of your mouse on the form

    �In the long history of humankind (and animal kind, too) those who learned to collaborate and improvise most effectively have prevailed�
    - Charles Darwin

  8. Re: Sentient Turret

    Quote Originally Posted by Alex View Post
    Hey fish,

    I wasn't too sure if this was what you were asking, but:

    In C#, any event that passes the MouseEventArgs object, has the X and Y Properties.

    For example (if you already know what I'm talking about, feel free to skip over this), if you create a new C# Form Application, select the form that was just created, and click on the lightening bolt in the Properties Grid on the right, you'll see MouseClick, MouseDoubleClick, MouseDown, MouseMove & MouseUp. If you double click on any of these, Visual Studio will automatically create the event handler for you and take you to the code editor. In the code editor, you'll see that each one of these handlers have the MouseEventArgs object as the second parameter passed. Go into any of these handlers and type "e" (no quotes) and you'll see that each one has the Property X and Y, which will give you the coordinates of your mouse on the form
    Hi Alex. Yes, I'm aware of the MouseEventArgs and pointer handling in C#. I was more concerned with whether the application being used was an external application, like, say, a web cam application from Logitech. In that case, I was trying to understand whether or not he required a full screen window, because then the mouse coordinates would be equal to the window coordinates, thus simplifying the application, but decreasing its utility. It appears, from his response, that he understands how to hook into Windows DLLs to extract the global mouse coordinates, and one could simply use the location of the window to translate that into local coordinates.

  9. #8
    Join Date
    Sep 2006
    Location
    Carol Stream, Illinois
    Posts
    1,695
    Images
    118
    Rep Power
    90

    Re: Sentient Turret

    right on fish, just wanted to check.

    ekoos7, I hear ya. If there was a freakin leopard in my yard, I'd want this pepper gun to shoot at it too!! It wouldn't kill the animal, but I think it'd scare it enough to get off my damn lawn!

    We only have to worry about raccoons and possums getting in our garbage in the states

    �In the long history of humankind (and animal kind, too) those who learned to collaborate and improvise most effectively have prevailed�
    - Charles Darwin

  10. #9

    Re: Sentient Turret

    A quick vid showing the tracking software:


    Here are some images to explain a bit more:





    Last edited by ekoos7; 12-06-2007 at 02:29 PM. Reason: Edit vid

  11. Re: Sentient Turret

    That's a pretty neat piece of software. The video is a bit difficult to see, however. Maybe you could record your screen? Just a thought... I wrote some code in C many years ago that would do a histogram of a black and white image that averaged the "hotspots" (where the color was above a normalized value of 250) and drew a bounding box around the area. The idea was that the camera had no IR filter on it, so the IR emitter I was tracking always looked the brightest. Anyway, that was with an expensive Matrox framegrabber. Are you using a USB camera or a lipstick camera? How are you grabbing the video? Lastly, what sort of code are you using to display the video?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. wifi robot with fully auto paintball turret
    By seesoe in forum Robotics General Discussion
    Replies: 38
    Last Post: 06-02-2011, 12:34 AM
  2. New to robotics, and trying to build a turret
    By Marauduer_Pilot in forum Arbotix, Microcontrollers, Arduino
    Replies: 13
    Last Post: 05-10-2010, 05:54 PM
  3. Robotic Gun Turret
    By El Espada in forum Robotics General Discussion
    Replies: 3
    Last Post: 01-11-2008, 10:53 AM
  4. Contest Entry Entry 1: USB Gun Turret
    By Vaughn in forum Project Showcase
    Replies: 2
    Last Post: 08-27-2007, 10:34 PM
  5. Phidget controlled Gun Turret defends home
    By Vaughn in forum Arbotix, Microcontrollers, Arduino
    Replies: 1
    Last Post: 06-15-2007, 04:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •