Coder Social home page Coder Social logo

thunderfly-aerospace / px4-flightgear-bridge Goto Github PK

View Code? Open in Web Editor NEW
31.0 7.0 42.0 1.5 MB

FlightGear simulator to PX4 software stack connector

License: BSD 3-Clause "New" or "Revised" License

CMake 4.25% Python 9.26% C++ 82.96% Shell 3.52%
flightgear-bridge px4 flightgear-simulator aircraft qgroundcontrol

px4-flightgear-bridge's Introduction

FlightGear Bridge

Build Tests

The FlightGear alternative to the current PX4's mainstream simulator Gazebo. FlightGear expands the simulation possibilities through advanced weather simulations.

FlightGear SITL connected with PX4 and QGroundControl

This stand-alone application adds the possibility of the use of the FlightGear simulator. The system was tested on the Rascal airplane and TF-G1 autogyro simulation models.

It connects to FG (over UDP generic protocol) and transforms the data to TCP MAVlink packets for the PX4 stack.

How to use the FlightGear with PX4

Install

  1. Install FlightGear. In Ubuntu You can use install the last stable FG from the PPA repository by following commands: sudo add-apt-repository -y -u ppa:saiarcot895/flightgear and sudo DEBIAN_FRONTEND=noninteractive apt-get -y --quiet install flightgear
  1. Set write permissions to the Protocols folder in the FlightGear installation directory. On Ubuntu run sudo chmod a+w /usr/share/games/flightgear/Protocol

Startup

General usage consists following steps

  1. Open QgroundControl
  2. In PX4Firmware folder run: make px4_sitl_nolockstep flightgear_model-name
  3. Wait until FlightGear fully loads.
Rascal airplane
  1. Open QgroundControl
  2. In PX4Firmware folder run: make px4_sitl_nolockstep flightgear_rascal for plane with combustion engine. Alternatively, you could use make px4_sitl_nolockstep flightgear_rascal-electric for the plane with an electric engine model.
  3. Wait until FlightGear fully loads.
TF-G1 autogyro
  1. Open QgroundControl
  2. In PX4Firmware folder run: make px4_sitl_nolockstep flightgear_tf-g1 for TF-G1 autogyro.
  3. Wait until FlightGear fully loads.
TF-G2 autogyro
  1. Open QgroundControl
  2. In PX4Firmware folder run: make px4_sitl_nolockstep flightgear_tf-g2 for TF-G2 autogyro.
  3. Wait until FlightGear fully loads.
TF-R1 rover
  1. Open QgroundControl
  2. In PX4Firmware folder run: make px4_sitl_nolockstep flightgear_tf-r1 for TF-R1 ground rover.
  3. Wait until FlightGear fully loads.

Known issues

  1. If you have FPS lower than 20 the bridge will not work correctly. Check your FPS. In FlightGear display frame rate by enabling it in View->View Options->Show frame rate.
  2. You can probably use a wild set of FG versions - we tested installation with FG 2019.1.1 and 2020.3.8. But in the past, we achieved basic functionality on Debian 9 running FG 2016.1.1 from the distribution repository.
  3. Multiple models packaged with the bridge have an electric engine that needs up-to-date FlightGear.
  4. PX4 internal starting script runs fgfs with a set of parameters to reduce graphic load.
  5. The starting script searches for the FG-Data folder. Run fgfs --version to check the paths. If your output of this command does not contain the FG_ROOT line, the script will not work. Check where are FG binaries in your system, by executing the command which fgfs. Then the Advanced Options section of this readme could help you.

Advanced Options

You can tune your FG installation/settings by the following environment variables:

  1. FG_BINARY - absolute path to FG binary to run. (It can be an AppImage)
  2. FG_MODELS_DIR - absolute path to the folder containing the manually-downloaded aircraft models which should be used for simulation.
  3. FG_ARGS_EX - any additional FG parameters

FlightGear Bridge and starting script now support multiple instances of PX4. FG_run script takes the second argument, which is PX4 ID (and automatically adjusts the port numbers according to the given number) and bridge binary takes this ID as the first argument before the output of get_FGbridge_params.py

If you want to use a currently unsupported FlightGear aircraft with PX4, you need:

  1. Add the FlightGear aircraft to models subdirectory, or to another MODEL PATH searched by FG
  2. In models subdirectory create .json file.
  3. Add model into PX4 make system in file platforms/posix/cmake/sitl_target.cmake with same name as json file in previous step.
  4. You probably will need a new PX4 startup script for your vehicle. (vehicle name is the same name as the name of .json file)

