+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 20

Thread: Predator Drone Project

  1. #1
    Wire Noob Chrono101 is on a distinguished road Chrono101's Avatar
    Join Date
    Aug 2009
    Posts
    16

    Default Predator Drone Project

    Predator Drone Project
    A Product of ChronoShift Industries

    Background Information:

    The Predator Mk.II Drone is latest UAV from ChronoShift Industries. The Predator is the culmination of several years of research into Anti-Gravity Technology, Plasma Thrusters, Adaptable Hunter-Killer AI, and Advanced Modular Weapon Systems (AMWS).

    The Predator is an aerial-class attack drone. It can perform aerial attack, point defense, and hunter-seeker sweeps completely autonomously. Using the advanced Anti-Gravity Stabilization System, the drone can find and maintain any desired altitude easily and quickly. It can also maintain proper attitude and keep it self level at all times, ready to fire on a moment's notice. Once a proper attack altitude has been reached, the drone quickly aligns itself with its target and begins pursuit. It keeps a steady distance to the target, which varies depending on what weapons PODS (Portable Ordinance Delivery System) are used.

    Construction


    The overall design of the Drone involves several plates and an armoured Hull, with two stubs near the rear that house the PODS connections. It stays airborne thanks to 5 hoverballs and 3 GPS receivers. The GPS receivers, being in separate corners of the bot, help keep it level (since each hoverball group is controlled by its nearby GPS reciever). There are no fussy Rangers, nor is there any math involved in trying to calculate the height of a certain map.


    Six thrusters (2 on the sides and 1 in the front in back) help the drone position itself and chase targets. It can move all directions, turn, and strafe.

    The wing stubs will soon have ports for connecting the Weapons PODS to, which will use a standardized protocol, allowing for a myriad of weapons to be used.

    The entire drone will be controlled by a set of 6 E2 chips (the current prototype uses 3), with each chip dedicated to a certain function of the bot. This provides some redundancy and removes a single point of failure for the bot.


    Coding:

    The entire bot runs by itself, as in it generally receives no input from a human operator (although it can be over-ridden by a ground controller). On boot-up, the drone hovers about 25 feet from the ground, waiting for orders. Once you press a key to tell it to go into attack mode, the drone heads for its attack altitude, and once there chases down the target to destroy. Once the target is gone, the drone can either hover at-altitude, waiting for hostiles, or it can return to standby, waiting for orders from the operator.




    Predator Drone Field Test 1 Video
    Predator Drone: Field Test 1


    Eventually the drone will have advanced Threat Detection and Target Acquisition Features. It will be able to differentiate between friends and foes, and will be able to prioritize certain targetsover your average NPC.

    Here's the code I've got so far for the three E2 chips (Propulsion, Targeting, and Control), feel free to critique it. I'm sure I'm going to need to optimize it later.

    Control E2:
    Code:
    @name P-D Drone Control System (v.1)
    @inputs Keypad0 Keypad1 Keypad2 Keypad3
    @outputs State
    @persist 
    @trigger all
    
    timer("control", 10)
    
    if(clk("control")){
        #State0 is PowerOff
        if(Keypad0 == 1){
            Keypad1 = 0
            Keypad2 = 0
            Keypad3 = 0
            State = 0   
        }
        #State1 is Standby
        if(Keypad1 == 1){
            Keypad0 = 0
            Keypad2 = 0
            Keypad3 = 0
            State = 1   
        }
        #State2 is Hold
        if(Keypad2 == 1){
            Keypad0 = 0
            Keypad1 = 0
            Keypad3 = 0
            State = 2   
        }
        #State3 is Search and Destroy
        if(Keypad3 == 1){
            Keypad0 = 0
            Keypad1 = 0
            Keypad2 = 0
            State = 3   
        }
        
    }
    
    Targeting E2:
    Code:
    @name P-D Drone Targeting Subsystem (v.1)
    @inputs BS1Dist BS1Bear BS1Elev
    @outputs TargetDist TargetBear TargetElev
    @persist 
    @trigger all
    
    #This subsystem will eventually be able to intelligently identify targets
    #Right now it just passes the data along from the target finder and beacon sensor,
    #and simply outputs it to the propulsion subsystem for manuevering
    
    #Start
    timer("control",10)
    
    if(clk("control")){TargetDist=BS1Dist, TargetBear=BS1Bear, TargetElev=BS1Elev}
    
    Propulsion E2:
    Code:
    @name P-D Drone Propulsion Subsystem (v.3)
    @inputs GPSZRL GPSZRR GPSZF TargetDist TargetBear TargetElev State
    @outputs HovRL HovRR HovF HovMode FLThrust FRThrust RLThrust RRThrust RearThrust FrontThrust GroundDist 
    @persist 
    @trigger all
    
    # This is the propulsion subsystem for the Predator drone
    # It controls the drone's altitude and attitude (orientation)
    # It also aligns itself with and chases the target (passed from targeting subsystem)
    
    #Declare Constants, Start Timers
    timer("control",10)
    AltConst = 700 #Altitude Constant: this changes per map, currently set to gm_construct
    Fudge = 5 #Fudge Factor: this is our fudge number, it allows for some error in altitude/attitude
    EngageDist = 750 #Engagement Distance: this is how close we want the drone to get to its target
    ThrustMult = 10 #Thrust Multiplier: this is how much to multiply positional thrusters by
    #Start the control timer
    if(clk("control")){
        #PowerOff State
        if(State == 0){
            HovMode = 0
            FRThrust = 0
            FLThrust = 0
            RLThrust = 0
            RRThrust = 0 
            RearThrust = 0 
            FrontThrust = 0
        }
        #Standby State
        if(State == 1){
            AltConst = 25
            HovMode = 1
            #rear left Hoverballs
            if(GPSZRL < AltConst - Fudge){HovRL = 1}
            elseif(GPSZRL > AltConst + Fudge){HovRL = -1}
            else{HovRL = 0}
            #rear right Hoverballs
            if(GPSZRR < AltConst - Fudge){HovRR = 1}
            elseif(GPSZRR > AltConst + Fudge){HovRR = -1}
            else{HovRR = 0}
            #front Hoverballs
            if(GPSZF < AltConst - Fudge){HovF = 1}
            elseif(GPSZF > AltConst + Fudge){HovF = -1}
            else{HovF = 0}
        }
        #Hold State
        if(State == 2){
            AltConst = 750
            HovMode = 1
            #rear left Hoverballs
            if(GPSZRL < AltConst - Fudge){HovRL = 1}
            elseif(GPSZRL > AltConst + Fudge){HovRL = -1}
            else{HovRL = 0}
            #rear right Hoverballs
            if(GPSZRR < AltConst - Fudge){HovRR = 1}
            elseif(GPSZRR > AltConst + Fudge){HovRR = -1}
            else{HovRR = 0}
            #front Hoverballs
            if(GPSZF < AltConst - Fudge){HovF = 1}
            elseif(GPSZF > AltConst + Fudge){HovF = -1}
            else{HovF = 0}
        }
        #Search and Destroy State
        if(State == 3){
            HovMode = 1
            #begin altitude/attitude control
            #rear left Hoverballs
            if(GPSZRL < AltConst - Fudge){HovRL = 1}
            elseif(GPSZRL > AltConst + Fudge){HovRL = -1}
            else{HovRL = 0}
            #rear right Hoverballs
            if(GPSZRR < AltConst - Fudge){HovRR = 1}
            elseif(GPSZRR > AltConst + Fudge){HovRR = -1}
            else{HovRR = 0}
            #front Hoverballs
            if(GPSZF < AltConst - Fudge){HovF = 1}
            elseif(GPSZF > AltConst + Fudge){HovF = -1}
            else{HovF = 0}
            #begin target tracking & chasing
            #only begin once we reach altitude
            if(HovF == 0 & HovRL == 0 & HovRR == 0){
                #align drone with target
                # 0 to -180 is left side, 0 to 180 is right side
                if(TargetBear < 0 - Fudge){
                    FRThrust = ThrustMult
                    FLThrust = -ThrustMult
                    RLThrust = ThrustMult
                    RRThrust = -ThrustMult
                }
                elseif(TargetBear > 0 + Fudge){
                    FRThrust = -ThrustMult
                    FLThrust = ThrustMult
                    RLThrust = -ThrustMult
                    RRThrust = ThrustMult
                }
                #if we are lined up we don't want to move
                else{
                    FRThrust = 0
                    FLThrust = 0
                    RLThrust = 0
                    RRThrust = 0
                }
                #calculate ground distance to target, yea trigeometry!
                GroundDist = sin(TargetElev) * TargetDist
                if(GroundDist > EngageDist + 35 ){
                    RearThrust = ThrustMult 
                    FrontThrust = 0
                }
                elseif(GroundDist < EngageDist - 35 & GroundDist != 0){
                    FrontThrust = ThrustMult * (1/2)
                    RearThrust = 0
                }
                #if we are close enough we don't want to move
                else{
                RearThrust = 0  
                FrontThrust = 0
                    }
            
            }
            #if we are not at altitude we don't want to engage positional thrusters
            else{
                FRThrust = 0
                FLThrust = 0
                RLThrust = 0
                RRThrust = 0 
                RearThrust = 0 
                FrontThrust = 0
            }
        
        
        }
    }
    
    I'll be posting more as I progress on this project, and hopefully we will get to see some drone-on-drone combat soon.
    Last edited by Chrono101; 08-14-2009 at 12:26 PM.
    Drone design, production, and programming at ChronoShift Industries

    Predator Mk.II UAV -- The most advanced aerial combat drone to date.

    "The best weapon you have only fires neurons -- better keep it loaded!"

  2. #2
    Wirererer Paper Clip will become famous soon enough Paper Clip's Avatar
    Join Date
    Sep 2008
    Location
    Canada
    Posts
    142

    Default Re: Predator Drone Project

    I have no idea why this thread hasn't been commented on yet!

    The modern drones, especially the Predator with missiles are amazing. Really awesome project! I think the Predators are more like a plane than a hovercraft though, no?

    And you need to add two fireable missiles for the predator.

    I really like how you used the old-school thrusters

    Maybe add a control seat as well, as a real predator would have.

  3. #3
    Wire Sofaking Whodunnit will become famous soon enough Whodunnit's Avatar
    Join Date
    Jan 2008
    Location
    New Zealand, Ackl
    Posts
    482

    Default Re: Predator Drone Project

    im not a fan of hoverballs.
    ЗАГРУЗКА...................

  4. #4
    Wire Noob DolToX is on a distinguished road DolToX's Avatar
    Join Date
    Apr 2009
    Posts
    25

    Default Re: Predator Drone Project

    It looks more like a prototype than a real drone. And I do not talk about the appearance of the drone.
    You use the hover balls, without a drone without hover balls moves and reacts in a much more realistic.

    Your drone is very slow and does not react as a combat drone. A drone fighter must be small, move quickly and follow a target with greater fluidity and precision.

    If this is your first drone, I understand that this is not very easy to do.

  5. #5
    Wire Sofaking mjmr89 is on a distinguished road mjmr89's Avatar
    Join Date
    Mar 2008
    Posts
    502

    Default Re: Predator Drone Project

    Good start so far. But as people said, to be more realistic (and lose the easysauce), try replacing the hoverballs with an applyForce system or, if you would prefer a bit more oldschool, use thrusters to keep it up and stable.

    Also, I'd work on tuning your bearing thrusters, there is considerable wobble there. Look into a PD system (PID without the Integral part) for both bearing and pitch/roll for stabilization.

    Now lets hope this doesn't get deleted...

  6. #6
    Wire Noob Chrono101 is on a distinguished road Chrono101's Avatar
    Join Date
    Aug 2009
    Posts
    16

    Default Re: Predator Drone Project

    Yeah, you guys are pretty much right on all points there. Although I've done work with robotics and other embedded systems before, this is my first time trying something like this in Gmod, and this is the first week I've tried the Wiremod. The model in the videos is actually the second prototype (the first was a flying shipping container!), but the 4th revision. I'm on the 7th revision right now, and I've been working on fine tuning the maneuvering thrusters.

    I didn't really want to put a PID loop in the main propulsion, since it doesn't have to be *that* precise. Instead I added a "Fudge" factor into there, so the drone has an acceptable amount of room to "fudge the numbers".

    As for it being slow, it's because I am trying to fine-tune the system as a whole (that and Hunters don't go all that fast). It can go much, much faster just by changing the ThrustMult variable. It changes all instances in the code, and the drone responds as such.

    I will probably replace the hoverballs with thrusters or vector-thrusters eventually, which would also allow the drone to flip itself back over (which it can't do right now) if it ever gets stuck on its back.

    This drone takes a lot of inspiration from the real-life MQ-9 Reaper, which doesn't really move all that fast (it's a propeller-driven drone). The Reaper relies more on the precision and speed of its munitions to engage and destroy targets.

    [ame=http://www.xfire.com/video/1107e8/]Predator Test: Following Me[/ame]

    Here's a vid showing that the drone can track and follow faster targets pretty well, and I got a few more videos on my profile (sorry if they're kinda loud).
    Last edited by Chrono101; 08-14-2009 at 12:27 PM.
    Drone design, production, and programming at ChronoShift Industries

    Predator Mk.II UAV -- The most advanced aerial combat drone to date.

    "The best weapon you have only fires neurons -- better keep it loaded!"

  7. #7
    Expressionism 2.0

    Syranide has disabled reputation Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,179

    Default Re: Predator Drone Project

    Nice work with separating the different "modules" into separate E2s rather than the usual all-in-one approach

  8. #8
    Drone Madman
    Lyinginbedmon will become famous soon enough Lyinginbedmon will become famous soon enough Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,038

    Default Re: Predator Drone Project

    Well with the new ops features even Cronus will need more than one chip (I've been messing around with a few things on that note)

    Judging from the poweroff sequence it's probably going to need either a partially-nocollided chassis or a continual application of hovering force to keep the chassis from spazzing out.

  9. #9
    Wire Amateur MacerXGP is on a distinguished road MacerXGP's Avatar
    Join Date
    Aug 2007
    Posts
    75

    Default Re: Predator Drone Project

    First, eeew, hoverballs. Second, it's really quite slow.

    You may also want to fine-tune it's chassis, as it is looking a bit shabby.

    A good drone will orbit an area at considerable distance until told to attack, when it either speeds into the area and engages, or fires a standoff weapon.

    An autoturret mounted somewhere would help your drone quite a bit.

  10. #10
    Drone Madman
    Lyinginbedmon will become famous soon enough Lyinginbedmon will become famous soon enough Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,038

    Default Re: Predator Drone Project

    Quote Originally Posted by MacerXGP View Post
    A good drone will orbit an area at considerable distance until told to attack, when it either speeds into the area and engages, or fires a standoff weapon.

    An autoturret mounted somewhere would help your drone quite a bit.
    Perhaps an armament along the lines of the Starcraft battlecruiser unit, a bunch of small to moderate arms spread around the hull and a big central gun.

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Similar Threads

  1. Zeus Drone Project
    By Lyinginbedmon in forum Help & Support
    Replies: 74
    Last Post: 01-18-2010, 04:26 PM
  2. Hermes Drone Project
    By Lyinginbedmon in forum Help & Support
    Replies: 68
    Last Post: 10-25-2009, 06:56 AM
  3. my new project
    By oenmaster in forum Off-Topic
    Replies: 12
    Last Post: 06-17-2009, 09:23 AM
  4. Ares Drone Project
    By Lyinginbedmon in forum Help & Support
    Replies: 35
    Last Post: 06-02-2009, 10:31 AM
  5. Hephaestus Drone Project
    By Lyinginbedmon in forum Help & Support
    Replies: 175
    Last Post: 05-13-2009, 11:44 AM

Bookmarks

Posting Permissions

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