PX4 Community Q&A: June 28, 2023

My end goal it to use NAV2 on a Jetson Nano to have a drone navigate around obstacles in a 2D plane. I need to simulate a depth camera and eventually a lidar before I put this on a real system.

I’m having a difficult time simulating PX4 with ROS2. There are plenty of tutorials on simulating with ROS2 and Gazebo, and I understand how to simulate my own sitl with PX4, but I can’t get ROS2 to play with my PX4 Gazebo simulations. I want to be able to import my own models and worlds. I know the docs explain how to do it but I feel like I am fighting Gazebo at every turn because it usually doesn’t do what the docs say it will do.

I know about ros/gazebo bridge packages, but I can’t get gazebo set up how I want for me to be able to really use those.

I’ve been told that you can open your own instance of gazebo and then open a px4 instance and it will spawn the model in your first instance, but that didn’t work for me. The two just ran separately like the other wasn’t there.

Here’s a link to the discord discussion on it.

I’m new to ROS2 and PX4 and have only been working with them for about two months. These issues with simulation feel a little overwhelming. If someone would be willing to hop on a call after the Q&A call after we talk about this a little I would really appreciate it.

I’m running this using ROS2 Humble on Ubuntu 22.04. I’ve tried using both Gazebo and Gazebo Classic and ran into similar issues on both.

Thank you! I really appreciate the help!