If you want to test another plane model, you can switch the Rascal model to another type by editing the file models/rascal.json. For example substitute Rascal110-YASim by Rascal110-JSBSim, or chosen aircraft name.

Limitations

The PX4 is connected to FlightGear through "generic protocol", which is served synchronously to the simulator graphics engine frame rate. So the PX4 gets the sensor data in frequency, depending on graphics resources and the current scene. The source code implements the artificial upsampling of sensor data to ~100Hz to avoid stale sensor detection triggers in PX4. Random noise is added to the sensor data.

The possible better approach is to obtain the FlightGear using an HLA interface.

Credits

FlightGear bridge was initially developed at ThunderFly s.r.o. by Vít Hanousek [email protected]

px4-flightgear-bridge's People

Contributors

dagar avatar jaeyoung-lim avatar kaklik avatar roman-dvorak avatar slimonslimon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

px4-flightgear-bridge's Issues

Rascal looks different

I have removed the previously installed rascal model and tried running the fg nightly build.

However, the rascal model looks a bit different compared to the previously installed model.
Screenshot from 2020-05-02 19-04-41

Could someone enlighten me on why the mesh of the model changed?

Does PX4 deprecate PX4-FlightGear-Bridge simulation?

Hi, I am using the simulation with the latest firmware. However. I encounters errors while it simulates with flight gear. Does px4 deprecate px4-flightgear-bridge? It just responds like this:

PX4-Autopilot % make px4_sitl_nolockstep flightgear_rascal
ninja: error: unknown target 'flightgear_rascal'
even the command:

PX4-Autopilot % make px4_sitl list_vmd_make_targets
ninja: error: unknown target 'list_vmd_make_targets'
make: *** [px4_sitl] Error 1

The error occurs when using FlightGear for software-in-the-loop simulation in v1.14 and later

I use FlightGear for fixed-wing software-in-the-loop simulation. However, after running the command "make px4_sitl_nolockstep flightgear_rascal-electric," I encountered the following error:

ERROR [simulator_mavlink] Number of simulated accelerometers 80 out of range. Max: 3.

This issue arises in PX4 Firmware version 1.14, while it doesn't occur in version 1.13.3. I am looking to resolve this problem, but I am having difficulty identifying the issue. Does anyone have any suggestions?

Multi-vehicle simulation support

There are exist these three connections, which needs to be initialized correctly:

  • FG<->FGServer
  • Bridge<->FG
  • Bridge<->PX4

For multi-vehicle simulation we need to solve the following problems:

  • multiple FG instances should be ready to connect to the same FG server, but every FG instance needs to pick a unique port for incoming communication (by FG start-up parameters). The communication parameters need to be defined from the PX4 bridge side.
  • FG-bridge and FG need to configure parameters ( e.g. FG startup parameters, and FG-bridge internal properties).
  • FG-bridge to PX4 also need set up a port for Communication - (vehicle can setup listening port in its boot e.g. bridge side)
  • Find a way how to find "empty" px4 proces number

Remove ign::math dependency

By selecting other Vector/quterernion library - Idealy some "header only", or code copy type.

Or write the rotation directly into code.

Aircraft paths are not compatible with jsbsim

I can see that the aircraft configs under models directory in this repo is not compatible with the path that JSBSim is assuming.

See: https://github.com/JSBSim-Team/jsbsim/blob/ecb79520a50d0f04ca095801f39c3bdb3ea36a16/src/FGFDMExec.h#L280

  /** Loads an aircraft model.  The paths to the aircraft and engine
      config file directories must be set prior to calling this.  See
      below.
      @param model the name of the aircraft model itself. This file will
      be looked for in the directory specified in the AircraftPath variable,
      and in turn under the directory with the same name as the model. For
      instance: "aircraft/x15/x15.xml"
      @param addModelToPath set to true to add the model name to the
      AircraftPath, defaults to true
      @return true if successful*/
  bool LoadModel(const std::string& model, bool addModelToPath = true);

As far as I understand this is handled in the json file when launching with the python script, but seems like this doesn't work when using the cpp API of jsbsim.

Any ideas on how to get this working? @kaklik @slimonslimon

@RomanBapst FYI

