Should VSCode LAUNCH Gazebo?

Visual Studio Code IDE (VSCode) | PX4 User Guide as seen here. It does not seem to launch a Gazebo Window for me.

It should. What PX4 version are you running on what platform? Is “anything” happening?

1.13.1. Ill send you screenshot. PX4 boots, but Gazebo never comes up.

Attach screenshot here. I probably can’t help you - what you want to do is provide enough information that someone can.

Understood.

I was following the debugging/VSCode instructions here:

Node that my screenshots differ slightly than the documentation in that I dont have a px4_sitl (debug) option nor a SITL (Gazebo iris) option exactly. I am unsure if that matters. Additionally, it is clear (see screenshots) that PX4 starts and gazebo seems to start in the terminal, but the Gazebo UI never launches.



Additionally it says empty world and it must be loading some generic vehicle. How do I specify a specific one I want to use?

Honestly I don’t know - I always run stuff from command line. @MaEtUgR or @Jaeyoung-Lim Is this something you can advise on?

@rdehart Thanks for the insightful screenshots. I quickly gave it a spin myself on main from today and like you described I do not get a gazebo visualization window. I’m pretty sure that worked before since @dagar showed me and I did not have any issue then. Maybe it broke when quite some things changed when enabling new gazebo in merge px4_sitl_ign into px4_sitl_default by dagar · Pull Request #20188 · PX4/PX4-Autopilot · GitHub maybe somewhere close to here where the commands changed: merge px4_sitl_ign into px4_sitl_default (#20188) · PX4/PX4-Autopilot@b8fb5df · GitHub
I honestly (still) run the simulation by executing the commands e.g. make px4_sitl gazebo from the embedded terminal in VS code which works like expected but of course doesn’t give you all the nice debug tools :grimacing:

We need to have a look why the visualization is suddenly missing. Did you try different versions? That might just give a hint. I just saw that on 1.13 the launch structure was still different: PX4-Autopilot/launch_sim.json.in at release/1.13 · PX4/PX4-Autopilot · GitHub

1 Like

@rdehart and @MaEtUgR
Not sure if this is still relevant, but I think the problem is that the gazebo client task is never executed.

If you run the gazebo client task afterwards it works for me.

Here is how to do it:

  1. Run everything just like you did in your screenshots
  2. hit ctrl-p in vs code to access the quick open command line
  3. type task gazebo client and hit enter. This will open the gzclient graphical interface which is connected to your running simulation