PX4-Autopilot: `make posix_sitl_default gazebo_none_ide` is not a valid build target.

It seems that make posix_sitl_default gazebo_none_ide, as mentioned on https://dev.px4.io/simulation-gazebo.html, is not a valid build target.

Exact error on trying to run make posix_sitl_default gazebo_none_ide on the master branch:

ninja: error: unknown target 'gazebo_none_ide', did you mean 'gazebo_plane_ide'?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (14 by maintainers)

Most upvoted comments

I’m not sure what happened to none, but I actually strongly dislike this system. These shouldn’t be firmware build targets, it’s all the same firmware build. This should be a helper script that lives outside of the build system.

It’s one of those things that was kind of convenient initially, but ended up making something simple actually quite complicated and mysterious. Now we need even more magic helper targets to do things that should be easy like running px4 under gdb. Is that gdb_gazebo_iris, gazebo_iris_gdb, or maybe gazebo_iris__gdb? What a time saver over launching gdb manually (gdb --args ./px4) in a way I can google to figure out.

If we’re going to do anything here I propose we break this apart into the orthogonal pieces that it actually is. If we did it that way it would be trivial to do things like running gazebo on the side, and starting px4 separately in your ide, or under gdb, or valgrind, or under the debugger in your IDE. All without additional magic.

The separate pieces are…

  1. building px4

    • it’s always the same posix_sitl_default PX4 firmware build no matter which estimator or model you want to use. Just build posix_sitl.
  2. building the simulator (sitl_gazebo or jmavsim)

    • these are separate projects that don’t share anything with the firmware build, and run as separate processes. They shouldn’t be part of the PX4 cmake build at all.
  3. running px4

    • all you actually need to do here is select the model (which selects a startup script) and it could even default to the iris. If we hadn’t gone out of our way to make it so complicated this would already work properly when you click run or debug in an ide. This is literally just running the binary (./px4) with optional arguments.
  4. running the simulator

    • in gazebo you need to specify the world, with jmavsim you don’t have a choice.
  5. bringing it altogether

    • now all you actually need to do is start px4 with a simulator and make sure the model is the same on both sides. This could be a very simple script and it should make it obvious how you can do each step manually.
% ./run_sitl.sh --model=iris --simulator=gazebo

    Running PX4:  ./build/posix_sitl_default/px4 
    Running Gazebo:  gzserver Tools/sitl_gazebo/worlds/iris.world

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

px4 starting.

pxh> 


Thoughts?