Fixed wing mission sometimes result in a flyaway

I have experienced that sometimes fixed wing missions result in a flyaway

Demo

This seems to have somekind of relation ship with where the takeoff waypoint is located related to the vehicle, but this is not consistent. Sometimes the same mission results in a flyaway / or not.

For me, this only happens when using the flightgear SITL simulation

Tested on Ubuntu Bionic, Flightgear 2019.1.1

Error in reading file : file not handled

This error occasionally appears at the simulator startup, after the new firmware compilation.

image

Repeated startup of the simulator fixes the issue. Until that the simulator is unresponsive.

Zigzags in flight path in QGroundControl (Plane teleports)

Steps to reproduce:

  1. make px4_sitl_nolockstep flightgear_rascal-electric or make px4_sitl_nolockstep flightgear_rascal
  2. Takeoff from QGroundControl and watch the plane loiter

From time to time the plane in QGroundControl will teleport and the flight path will be drawn as shown in the figure below:

Zigzagged flight path

Note that the plane in FlightGear does not teleport, so I assume that the issue comes from PX4 FlightGear bridge.

Can’t run simulation with FightGear in Mac

Hi,everybody.
I am tiring to make the simulation of FlighrGear with my mac. Although I do have installed FlightGear(2020.1.2), and I have found the file"fgfs" in the installed package(FLightGear->package contents->MacOS->fgfs) So the “fgfs” is not located in the same directory as in the ubuntu. And I can’t run it at the command line. I can just run it with double clicking the “fgfs” icon…It still encounters errors. Dose PX4 not support FlightGear for mac yet? Or is it just my setting problem?
here is the error message:
firmware % FG_BINARY="-- /Applications/FlightGear.app/Contents/MacOS/fgfs" make px4_sitl_nolockstep flightgear_rascal
[0/5] Performing build step for 'flightgear_bridge’
ninja: no work to do.
[4/5] cd /Users/kevin/Firmware/build/p…vin/Firmware/build/px4_sitl_nolockstep
SITL ARGS
sitl_bin: /Users/kevin/Firmware/build/px4_sitl_nolockstep/bin/px4
debugger: none
program: flightgear
model: rascal
world: none
src_path: /Users/kevin/Firmware
build_path: /Users/kevin/Firmware/build/px4_sitl_nolockstep
FG setup
Traceback (most recent call last):
** File “/Users/kevin/Firmware/Tools/flightgear_bridge/FG_run.py”, line 30, in **
** fghelp=subprocess.check_output([fgbin, ‘–version’]).decode(“utf-8”).split(’\n’);

** File “/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py”, line 411, in check_output**
** kwargs).stdout
** File “/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py”, line 488, in run**
** with Popen(popenargs, kwargs) as process:
** File “/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py”, line 800, in init*
** restore_signals, start_new_session)**
** File “/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py”, line 1551, in _execute_child**
** raise child_exception_type(errno_num, err_msg, err_filename)**
FileNotFoundError: [Errno 2] No such file or directory: ‘-- /Applications/FlightGear.app/Contents/MacOS/fgfs’: '-- /Applications/FlightGear.app/Contents/MacOS/fgfs’
FAILED: platforms/posix/CMakeFiles/flightgear_rascal **
cd /Users/kevin/Firmware/build/px4_sitl_nolockstep/tmp && /Users/kevin/Firmware/Tools/sitl_run.sh /Users/kevin/Firmware/build/px4_sitl_nolockstep/bin/px4 none flightgear rascal none /Users/kevin/Firmware /Users/kevin/Firmware/build/px4_sitl_nolockstep
ninja: build stopped: subcommand failed.
make: *** [px4_sitl_nolockstep] Error 1

What is the correct way to install the models?

Is there a documentation on how to correctly install the models of flight gear?

1. Install FlightGear and . You should be able to run Flightgear by fgfs from command line.
2. Install required aircraft models (Rascal_110, ThunderFly TF-G1)
3. Set write permissions to the Protocol folder of FG (in ubuntu /usr/share/games/flightgear/Protocols)
4. Open QgroundControl
5. In PX4Firmware folder run: make px4_sitl_nosteplock flightgear_plane for plane or make px4_sitl_nosteplock flightgear_tf-g1 for autogyro

