Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: Automatic Waypoint Navigation (Tiger 2)  (Read 8317 times)

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 568
  • We do these things not because they are easy. -JFK
Automatic Waypoint Navigation (Tiger 2)
« on: August 08, 2015, 03:31:43 pm »

A while back I built a simple waypoint navigation script for vehicles, and I thought I would share it.

I modified M7's Tiger 2 as a basic demonstration of this functionality, and share it with the hope that someone will help improve it!  8) At the moment it is a real hack-job, as I only spent a short amount of time on it. The vehicle script has functions to 1) calculate latitude and longitude from the ECEF position, 2) I calculate the forward azimuth from the current position to the target waypoint, and 3) calculate the true relative bearing to follow. Once it gets within 10 meters of the waypoint the vehicle will stop. Sometimes it may go in circles, especially if the vehicles is too far away from the waypoint, but if it is not too far it should correct the course after a few seconds. A PID controller would probably fix this problem.

One functionality I would like to develop is obstacle avoidance. This is getting into the domain of building a basic AI construct, which isn't too difficult and is really a matter of calling the correct methods to the OT interface to determine if the current course is clear, blocked or cannot be passed.

In this version, you must set the waypoint manually, by editing the variables near the top of the script for the latitude and longitude of the target waypoint in radians. Currently, these are set for a point near the OT default location: Airport 2, Lower Himalayas.

Code: [Select]
var lat_tgt_rad = 0.48663567294854004; //Latitude Radians
var lon_tgt_rad = 1.4642145502211033; //Longitude Radians

Here is the download link for the package:
http://www.mediafire.com/download/1bajxk9hgb5zijl/tiger2.m7c7.otx

Best regards,
Uriah

« Last Edit: August 08, 2015, 03:37:06 pm by Uriah »
Logged

Acetone

  • Hero Member
  • *****
  • Posts: 957
    • Youtube channel
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #1 on: August 08, 2015, 04:47:14 pm »

Time to start doing awful experiments with this poor little guy


Here, you can do it, don't worry...


 :facepalm:

Awesome job Uriah :)

« Last Edit: August 08, 2015, 05:04:43 pm by Acetone »
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 568
  • We do these things not because they are easy. -JFK
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #2 on: August 08, 2015, 04:59:54 pm »

Ha ha!  :D

I'll setup a system for placing multiple waypoints dynamically in a few weeks once I have some free time. I have ideas for obstacle avoidance too, but they have yet to be put to the test.

Regards,
Uriah
Logged

Revolver

  • Hero Member
  • *****
  • Posts: 554
  • Adlerhorst-Hangar Design Group ©
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #3 on: August 09, 2015, 05:10:18 am »

Oh ... very nice ... we have Tiger-2 space program  :)... what is coming next ... Leo-2 on the Moon?   ::)
Logged
"Es gibt nur eine Sünde, die gegen die ganze Menschheit mit allen ihren Geschlechtern begangen
werden kann, und dies ist die Verfälschung der Geschichte."(F.Hebbel)

i7(960)4x4.0GHz,16Gb-RAM,GTX980Ti(6Gb),Xonar-Phoebus-7.1,2x500Gb/SSD,Hotas-Warthog

andfly

  • Full Member
  • ***
  • Posts: 239
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #4 on: August 09, 2015, 11:17:16 am »

Very interesting....
I'm always fascinated by algorithms which seem to give a "soul" and "a little autonomous intelligence" to models of simulation!
It is the basis for the creation of a world more and more realistic!   8)
Logged
I do not know the English language. I use Google Translate. I hope it's all understandable.

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 568
  • We do these things not because they are easy. -JFK
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #5 on: August 09, 2015, 04:43:57 pm »

Thanks! I'll build a move advanced and extensible version when I get some free time in a few weeks. I plan for this version to have a basic obstacle avoidance algorithm, multiple waypoint (route) capability, and for it to be a separate script which can be added to any vehicle with a simple $include statement. Any suggestions are appreciated!  :D

Regards,
Uriah
Logged

Revolver

  • Hero Member
  • *****
  • Posts: 554
  • Adlerhorst-Hangar Design Group ©
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #6 on: August 10, 2015, 03:43:09 am »

Moin,
For us it would be very interesting to have an AI (also scripted) that follows and is doing a launched their functions.
For example, an aircraft mechanic who goes to the aircraft to do his bill tasks ... if you understand what I mean. :)
« Last Edit: August 10, 2015, 03:46:36 am by AH-DG »
Logged
"Es gibt nur eine Sünde, die gegen die ganze Menschheit mit allen ihren Geschlechtern begangen
werden kann, und dies ist die Verfälschung der Geschichte."(F.Hebbel)

i7(960)4x4.0GHz,16Gb-RAM,GTX980Ti(6Gb),Xonar-Phoebus-7.1,2x500Gb/SSD,Hotas-Warthog

zzz

  • Sr. Member
  • ****
  • Posts: 266
  • newbie
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #7 on: August 10, 2015, 07:45:21 pm »

Nice. I just made an auto-targeting turret script that works for all angles & offsets and was trying to shoehorn it into an autopilot script by having the world as the base and the vehicle the off-centre turret to calculate the headings but atm it only works at the north pole
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 568
  • We do these things not because they are easy. -JFK
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #8 on: August 10, 2015, 07:48:10 pm »

Hi

That is awesome! Sounds like just what we need for vehicles to automatically engage targets. Mind sharing?

Regards,
Uriah
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 568
  • We do these things not because they are easy. -JFK
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #9 on: August 10, 2015, 07:54:43 pm »

Moin,
For us it would be very interesting to have an AI (also scripted) that follows and is doing a launched their functions.
For example, an aircraft mechanic who goes to the aircraft to do his bill tasks ... if you understand what I mean. :)

Do you mean something like a ground support crew for aircraft maintenance and airport ground activities?

Regards,
Uriah
Logged

Revolver

  • Hero Member
  • *****
  • Posts: 554
  • Adlerhorst-Hangar Design Group ©
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #10 on: August 10, 2015, 10:54:33 pm »

Moin,
For us it would be very interesting to have an AI (also scripted) that follows and is doing a launched their functions.
For example, an aircraft mechanic who goes to the aircraft to do his bill tasks ... if you understand what I mean. :)

Do you mean something like a ground support crew for aircraft maintenance and airport ground activities?

Regards,
Uriah

Yes, exactly what I mean. Because today it is seeing in many games that is much more focused on substantial as to what takes place in the background.

BR,
Stefan
Logged
"Es gibt nur eine Sünde, die gegen die ganze Menschheit mit allen ihren Geschlechtern begangen
werden kann, und dies ist die Verfälschung der Geschichte."(F.Hebbel)

i7(960)4x4.0GHz,16Gb-RAM,GTX980Ti(6Gb),Xonar-Phoebus-7.1,2x500Gb/SSD,Hotas-Warthog

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 568
  • We do these things not because they are easy. -JFK
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #11 on: August 10, 2015, 11:05:29 pm »

Hi Stefan,

Such functionality would either have to be hard-code/scripted, or else it would require a sophisticated AI system. Scripting being by far the easier of the two methods.

These kind of features are at a much higher level than anything I can built currently, but it is certainly within the realm of possibility.

Regards,
Uriah
Logged

Revolver

  • Hero Member
  • *****
  • Posts: 554
  • Adlerhorst-Hangar Design Group ©
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #12 on: August 10, 2015, 11:18:58 pm »

Hi Stefan,

Such functionality would either have to be hard-code/scripted, or else it would require a sophisticated AI system. Scripting being by far the easier of the two methods.

These kind of features are at a much higher level than anything I can built currently, but it is certainly within the realm of possibility.

Regards,
Uriah

Moin Uriah,

I'm not a programmer and far away from the, but I think that something like that can develop as Point Snap.
That is, the object is given a one-point X as a target where it can then be moved. So as I see it.  ::)
Logged
"Es gibt nur eine Sünde, die gegen die ganze Menschheit mit allen ihren Geschlechtern begangen
werden kann, und dies ist die Verfälschung der Geschichte."(F.Hebbel)

i7(960)4x4.0GHz,16Gb-RAM,GTX980Ti(6Gb),Xonar-Phoebus-7.1,2x500Gb/SSD,Hotas-Warthog

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 568
  • We do these things not because they are easy. -JFK
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #13 on: August 10, 2015, 11:33:31 pm »

Yes, we would need a dynamic waypoint placement tool and another method for vehicles to follow roads.

Now if you want the vehicle to interact with the world dynamically as events transpire, you'll need AI.

Regards,
Uriah
Logged

zzz

  • Sr. Member
  • ****
  • Posts: 266
  • newbie
Re: Automatic Waypoint Navigation (Tiger 2)
« Reply #14 on: August 11, 2015, 06:29:04 pm »

Hi

That is awesome! Sounds like just what we need for vehicles to automatically engage targets. Mind sharing?

Regards,
Uriah

I'm going to try and turn it into a function for the weekend. In the mean time here's a video.



Second scene is for a super close target to show the independent angles.
Logged