A graphical OSD simulation in a separate window can be opened by adding the following option to sim_vehicle.py:
–osd
How does a person “add the following option” to sim_vehicle.py ??
This is what I am doing…
Start Mission Planner
Select SIMULATION
Click on MULTIROTOR
Simulation starts
I have found the sim_vehicle_py file…I assume I am supposed to add the text “–osd” somewhere in that file? Then save the file and restart the simulator?
Or do I enter “–osd” into the EXTRA COMMAND LINE box at the bottom of the simulator page?
Neither of those have worked for me…so I am apparently missing something. (Sure wish the Ardupilot/OSD page could explain the process better for dolts like me.)
So I found this bit of code (below)…where do I add “- - osd” ?
Thanks…
define and run parser
parser = CompatOptionParser(
“sim_vehicle.py”,
epilog=""
"eeprom.bin in the starting directory contains the parameters for your "
"simulated vehicle. Always start from the same directory. It is "
"recommended that you start in the main vehicle directory for the vehicle "
"you are simulating, for example, start in the ArduPlane directory to "
“simulate ArduPlane”)
Then Windows asks with what program I want to open.
I select Mission Planner.
Mission Planner opens.
I select the simulation tab, click on multicopter.
Mission Planner downloads the SITL software (I wonder why it does that every time?).
The simulation starts…
But the OSD display is nowhere to be found.
Look I guess there is something quite basic here that I am not understanding.
The other thing is that I’ve discovered the OSD GUI section in Mission Planner when my vehicle is plugged in/connected…so maybe there is no need to go down this command line road anymore?
Following up on this old thread… the instructions above are for Linux where the original question is on Windows. I am having the same issue on Windows, where sim_vehicle.py doesn’t actually run because of many missing dependencies. I Noticed that Mission Planner runs its own sim_vehicle through ArduCopter.exe but I can’t find any way to pass --osd to ArduCopter in a way that it launches sim_vehicle.py correctly. Any advice?
As I understood, looking at scripts and doing test…SITL OSD needs SFML libraries that are not available under cygwin.
In turn …WSL (Windows Subsystem for Linux) has a different network “box”, like VirtualBox, and is quite unstable at present, graphics panels/windows disappear, once in a while. There is a workaround explained somewhere googling, but is quite complex sequence of ops to do.
Moreover …
joystick on Linux in turn … relays on SFML that does not map all kind of joysticks, it is a bit limited, so
finally I got into a kind of “dead-lock”::
1)If You choose Ms-Windows You loose OSD on cygwin
2)if You choose WSL , than You need to specify IP addresses between GCS, FlightGear and SITL like Vmbox, in practice You are working with different virtual machines on same PC
3)If You choose Linux You loose full joystick feature ( I cannot map all my Taranis switches, SFML maps only 8 axis, for me actually 6 are usable).
What I found interesting is that:
1)MPlanner under MS-Windows can be used for joystick commands toward Sitl
2)Under Linux joystick must be handled by Sitl directly (through SFML), not by MPlanner.
So… this is why for ardupilot/arducopter many guys complain that joystick seems “dead” under Linux !!.
Conclusion:
All of this concerns are related to --osd and --sfml options for using python script, because
what I realized a bit late, is that sim_vehicle.py does compile SITL, and passes build options to SITL binary build system.
If You pay attention to console log while building, You notice that some errors on console log show SFML missing libraries…
I experimented to compile SFML under cygwin, but build immediately fails because it is necessary to check and adapt all source code to cygwin, at least for “udev” and “joystick” SFML features.
In theory I think it is possible to complete this task, but at present I have no time to carry on it.