I was trying to get started (Haven't looked at any additional documentation) and am stuck at 2.
While I continued without doing step 2, I ran into the following message

Screenshot from 2020-04-13 17-11-15

I guess everyone else will wonder the same thing when they get started.
Thanks,

Synchronous communication interface with LockStep

The actual implementation is limited by the update rate of the property tree available through the FG generic protocol. Unfortunately, the update rate is limited by the FPS rate of the graphics engine.

The graphics engine is unable to output regularly sampled data, the implementation is therefore limited to use no lockstep mode.

The FlightGear supports several other communication interfaces. The most promising is probably the HLA.

Turbine Engine not working with flightgear JSBSim

Hi,
I am trying to model my aircraft through JSBSim by modifying the given example of rascal. I have built the aero model and engine file (through aeromatic) and replaced it in the set file. The parameters in these generated files have been thoroughly verified. I have also placed the geometry file which produces the geometry correctly. The aircraft uses the turbine engine modeling P550 pro. This turbine engine does not work but the electric engine given in rascal JSBSim model works fine.

When running the sitl simulation in flightgear, the aircraft is unable to move at all. Please tell the possible sources for this issue.
The engine file is shown below:

<turbine_engine name="Engine">
  <milthrust>   110.2 </milthrust>
  <bypassratio>     0.0 </bypassratio>
  <tsfc>            0.5 </tsfc>
  <bleed>           0.03</bleed>
  <idlen1>          30.0 </idlen1>
  <idlen2>         60.0 </idlen2>
  <maxn1>           100.0 </maxn1>
  <maxn2>         100.0 </maxn2>
  <augmented>         0 </augmented>
  <injected>          0 </injected>

  <function name="IdleThrust">
   <table>
    <independentVar lookup="row">velocities/mach</independentVar>
    <independentVar lookup="column">atmosphere/density-altitude</independentVar>
    <tableData>
           0         5000      10000     15000     20000
     0.15  0.383427  0.317857  0.261733  0.213963  0.173822 
     0.30  0.410490  0.340561  0.280804  0.229765  0.186900  
     0.50  0.473698  0.393235  0.324396  0.265729  0.216143  
     0.65  0.533455  0.443184  0.365627  0.299512  0.243751  
     0.85  0.581769  0.533273  0.444818  0.364355  0.296243    
    </tableData>
   </table>
  </function>

  <function name="MilThrust">
   <table>
    <independentVar lookup="row">velocities/mach</independentVar>
    <independentVar lookup="column">atmosphere/density-altitude</independentVar>
    <tableData>
           0         5000      10000     15000     20000
     0.15  0.928143  0.770486  0.635169  0.519833  0.422478 
     0.30  0.909253  0.754502  0.621910  0.508935  0.413578  
     0.50  0.958112  0.794824  0.654967  0.535816  0.435192
     0.65  1.053106  0.873471  0.719629  0.588490  0.477876  
     0.85  1.160269  1.038939  0.868022  0.709820  0.576139   
    </tableData>
   </table>
  </function>

</turbine_engine>

The engine file is included in the aero model as follows:

<propulsion>
        <engine file="Old_HSTD_Engine">
            <location unit="IN">
                <x> 102 </x>
                <y> 0 </y>
                <z> 0 </z>
            </location>
            <orient unit="DEG">
                <roll> 0.0 </roll>
                <pitch> 0 </pitch>
                <yaw> 0 </yaw>
            </orient>
            <feed>0</feed>
            <thruster file="Direct">
                <location unit="IN">
                    <x> 1 </x>
                    <y> 0 </y>
                    <z> 0 </z>
                </location>
                <orient unit="DEG">
                    <roll> 0.0 </roll>
                    <pitch> 0.0 </pitch>
                    <yaw> 0.0 </yaw>
                </orient>
                <p_factor>1.0</p_factor>
            </thruster>
        </engine>
        <tank type="FUEL">    <!-- Tank number 0 --> 
            <location unit="IN">
                <x> 55.90 </x>
                <y> 0 </y>
                <z> 0 </z>
            </location>
            <capacity unit="LBS"> 14 </capacity>
            <contents unit="LBS"> 14 </contents>
        </tank>
    </propulsion>

Avoid a need of use different PX4 firmware branch to run FG multi-vehicle simulation

The current Firmware master branch could be only used with more complicated multi-vehicle startup script.

The branch difference is in sitl_run.sh and sitl_run_multi.sh scripts.

The supposed best solution is a merge of sitl_run.sh and sitl_run_multi.sh into one script (probably sitl_run.sh) which checks the presence of the PX4_ID variable. The new sitl_run.sh script should decide its behavior according to the single or multi-vehicle simulation required. In the case the requirement of multi-vehicle simulation is detected automatically the special target __multi is not needed.

Primary EKF changed X (unhealthy) -> X

A suspicious warning message emerged in the terminal after running the simulation.

image

The effect on simulator performance is unknown to me. It seems to works correctly.

Ubuntu bionic flightgear SITL failure

On Ubuntu 18.04, on a fresh system, flight gear SITL fails with the following error:

Running fgfs separately runs fine

INFO  [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO  [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
INFO  [logger] logger started (mode=all)
INFO  [logger] Start file log (type: full)
INFO  [logger] Opened full log file: ./log/2020-05-02/11_18_50.ulg
INFO  [mavlink] MAVLink only on localhost (set param MAV_BROADCAST = 1 to enable network)
INFO  [px4] Startup script returned successfully
pxh>     0.20 [INFO]:OSG        Error: Not able to create requested visual.
    0.21 [ALRT]:view       getDefaultWindow: failed to create GraphicsContext
    0.21 [INFO]:OSG        Error: Not able to create requested visual.
    0.21 [ALRT]:view       getDefaultWindow: failed to create GraphicsContext
    0.21 [WARN]:view       CameraGroup::buildGUICamera: failed to build a window
    0.21 [WARN]:general    Enabling ATI/AMD viewport hack
    0.21 [INFO]:general    Configuration State
    0.21 [INFO]:general    ============= =====
    0.21 [INFO]:general    aircraft-dir = "/home/jaeyoung/src/Firmware/Tools/flightgear_bridge/models/FlightGear-Rascal"
    0.21 [INFO]:general    fghome-dir = "Path "/home/jaeyoung/.fgfs""
    0.21 [INFO]:general    download-dir = "/home/jaeyoung/.fgfs"
    0.21 [INFO]:general    terrasync-dir = "/home/jaeyoung/.fgfs/TerraSync"
    0.21 [INFO]:general    aircraft-search-paths = 
	/home/jaeyoung/src/Firmware/Tools/flightgear_bridge/models
    0.21 [INFO]:general    scenery-search-paths = 
	/home/jaeyoung/.fgfs/TerraSync
PX4 Communicator: PX4 Connected.
Bridge: Signal SIGINT recieve

Flight gear version:

$ fgfs --version
    0.00 [INFO]:general    FlightGear:  Version 2019.1.1
    0.00 [INFO]:general    FlightGear:  Build Type Dev
    0.00 [INFO]:general    Built with GNU C++ version 7.4
    0.00 [INFO]:general    Jenkins number/ID 0:none
    0.05 [WARN]:gui        Failed to load default (en) translations
    0.05 [INFO]:general    platform default fg_root = Path "/usr/share/games/flightgear"
    0.05 [INFO]:general    Reading global defaults
    0.05 [INFO]:input      Reading user settings from Path "/home/jaeyoung/.fgfs/autosave_2019_1.xml"
    0.05 [INFO]:general    init package root at:Path "/home/jaeyoung/.fgfs/Aircraft"
    0.05 [INFO]:input      No user specified aircraft, using default
    0.05 [INFO]:general    Loading aircraft -set file from:Path "/usr/share/games/flightgear/Aircraft/c172p/c172p-set.xml"
    0.07 [INFO]:general    Found language resource for: en_US
    0.07 [INFO]:general    Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/default/sys.xml"
    0.07 [INFO]:general    Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/default/atc.xml"
    0.07 [INFO]:general    Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/default/tips.xml"
    0.07 [INFO]:general    	option:version = 
    0.07 [INFO]:general    Using default download dir: Path "/home/jaeyoung/.fgfs"
    0.07 [WARN]:general    read-allowed path not found:Path "/home/jaeyoung/.fgfs/AI"
    0.07 [WARN]:general    read-allowed path not found:Path "/home/jaeyoung/.fgfs/Liveries"
    0.07 [INFO]:general    Using default texture cache directory: Path "/home/jaeyoung/.fgfs/TextureCache"
    0.07 [INFO]:general    Using TerraSync dir: Path "/home/jaeyoung/.fgfs/TerraSync"
FlightGear version: 2019.1.1
Revision: none
Build-Id: none
Build-Type: Dev
FG_ROOT=/usr/share/games/flightgear
FG_HOME=/home/jaeyoung/.fgfs
FG_SCENERY=/home/jaeyoung/.fgfs/TerraSync:/usr/share/games/flightgear/Scenery
SimGear version: 2019.1.1
OSG version: 3.4.1
PLIB version: 185
    0.07 [INFO]:io         Saving user settings to Path "/home/jaeyoung/.fgfs/autosave_2019_1.xml"
    0.07 [WARN]:general    SGSubsystemMgr::remove: not found: scenery

Ubuntu 18.04 VmWare flightgear SITL failure

On Ubuntu 18.04, on a fresh system on virtual machine, flight gear SITL fails with the following error:
When running, a black screen turns on and off, but running fgfs separately runs fine

make px4_sitl_nolockstep flightgear_rascal
[0/4] Performing build step for 'flightgear_bridge'
ninja: no work to do.
[3/4] cd /home/yusuf/src/Firmware/build/px4_sitl_nolockstep/tmp && /home/yusuf/src/Fi...scal none /home/yusuf/src/Firmware /home/yusuf/src/Firmware/build/px4_sitl_nolockstep
SITL ARGS
sitl_bin: /home/yusuf/src/Firmware/build/px4_sitl_nolockstep/bin/px4
debugger: none
program: flightgear
model: rascal
world: none
src_path: /home/yusuf/src/Firmware
build_path: /home/yusuf/src/Firmware/build/px4_sitl_nolockstep
FG setup
0.07 [INFO]:gui UI languages: ("en-US")
0.07 [INFO]:gui Loaded translations for locale "en_US"
0.07 [INFO]:general FlightGear: Version 2020.1.1
0.07 [INFO]:general FlightGear: Build Type Dev
0.07 [INFO]:general Built with GNU C++ version 7.5
0.07 [INFO]:general Jenkins number/ID 0:none
0.07 [INFO]:general platform default fg_root = Path "/usr/share/games/flightgear"
0.08 [INFO]:input Reading user settings from Path "/home/yusuf/.fgfs/autosave_2020_1.xml"
0.08 [INFO]:general init package root at:Path "/home/yusuf/.fgfs/Aircraft"
0.08 [INFO]:input No user specified aircraft, using default
0.08 [INFO]:general Loading aircraft -set file from:Path "/usr/share/games/flightgear/Aircraft/c172p/c172p-set.xml"
0.10 [INFO]:general Found language resource for: en_US
0.10 [INFO]:general Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/default/sys.xml"
0.10 [INFO]:general Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/default/atc.xml"
0.10 [INFO]:general Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/default/tips.xml"
0.10 [INFO]:general option:version =
0.10 [INFO]:general Using default download dir: Path "/home/yusuf/.fgfs"
0.10 [INFO]:general Using default texture cache directory: Path "/home/yusuf/.fgfs/TextureCache"
0.10 [INFO]:general Using TerraSync dir: Path "/home/yusuf/.fgfs/TerraSync"
0.12 [INFO]:io Saving user settings to Path "/home/yusuf/.fgfs/autosave_2020_1.xml"
0.12 [WARN]:general SGSubsystemMgr::remove: not found: scenery
None
Rascal110-YASim
https://github.com/ThunderFly-aerospace/FlightGear-Rascal/archive/master.zip
5 /controls/flight/aileron -1
7 /controls/flight/elevator -1
2 /controls/flight/rudder 1
4 /controls/engines/engine/throttle 1
fgfs --aircraft=Rascal110-YASim --fg-aircraft=./models --enable-terrasync --timeofday=noon --disable-sound --telnet=15400 --generic=socket,out,100,127.0.0.1,15200,udp,FGtoPX4 --generic=socket,in,100,,15300,udp,PX4toFG --model-hz=120 --disable-random-objects --prop:/sim/rendering/texture-compression=off --prop:/sim/rendering/quality-level=0 --prop:/sim/rendering/shaders/quality-level=0 --disable-ai-traffic --prop:/sim/ai/enabled=0 --prop:/sim/rendering/random-vegetation=0 --prop:/sim/rendering/random-buildings=0 --disable-specular-highlight --disable-ai-models --disable-clouds --disable-clouds3d --fog-fastest --visibility=2000 --disable-distance-attenuation --disable-real-weather-fetch --prop:/sim/rendering/particles=0 --prop:/sim/rendering/multi-sample-buffers=1 --prop:/sim/rendering/multi-samples=2 --prop:/sim/rendering/draw-mask/clouds=false --prop:/sim/rendering/draw-mask/aircraft=true --prop:/sim/rendering/draw-mask/models=true --prop:/sim/rendering/draw-mask/terrain=true --disable-random-vegetation --disable-random-buildings --disable-rembrandt --disable-horizon-effect & echo $! > /tmp/px4fgfspid_0
SITL COMMAND: "/home/yusuf/src/Firmware/build/px4_sitl_nolockstep/bin/px4" "/home/yusuf/src/Firmware"/ROMFS/px4fmu_common -s etc/init.d-posix/rcS -t "/home/yusuf/src/Firmware"/test_data
INFO [px4] Creating symlink /home/yusuf/src/Firmware/ROMFS/px4fmu_common -> /home/yusuf/src/Firmware/build/px4_sitl_nolockstep/tmp/rootfs/etc


| ___ \ \ \ / / / |
| |/ / \ V / / /| |
| __/ / \ / /
| |
| | / /^\ \ ___ |
_| / / |_/

px4 starting.

INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
I'm Mavlink to FlightGear Bridge
Targed Bridge Freq: 200, send data every step: 1
4
5 -1
7 -1
2 1
4 1
INFO [param] selected parameter default file eeprom/parameters_1033
[param] Loaded: eeprom/parameters_1033
INFO [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
INFO [simulator] Waiting for simulator to accept connection on TCP port 4560
INFO [simulator] Simulator connected on TCP port 4560.
INFO [commander] LED: open /dev/led0 failed (22)
0.06 [INFO]:gui UI languages: ("en-US")
0.06 [INFO]:gui Loaded translations for locale "en_US"
0.06 [INFO]:general FlightGear: Version 2020.1.1
0.06 [INFO]:general FlightGear: Build Type Dev
0.06 [INFO]:general Built with GNU C++ version 7.5
0.06 [INFO]:general Jenkins number/ID 0:none
0.06 [INFO]:general platform default fg_root = Path "/usr/share/games/flightgear"
0.07 [INFO]:input Reading user settings from Path "/home/yusuf/.fgfs/autosave_2020_1.xml"
0.07 [INFO]:general init package root at:Path "/home/yusuf/.fgfs/Aircraft"
0.07 [INFO]:input aircraft = Rascal110-YASim
0.07 [INFO]:general Loading aircraft -set file from:Path "/home/yusuf/src/Firmware/Tools/flightgear_bridge/models/Rascal/Rascal110-YASim-set.xml"
0.07 [INFO]:general Found language resource for: en_US
0.07 [INFO]:general Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/default/sys.xml"
0.07 [INFO]:general Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/default/atc.xml"
0.07 [INFO]:general Reading localized strings for 'en' from Path "/usr/share/games/flightgear/Translations/default/tips.xml"
0.07 [INFO]:general option:aircraft = Rascal110-YASim
0.07 [INFO]:general option:fg-aircraft = ./models
0.07 [INFO]:general option:enable-terrasync =
0.07 [INFO]:general option:timeofday = noon
0.07 [INFO]:general option:disable-sound =
0.07 [INFO]:general Channel string = 15400
0.07 [INFO]:general option:telnet = 15400
0.07 [INFO]:general Channel string = socket,out,100,127.0.0.1,15200,udp,FGtoPX4
0.07 [INFO]:general option:generic = socket,out,100,127.0.0.1,15200,udp,FGtoPX4
0.07 [INFO]:general Channel string = socket,in,100,,15300,udp,PX4toFG
0.07 [INFO]:general option:generic = socket,in,100,,15300,udp,PX4toFG
0.07 [INFO]:general option:model-hz = 120
0.07 [INFO]:general option:disable-random-objects =
0.07 [INFO]:general option:prop = /sim/rendering/texture-compression=off
0.07 [INFO]:general option:prop = /sim/rendering/quality-level=0
0.07 [INFO]:general option:prop = /sim/rendering/shaders/quality-level=0
0.07 [INFO]:general option:disable-ai-traffic =
0.07 [INFO]:general option:prop = /sim/ai/enabled=0
0.07 [INFO]:general option:prop = /sim/rendering/random-vegetation=0
0.07 [INFO]:general option:prop = /sim/rendering/random-buildings=0
0.07 [INFO]:general option:disable-specular-highlight =
0.07 [INFO]:general option:disable-ai-models =
0.07 [INFO]:general option:disable-clouds =
0.07 [INFO]:general option:disable-clouds3d =
0.07 [INFO]:general option:fog-fastest =
0.07 [INFO]:general option:visibility = 2000
0.07 [INFO]:general option:disable-distance-attenuation =
0.07 [INFO]:general option:disable-real-weather-fetch =
0.07 [INFO]:general option:prop = /sim/rendering/particles=0
0.07 [INFO]:general option:prop = /sim/rendering/multi-sample-buffers=1
0.07 [INFO]:general option:prop = /sim/rendering/multi-samples=2
0.07 [INFO]:general option:prop = /sim/rendering/draw-mask/clouds=false
0.07 [INFO]:general option:prop = /sim/rendering/draw-mask/aircraft=true
0.07 [INFO]:general option:prop = /sim/rendering/draw-mask/models=true
0.07 [INFO]:general option:prop = /sim/rendering/draw-mask/terrain=true
0.07 [INFO]:general option:disable-random-vegetation =
0.07 [INFO]:general option:disable-random-buildings =
0.07 [INFO]:general option:disable-rembrandt =
0.07 [INFO]:general option:disable-horizon-effect =
0.07 [INFO]:general Using default download dir: Path "/home/yusuf/.fgfs"
0.07 [INFO]:general Using default texture cache directory: Path "/home/yusuf/.fgfs/TextureCache"
0.07 [INFO]:general Using TerraSync dir: Path "/home/yusuf/.fgfs/TerraSync"
0.07 [INFO]:general EmbeddedResourceManager: selected locale 'en_US'
0.07 [INFO]:opengl Using stock OSG implementation of GraphicsWindow
StatsHandler::StatsHandler() Setting up GL2 compatible shaders
0.07 [INFO]:astro initializing cloud layers
Now checking for plug-in osgPlugins-3.4.1/osgdb_nvtt.so
INFO [init] Mixer: etc/mixers-sitl/plane_sitl.main.mix on /dev/pwm_output0
INFO [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
INFO [airspeed_selector] No airspeed sensor detected. Switch to non-airspeed mode.
0.11 [INFO]:OSG Error: Not able to create requested visual.
0.11 [ALRT]:view getDefaultWindow: failed to create GraphicsContext
0.12 [INFO]:OSG Error: Not able to create requested visual.
0.12 [ALRT]:view getDefaultWindow: failed to create GraphicsContext
0.12 [WARN]:view CameraGroup::buildGUICamera: failed to build a window
0.12 [WARN]:general Enabling ATI/AMD viewport hack
0.12 [INFO]:general Configuration State
0.12 [INFO]:general ============= =====
0.12 [INFO]:general aircraft-dir = "/home/yusuf/src/Firmware/Tools/flightgear_bridge/models/Rascal"
0.12 [INFO]:general fghome-dir = "Path "/home/yusuf/.fgfs""
0.12 [INFO]:general download-dir = "/home/yusuf/.fgfs"
0.12 [INFO]:general terrasync-dir = "/home/yusuf/.fgfs/TerraSync"
0.12 [INFO]:general aircraft-search-paths =
/home/yusuf/src/Firmware/Tools/flightgear_bridge/models
0.12 [INFO]:general scenery-search-paths =
/home/yusuf/.fgfs/TerraSync
/usr/share/games/flightgear/Scenery
INFO [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
INFO [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
INFO [logger] logger started (mode=all)
INFO [logger] Start file log (type: full)
INFO [logger] [logger] ./log/2020-07-03/20_10_50.ulg
INFO [logger] Opened full log file: ./log/2020-07-03/20_10_50.ulg
INFO [mavlink] MAVLink only on localhost (set param MAV_BROADCAST = 1 to enable network)
INFO [px4] Startup script returned successfully
pxh> PX4 Communicator: PX4 Connected.

Improve noise injection model

The current implementation has a simple Gaussian noise model injected to the sensor inputs.

This simplified model could possibly bring problems with unrealistic sensor readout. This may result in unpredictable behavior, which could be the primary problem of other issues:

  • #10 - flyaway, which is probably caused by multiple bugs occurring at the same time. The PX4 itself should be resistant to this.

The solution of this issue is the implementation of similar noise model, which is used in Gazebo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.