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:
kevin@chenqirongdeMacBook-Pro ~ % cd Firmware
kevin@chenqirongdeMacBook-Pro Firmware % make px4_sitl_nolockstep flightgear_rascal-electric
[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-electric
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: ‘fgfs’: 'fgfs’
FAILED: platforms/posix/CMakeFiles/flightgear_rascal-electric
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-electric none /Users/kevin/Firmware /Users/kevin/Firmware/build/px4_sitl_nolockstep
ninja: build stopped: subcommand failed.
make: *** [px4_sitl_nolockstep] Error 1

You should be able to start it from command line by right clicking on the fgfs icon and doing “Show package contents”. and look for the binary inside of there. Then you remember that path and use it to start from command line.

Yes ,I have found the “fgfs” in the package(/Applications/FlightGear.app/Contents/MacOS/fgfs)
And how could I make the px4 to start with the command:
make px4_sitl_nolockstep flightgear_rascal

I have tried the command with the specific path:
FG_BINARY="-- Applications/FlightGear.app/Contents/MacOS/fgfs" make px4_sitl_nolockstep flightgear_rascal

And it turns out to be errors:
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

Did you put in:
Applications/FlightGear.app/Contents/MacOS/fgfs ?

You need to add a / in front of it to make it an absolute path:
/Applications/FlightGear.app/Contents/MacOS/fgfs

Yes,I have tried,and it still can’t work, :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

@kevindsp Could you post an issue on https://github.com/ThunderFly-aerospace/PX4-FlightGear-Bridge ?

To be clear, MacOS is not officially supported running SITL with flight gear.

@kevindsp why did you add the -- before the path? That’s wrong.