Board index FlightGear Development AI Traffic

Announcing AI CargoTowing Capability

Intelligent, computer controlled vehicles that drive/fly over the planet!

Re: Announcing AI CargoTowing Capability

Postby rastafioul » Mon Aug 01, 2016 6:39 pm

About Git, I have to learn from scratch.

Instead of in the xml I think it needs to be done with a listener or timer loop in nasal.

I have no idea of how to do this with what I understood of how FG loaded the aircrane.xml file. And it seems you had this exact same problem considering your first post of this subject.

Therefore, I just found out that we can reload the aircraft model (but I guess it is not linked to sound and probably more things).
It not a solution for the rescue winch idea but it would for the cargo to rope style.
It works if I change manually the <z-m> factor but I cannot find a way for the xml file to "read" from nasal .

Here are my tries:
aircrane.xml:
Code: Select all
                          <x-m>
              <nasal>
                <open>
                  <![CDATA[
                      props.globals.getNode("/ai/models/aircraft[1]/x-m-offset").getValue();
               print(props.globals.getNode("/ai/models/aircraft[1]/x-m-offset").getValue());
                  ]]>
                 </open>
              </nasal>
                         </x-m>
                         <!--y-m>
            <![CDATA[props.globals.getNode("/ai/models/aircraft[1]/y-m-offset").getValue();]]>
          </y-m-->
         <y-m>
             <binding>
                <command>nasal</command>
                <script>
            
            print(props.globals.getNode("/ai/models/aircraft[1]/y-m-offset").getValue());
            #props.globals.getNode("/ai/models/aircraft[1]/y-m-offset").getValue();
            
                </script>
             </binding>
          </y-m>
         <z-m>-2.5</z-m>



