Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: GPU RayShooting and autonomous racer in track without waypoints

  1. #1
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,099
    Blog Entries
    5
    Rep Power
    727

    GPU RayShooting and autonomous racer in track without waypoints

    Hi,

    as I know how problematic it is for mobile robots to move in space according to ray shooting, I was a bit afraid it will not work so good for the race.

    But the results look promising so far!

    Let me introduce first dummy "I do not know anything about track, lets trust sensors" example.
    I do not calculate any ray-triangle intersections, I do simple ZBuffer rayshoot query.

    The "racer" has just front and left/right sensors.

    Hope you will like it, keep in mind this is just beginning. I know the vehicle moves like drunk


    Petr

    UPDATED ATTACHEMENT
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	RayCollision.png 
Views:	192 
Size:	24.9 KB 
ID:	5020  
    Attached Files Attached Files
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    55
    Posts
    8,653
    Blog Entries
    2
    Rep Power
    10

    Re: GPU RayShooting and autonomous racer in track without waypoints

    Well, it is just a beginning but ... wow ... what a beginning
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  3. #3
    thinBasic MVPs
    Join Date
    Sep 2006
    Posts
    3,294
    Blog Entries
    2
    Rep Power
    345

    Re: GPU RayShooting and autonomous racer in track without waypoints

    That proofs that my idea works. Great!

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,099
    Blog Entries
    5
    Rep Power
    727

    Re: GPU RayShooting and autonomous racer in track without waypoints



    Your idea was very good Mike, it can save us some work.
    It is simply great to know we can throw the object to any environment and it is able to navigate without need for any details.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    55
    Posts
    8,653
    Blog Entries
    2
    Rep Power
    10

    Re: GPU RayShooting and autonomous racer in track without waypoints

    The idea can open lot of new possibilities.
    And maybe the idea of rays can be encapsulated in entity system directly as native feature ( attention ... Petr will kill you ! :-X )

    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  6. #6
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,099
    Blog Entries
    5
    Rep Power
    727

    Re: GPU RayShooting and autonomous racer in track without waypoints

    No,

    I do not kill people ... usually ;D
    That reminds me ... did you sent me that Beretta already Eros?


    Petr





    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  7. #7
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    55
    Posts
    8,653
    Blog Entries
    2
    Rep Power
    10

    Re: GPU RayShooting and autonomous racer in track without waypoints

    Yyyyeeeees ... that remember me something !
    Attention guy, I'm Italian
    ;D
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  8. #8
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    66
    Posts
    3,869
    Rep Power
    402

    Re: GPU RayShooting and autonomous racer in track without waypoints

    That is cool Petr.

    I think it could be easier and faster if you just have it balance the distance from left and right sensors and have it move forward.

    In the race, when the front sensor senses another vehicle for instance, it could then use more sensor input to determine which side to pass on or if not enough room to brake or slow down.


    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  9. #9

    Re: GPU RayShooting and autonomous racer in track without waypoints

    I was having a problem with the car driving through the first turn, and driving through the one on the bottom. (Your distance code is also causing unnatural "hopping", which is why I multiplied it by 10. It gets progressively slower as it approaches a target, then zooms full speed the further the target is away. EG... 40MPH, 30MPH, 20MPH, 10MPH, 5MPH, 1MPH, 0.5MPH, 0.1MPH, {Target hit}, 100MPH, 90MPH, 80MPH...)

    The problem may be that you have two "Continuity" values. (Time)... Game-frame = time and distance-per-frame = time. (Essentially, your SPEED is powered by 2 times... thus, as it nears, is progressively slower, not linear, as the use for Game-frame is intended.)

    You will still need waypoints, or it will not know where to go, or if it is headed in the correct direction. (Humans use them, why would a program not use them? The lines on the road, posted signs, and knowledge of the destination are our track-points.)

    If anything, feelers and a track-point system as one, might maximize the operation.

    (Drop the ship outside the track... It NEEDS way-points.)

    The points have to be there to determine if we, or the AI, are stuck or are finishing without cheating. (Driving across the field, taking a shortcut, or after being flipped into a shorter destination, like through an overpass.)

    The feelers would be great from a "Thinking" perspective, because an AI could "Ride the wall" to cut time, but not hit the wall, and be slowed-down... while being able to detect that it needs to pass someone else riding the wall. But, I do not see the feelers alone, operating the AI to win a race.

    Not sure if you go here... but I find a lot of the info real helpful for my simulation programs. (Not the specific page, but the site in general.) LOL, I forgot to put the link!

    Here it is...
    http://www.gamedev.net/reference/list.asp?categoryid=28

    I don't entirely know how these "probes" work... but is it based on this concept?
    http://www.gamasutra.com/features/20.../lander_02.htm

    I failed horribly at attempting to modify any of the numbers in the formula. (Not sure why you have speed resetting to 0.)

    I am following this (The method), still, with strong interest. (I learn from all your code.)

  10. #10
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,099
    Blog Entries
    5
    Rep Power
    727

    Re: GPU RayShooting and autonomous racer in track without waypoints

    Hi Kent,

    you are right about the balance, that would be better.

    Jason,

    as I said, this is just concept demo, not final AI or anything. I just needed to test if sensors are way to go, not provide perfect AI at this moment. After reading your post I want to hang myself

    (Your distance code is also causing unnatural "hopping", which is why I multiplied it by 10
    What did you multiplied by 10? Could you provide code?

    The problem may be that you have two "Continuity" values. (Time)... Game-frame = time and distance-per-frame = time. (Essentially, your SPEED is powered by 2 times... thus, as it nears, is progressively slower, not linear, as the use for Game-frame is intended.)
    How do you know what was intented
    If I shift anything at 10 / FrameRate, it is basically moving at 10 m/s.

    (Drop the ship outside the track... It NEEDS way-points.)
    Why I would do that? I like on this approach the track designer is not obligated to set waypoints.
    I agree GameDev is good resource.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Page 1 of 2 12 LastLast

Similar Threads

  1. my little track ai :)
    By Lionheart008 in forum TBGL General
    Replies: 6
    Last Post: 18-04-2009, 20:41

Posting Permissions

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