Enable FlightGear view in sim_vehicle.py (#26540)
Fixes #26540
we will need a new sim_vehicle.py command line option, and update the wiki docs
Was this ever completed? In short, can we, or can we not integrate FlightGear with ArduPilot and Mission Planner? The documentation found here: https://ardupilot.org/dev/docs/setting-up-sitl-on-linux.html#start-sitl-simulator does not mention FlightGear is no longer an option. Any help on this would be greatly appreciated, and I appreciate all of your hard work on the repo.
@ugol-1 are you going to implement that command-line option? Looks like there's interest in fixing the fgview stuff.
@ugol-1 are you going to implement that command-line option? Looks like there's interest in fixing the fgview stuff.
I can do this, yes.
@ugol-1 are you going to implement that command-line option? Looks like there's interest in fixing the fgview stuff.
I can do this, yes.
I would be immensely grateful for this, so please and thank you if you can do this! My team and I are working on the ArduPilot suite, and we would greatly benefit from having the FG visualization alongside Mission Planner.
Hi all. Just checking back in to see if there is or can be a projected timeline for this commit? As mentioned, my team and I are actively working on development in this space and would greatly benefit from having the FG visualization available again. I have attempted to adjust the code locally but created more issues than I solved, so I was hoping this could be pushed through soon.
Alternatively, if there is a local side 'fix' that someone could walk me through, I would be more than happy to implement that while the commit is being processed/accepted. As before, we greatly appreciate all of your hard work on ArduPilot, and I appreciate the continued responsiveness of those here. Thanks!
Hi all. Just checking back in to see if there is or can be a projected timeline for this commit? As mentioned, my team and I are actively working on development in this space and would greatly benefit from having the FG visualization available again. I have attempted to adjust the code locally but created more issues than I solved, so I was hoping this could be pushed through soon.
Alternatively, if there is a local side 'fix' that someone could walk me through, I would be more than happy to implement that while the commit is being processed/accepted. As before, we greatly appreciate all of your hard work on ArduPilot, and I appreciate the continued responsiveness of those here. Thanks!
Hello @justin-slattery , I am not an ArduPilot developer/maintainer, I am just an ordinary guy like probably you are ) If you just want a quick fix then simply apply this PR. @tridge believes that to properly fix the issue an extra option needs to be added to sim_vehicle.py, which must be pretty easy, but ArduPilot is not my main project, and I will make it when I have time, so I can not promise anything, sorry.
But again, if you just want to make FG work again -- this is a matter of adding 1 line, which is this PR. It is just adding one extra option --enable-fgview to arduplane or arducopter command line. If you run it directly (without sim_vehicle.py), all you need to do is add this option.
Hi all. Just checking back in to see if there is or can be a projected timeline for this commit? As mentioned, my team and I are actively working on development in this space and would greatly benefit from having the FG visualization available again. I have attempted to adjust the code locally but created more issues than I solved, so I was hoping this could be pushed through soon. Alternatively, if there is a local side 'fix' that someone could walk me through, I would be more than happy to implement that while the commit is being processed/accepted. As before, we greatly appreciate all of your hard work on ArduPilot, and I appreciate the continued responsiveness of those here. Thanks!
Hello @justin-slattery , I am not an ArduPilot developer/maintainer, I am just an ordinary guy like probably you are ) If you just want a quick fix then simply apply this PR. @tridge believes that to properly fix the issue an extra option needs to be added to
sim_vehicle.py, which must be pretty easy, but ArduPilot is not my main project, and I will make it when I have time, so I can not promise anything, sorry.But again, if you just want to make FG work again -- this is a matter of adding 1 line, which is this PR. It is just adding one extra option
--enable-fgviewtoarduplaneorarducoptercommand line. If you run it directly (withoutsim_vehicle.py), all you need to do is add this option.
Hi all. Just checking back in to see if there is or can be a projected timeline for this commit? As mentioned, my team and I are actively working on development in this space and would greatly benefit from having the FG visualization available again. I have attempted to adjust the code locally but created more issues than I solved, so I was hoping this could be pushed through soon. Alternatively, if there is a local side 'fix' that someone could walk me through, I would be more than happy to implement that while the commit is being processed/accepted. As before, we greatly appreciate all of your hard work on ArduPilot, and I appreciate the continued responsiveness of those here. Thanks!
Hello @justin-slattery , I am not an ArduPilot developer/maintainer, I am just an ordinary guy like probably you are ) If you just want a quick fix then simply apply this PR. @tridge believes that to properly fix the issue an extra option needs to be added to
sim_vehicle.py, which must be pretty easy, but ArduPilot is not my main project, and I will make it when I have time, so I can not promise anything, sorry.But again, if you just want to make FG work again -- this is a matter of adding 1 line, which is this PR. It is just adding one extra option
--enable-fgviewtoarduplaneorarducoptercommand line. If you run it directly (withoutsim_vehicle.py), all you need to do is add this option.
Hi all,
Updating here. First off, thanks very much for the continued conversation here. I managed to implement the fix for anyone who wants to do this locally:
in sim_vehicle.py, add the following at line 837:
if opts.enable_fgview:
cmd.append("--enable-fgview")
Then, at line 1346, which is within the parse options for simulation, add the following:
group_sim.add_option("--enable-fgview",
action='store_true',
default=False,
help="Enable FlightGear view")
This will allow you to add --enable-fgview in your sim_vehicle.py command line call, and with fg running, it will visualize your vehicle's simulation properly.
Updating here. First off, thanks very much for the continued conversation here. I managed to implement the fix for anyone who wants to do this locally:
in sim_vehicle.py, add the following at line 837:
if opts.enable_fgview: cmd.append("--enable-fgview")Then, at line 1346, which is within the parse options for simulation, add the following:
group_sim.add_option("--enable-fgview", action='store_true', default=False, help="Enable FlightGear view")This will allow you to add --enable-fgview in your sim_vehicle.py command line call, and with fg running, it will visualize your vehicle's simulation properly.
Thank you for your fix @justin-slattery ! I have added it in this commit: b1fb4f340a51e8463074520b469e41331e6813b7
@tridge the option to enable FlightGear view has been added to sim_vehicle.py thanks to @justin-slattery . Please take another look.
Updating here. First off, thanks very much for the continued conversation here. I managed to implement the fix for anyone who wants to do this locally: in sim_vehicle.py, add the following at line 837:
if opts.enable_fgview: cmd.append("--enable-fgview")Then, at line 1346, which is within the parse options for simulation, add the following:
group_sim.add_option("--enable-fgview", action='store_true', default=False, help="Enable FlightGear view")This will allow you to add --enable-fgview in your sim_vehicle.py command line call, and with fg running, it will visualize your vehicle's simulation properly.
Thank you for your fix @justin-slattery ! I have added it in this commit: b1fb4f3
@tridge the option to enable FlightGear view has been added to
sim_vehicle.pythanks to @justin-slattery . Please take another look.
Thank you all very much for your continued conversation and development efforts!
All the best,
Justin
@ugol-1 sorry for the delay in getting to this!
I've rolled this change into my PR over here: https://github.com/ArduPilot/ardupilot/pull/27993 which also adds the option to autotest.py
Thanks for doing this!
Closing this one now as I've merged the combined-fix PR.
Thanks for everybody's efforts here - esp. @ugol-1 for the patches :-)