Px4 gazebo ros installations


I am new to linux, gazebo, ros and px4 and I am conscious this is a lot. However I have faced some issues which might be encountered by other new users like me. I am running Ubuntu 20.04 and

I have followed the site instructions to install gazebo (gazebo 11) and ROS Noetic and tested this successfully. I wish to do SITL simulations with PX4. However, PX4 is not installed yet and I am concerned to have my directories organized well and not have redundant or overlapping directories and environment in various places.

my questions are
is there a particular order I should install PX4, Gazebo and ROS in Ubuntu, in particular can I install PX4 after gazebo and ros and I a proper tree on my computer? if yes, any recommended instruction page
if no, what is the recommended instruction pages to follow?

Thanks in advance

Not the most experienced user, but I can tell you yes, you can install PX4 after you install gazebo and ROS, I would actually suggest installing it after since that makes it easier to test if it is installed correctly.

For installing ROS and gazebo, I normally just go with installing ROS desktop full, since that comes with Gazebo. But of course, then you will also get some more things, which you might not use.

The hardest thing about setting up Gazebo and PX4 is figuring out how to set up your own files for Gazebo, SDF files, world files and so on. How you want to do that is up to you, I normally create a ROS workspace and symlink it to the PX4 version I have on my PC.

Thanks Mr_Madsen and well noted.

Would you be kind to indicate the steps you are following to “simlink the ROS workspace to the PX4 version you have on your PC”.

basically you need several different files if you want to simulate in gazebo. Which files you need depends on what you are simulation. If it is just a standard quadcopter or similar you are simulation no reason to symlink anything. But if you want to make a custom UAv you need to create SDF file, Mixer files, init.d-posix files (not sure what they are actually called) and maybe also world files. Each of them can be created directly in the PX4 folder on your computer or symlinked from a ROS workspace where you create them. If you don’t know what symlink is, google it a bit :slight_smile:

Ok, i think i understand better now. Thanks a lot

No problem, happy to help