and the thing is that I do not get error so I could understand. :(
Thanks to every single person who helped and/or still helping to have such a great simulator.
For those who would find any complain to do: help or shut up and buy one!
rastafioul
 
Posts: 18
Joined: Tue Feb 16, 2016 6:55 pm
Version: 2016.2.1
OS: debian

Re: Announcing AI CargoTowing Capability

Postby Martien van der P. » Mon Aug 01, 2016 8:02 pm

As if it works, it is possible to model a winch like in rescue operations, it might already exist on an other aircraft. Any idea if one already have this?

The Alouette III has a working winch.
User avatar
Martien van der P.
 
Posts: 334
Joined: Fri Dec 14, 2012 5:09 pm
Location: The Netherlands
Callsign: MV-DP
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Announcing AI CargoTowing Capability

Postby wlbragg » Mon Aug 01, 2016 9:31 pm

rastafioul wrote in Mon Aug 01, 2016 6:39 pm:About Git, I have to learn from scratch.

It can seem daunting at first, but you will find a handful of things you do repetitively and nothing else.

rastafioul wrote in Mon Aug 01, 2016 6:39 pm:
Instead of in the xml I think it needs to be done with a listener or timer loop in nasal.

And it seems you had this exact same problem considering your first post of this subject.

That's right, before I learned how it can be done. Think of it this way, we already move (using nasal) both the original AI cargo object on the ground (I move it below the ground and then to the new location after it gets moved) and the Submodel (it moves with aircraft and again with the ballistics code when you drop it). So we are already moving these thing plenty. It's a mater of doing it when we want using nasal. That also brings me back to possibly changing the way it gets moved, eliminating the submodel for moving with the copter. The code is there to move the original AI objects (Cargo1 and Cargo2) in real time, I already was able to do that, it was just too slow. But I think that can be done (and sped up) using autopilot code. That is a technique I have learned since I started this back when.

I just found out that we can reload the aircraft model (but I guess it is not linked to sound and probably more things).

I don't consider that a solution. Reloading is still buggy and not quick enough.

It not a solution for the rescue winch idea.

We need to see how the Alouette III does it per @Martien van der P
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing AI CargoTowing Capability

Postby rastafioul » Tue Aug 02, 2016 4:11 pm

And it seems you had this exact same problem considering your first post of this subject.

That's right, before I learned how it can be done.

Alright, I think I understood how you did. I'll check when I have time.

alouette III
I just check quickly and saw that we need Gerard Robin's agreement if we find this solution usefull.

git
Just consider what I did as the newbee action... :oops:
Hope it is easy to modify/erase.
Thanks to every single person who helped and/or still helping to have such a great simulator.
For those who would find any complain to do: help or shut up and buy one!
rastafioul
 
Posts: 18
Joined: Tue Feb 16, 2016 6:55 pm
Version: 2016.2.1
OS: debian

Re: Announcing AI CargoTowing Capability

Postby Martien van der P. » Tue Aug 02, 2016 5:14 pm

alouette III
I just check quickly and saw that we need Gerard Robin's agreement if we find this solution usefull.


According to this post: viewtopic.php?f=4&t=30101#p291347 Gerard Robin past away not so long ago. I think you've to contact the GRTux Team for an agreement.
User avatar
Martien van der P.
 
Posts: 334
Joined: Fri Dec 14, 2012 5:09 pm
Location: The Netherlands
Callsign: MV-DP
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Announcing AI CargoTowing Capability

Postby wlbragg » Tue Aug 02, 2016 5:34 pm

rastafioul wrote in Tue Aug 02, 2016 4:11 pm:alouette III
I just check quickly and saw that we need Gerard Robin's agreement if we find this solution usefull.

I'm confused, isn't this aircraft GPL in fgaddon, why special permission?

rastafioul wrote in Tue Aug 02, 2016 4:11 pm:git
Just consider what I did as the newbee action... :oops:
Hope it is easy to modify/erase.

No worries, that's one nice thing about GIT, "history", it's saved me many times.
I take it the branch "rastafioul-CargoChoice-valid" is the one I want to look at? Can I delete the other 2?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing AI CargoTowing Capability

Postby rastafioul » Wed Aug 03, 2016 12:26 am

alouette III
So sad, Gerard Robin's aircrafts are just outstanding!
    copyright:
    I think he was HHS and due to generation issues did not want his aircrafts to be weaponised so he modified the licence.
    Rescue-Op.xml says:
    Code: Select all
        <!--
        Usable with FlightGear
        Property of Gerard Robin (C) 2008-2010
        Copyright
        -->
       


Not using his code but just yours, as everything was already there,
I got the winch-like thing to work up/down with keys but on the next run of fg, it would not... as I did not change a thing. :(
-> for that, there is, right now, a need to be on RealTime.

I guess it is link to my other problem: a container hooked that stays all the time! and the position is wrong especially given by the xml and the offsets.
This will be my next brain teaser... which will probably solve a lot of thing for me!

dialogs
One of the dialogs I made, taken from one of yours, does not want to show up again.
I tested with gps.xml, it works then I think it might be a encoding issue. Would that be possible? does the file need to be in a special encoding style, if yes, where can I find the info of which one?

git
I check my repertories and the one pushed (which was my local one)seems to have added a cargo.nas file under Aircrane/nasal/ AND the one I am working on which is under Aircrane/nasal/cargo/ .
This Aircrane/nasal/cargo/ is because I put on specific folder everything that was related to cargo (container models and nasal) because I wanted to put it under the fg-root directory so multiple aircraft could use it. But.... bad idea at least for the nasal.
Do I go back to your organisation or stay with the folders /models/cargo and /nasal/cargo ?
Thanks to every single person who helped and/or still helping to have such a great simulator.
For those who would find any complain to do: help or shut up and buy one!
rastafioul
 
Posts: 18
Joined: Tue Feb 16, 2016 6:55 pm
Version: 2016.2.1
OS: debian

Re: Announcing AI CargoTowing Capability

Postby Thorsten » Wed Aug 03, 2016 9:00 am

copyright:
I think he was HHS and due to generation issues did not want his aircrafts to be weaponised so he modified the licence.


HHS is Heiko Schulz, and you can reach him via the mailing list if you need.

Otherwise: The original author is always the copyright holder, but that's not relevant for what you are allowed to do, what is relevant is the license the aircraft is under. If an author has put his plane to FGAddon and you got it from there, it's GPL licensed, The author may not ever revoke that license or prevent you from modifying or using it. In particular, the author may not revoke the license because he objects to military modifications.

The author can (if he is sole copyright holder or has agreement of all co-authors) opt to license subsequent development in a different way and publish such a version somewhere else (say on his website). Then you may not use such material without permission. But this does not affect the original material on FGAddon.

So the copyright statement as such is irrelevant for how you can use material, it's the license that matters.

See An introduction to copyright and licensing for more context.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Announcing AI CargoTowing Capability

Postby rastafioul » Thu Aug 11, 2016 9:38 am

HHS is Heiko Schulz

Oops... my mistake. Thanks for the precision

copyrights
Thanks Thorsten for thoses informations.
This knowledge will probably help me out on other projects!

Towing

I tried once again the load_demo scenario. I went a little bit on the code to give me a global point of view.
I think if we go with AI mode (which would probably be the best choice to have real aircraft reactions), it is going to be pretty close to what were doing the two guys, Maik Justus and Vivian Meazza who tried it.
It seems they created a AI-ballistic object which reacts to fdm and that could be linked to the aircarft.
It seems also that they were, at least, pretty close to mastering flightgear developpement as wlbragg was a newbee at the time.
So, maybe the reason of thoses two different approachs were notably due to that last point.
Wlbragg, can you confirm?
According to this post, you went on this development due to a suggestion to use nasal and the fact that you could not find a "aero-dragger" class.
So if you did not get in touch with Vivian and Maik, we could ask them, if they remember, to explain the reason they put this project aside eventhough HHS gave us a lead: problem with groundcache (?).

Therefore, it might be worth to take a look closer at load_demo, check how to link the AI-balistic with aerotow and if needed, work on the C Ai-balistic side.

What do you, guys, think and know about all of this?

http://wiki.flightgear.org/External_Car ... ite_note-4
viewtopic.php?f=4&t=5727&p=43996&hilit=load_demo+groundcache#p43996
Thanks to every single person who helped and/or still helping to have such a great simulator.
For those who would find any complain to do: help or shut up and buy one!
rastafioul
 
Posts: 18
Joined: Tue Feb 16, 2016 6:55 pm
Version: 2016.2.1
OS: debian

Re: Announcing AI CargoTowing Capability

Postby wlbragg » Thu May 18, 2017 8:00 pm

I was revisiting some of my old files and decided to see if this still worked as was "my" last version (proof of concept).

It needed a few tweaks to get something that was functional. Someday I am going to clean this up and make it work really well, including the AirCrane interior cockpit and engineer station. But it is still fun to play with as is and is really good for honing your piloting skills. It helps if you actually know how to fly a helicopter like I do, NOT!

Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing AI CargoTowing Capability

Postby wlbragg » Mon Mar 01, 2021 7:13 pm

For any continuing discussion see:
Cargo Towing Addon
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Previous

Return to AI Traffic

Who is online

Users browsing this forum: No registered users and 3 guests