Board index FlightGear Support

Problem with control of AI ships and groundvehicles

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Problem with control of AI ships and groundvehicles

Postby planeTalk » Sat Mar 03, 2018 9:26 am

I want to make a ground vehicle follow the terrain but am unable to change the pitch of the AI model (at least, when it's a ship or a groundvehicle) by setting orientation/pitch-deg in the property tree
When I inspect the property tree at run time, I can see that the pitch-deg is set briefly to the required value and then reset to zero. There is no change in how the model displays on the simulation

In contrast, I am able to control the roll of the model by setting orientation/roll-deg in the property tree

Where can I find documentation on the FDM of AI models? I've searched the FG wiki but not reached the level of detail I seem to need. e.g.
    For the different AI types which parameters are needed as input and what results are output?
    Does type groundvehicle always require a flightplan?
    Is there any simulation model that will automatically follow the terrain?
The only solution I have found so far is to animate the pitch of the model as done for a moving helideck on a Royal Navy frigate in Type-45_demo
https://forum.flightgear.org/viewtopic.php?f=23&t=31712
Very elegant :-)

However I'd prefer not to follow this route because then every model in the simulation needs to be recoded

Many thanks for reading this far! I'd appreciate any ideas for how I might proceed

planeTalk
planeTalk
 
Posts: 10
Joined: Tue Dec 19, 2017 9:00 am

Re: Problem with control of AI ships and groundvehicles

Postby Necolatis » Sat Mar 03, 2018 10:02 am

I asume you talk about scenario objects?
Yeah, I also tried to change the pitch but failed, I think its hardcoded into the AI C++ code.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1832
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.1.1
OS: Windows 10 Pro

Re: Problem with control of AI ships and groundvehicles

Postby Thorsten » Sat Mar 03, 2018 11:44 am

I want to make a ground vehicle follow the terrain but am unable to change the pitch of the AI model (at least, when it's a ship or a groundvehicle) by setting orientation/pitch-deg in the property tree


You probably want to have a rotation animation in the model xml and control the property of that.
Thorsten
 
Posts: 9533
Joined: Mon Nov 02, 2009 8:33 am

Re: Problem with control of AI ships and groundvehicles

Postby Hooray » Sat Mar 03, 2018 11:55 am

Also, a number of people/efforts have meanwhile stopped using the AI system for doing such things, i.e. ended up using just the model-mgr directly (I believe Marius_A's road traffic is the most recent example)

http://wiki.flightgear.org/Road_Traffic
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11100
Joined: Tue Mar 25, 2008 8:40 am

Re: Problem with control of AI ships and groundvehicles

Postby planeTalk » Sat Mar 03, 2018 2:46 pm

Thanks for the thoughts everyone. It sounds like rotation animation in the model xml is the best way to go

Does this mean that the AI system for scenario models is no longer being developed?

http://wiki.flightgear.org/Status_of_AI_in_FlightGear also seems to point to use of model-based scripts

As noted in the discussion, Bombable uses AI for the backend control of its aircraft. For scenario models there seems to be a need for scripts that provide a realistic representation of land-, sea- and air-craft movement without the complexity of a full FDM


planeTalk
planeTalk
 
Posts: 10
Joined: Tue Dec 19, 2017 9:00 am

Re: Problem with control of AI ships and groundvehicles

Postby Hooray » Sat Mar 03, 2018 7:39 pm

Does this mean that the AI system for scenario models is no longer being developed?

That's a pretty messy wiki article you found there, and it consists primarily of quotes collected from various places covering related discussions, so it's primarily community feedback, and not necessarily in line with the thinking of the people involved in the AI department.

The original maintainer of the AI traffic system stated that he doesn't exactly agree with the statements collected there - however, subsequently, he also announced that he won't update the existing AI component in any significant way, his most recent comments related to this are summarized at: http://wiki.flightgear.org/FGTraffic

If in doubt, it would be best to check back with the developers mailing list and see if Durk is currently around or not, or if someone else can provide additional insight.
My impression is that Stuart might be able to shed some light on this, too - because he's the only other person to have done related HLA/RTI coding a while ago, which was brought up as the most likely technology stack to implement an out-of-process ai system.
Then again, there really is no such thing as reliable information - or even just something like a "core developer consensus", even the official "project policy roadmap" document is not treated that way.

Ultimately, your best bet is checking who's currently around doing related development and make up your own mind.

That being said, regardless of whether the AI system or the model manager is used to instantiate those 3D models - they can be animated/updated using Nasal code, e.g. via a scripted pseudo FDM (think ufo) or even property rules.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11100
Joined: Tue Mar 25, 2008 8:40 am

Re: Problem with control of AI ships and groundvehicles

Postby Thorsten » Sun Mar 04, 2018 6:45 am

Does this mean that the AI system for scenario models is no longer being developed?


No longer actively developed might just mean it's good enough for what it does.... It was intended to provide particular points of interest to interact with, not massive things like full road traffic.

Generally, having more AI objects with detailed behavior in the scene doesn't scale all too well.

It does a really nice job for carriers and escort ships, partially also for intercept targets, not really much to populate e.g. an airport with ground vehicles. So it all depends on what application you have in mind.
Thorsten
 
Posts: 9533
Joined: Mon Nov 02, 2009 8:33 am

Re: Problem with control of AI ships and groundvehicles

Postby Hooray » Sun Mar 04, 2018 7:00 am

Road traffic


As far as I remember, Marius_A said that he was able to instantiate several hundred models, without using the AI subsystem at all.
For details, refer to the link above the video.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11100
Joined: Tue Mar 25, 2008 8:40 am


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest