[mavros_posix_sitl.launch] is neither a launch file in package [px4] nor is [px4] a launch file name

When running

roslaunch px4 mavros_posix_sitl.launch

It cannot find the px4

However, the tutorial told us to add the .bashrc file

I notice the newest PX4-Autopilot change the setup_gazebo.bash into the folder gazebo-classic/

Thus, you have to manually change the path to gazebo/ to gazebo-classic/ like the below picture
you can just use bash, instead of zsh. The reason why I use zsh is just for recording commands

Although changed the source and export, it can find px4 but still cannot find other source

Then, I try to add the below line into .zshrc file

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/Firmware/Tools/sitl_gazebo

Then, it can run roslaunch px4 mavros_posix_sitl.launch but shows an error

Some people have the similar issue and cannot find the source


Last, I find an solution by source file , according to this ROS with Gazebo Simulation | PX4 User Guide

but I need to do some modification to run it , like below screenshot
The reason is the latest PX4-autopilot change its gazebo folder name into gazebo-classic

source Tools/simulation/gazebo-classic/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/simulation/gazebo-classic/sitl_gazebo-classic

My platform is ubuntu 18.04 and python version is 3.6.9

Then, I can successfully run

roslaunch px4 mavros_posix_sitl.launch


rostopic echo /mavros/imu/data

roslaunch px4 mavros_posix_sitl.launch

follows 2 small error.
One is Error [Converter.cc:151] Unable to convert from SDF version 1.7 to 1.6


I solved it by editing sdf file version from 1.7 to 1.6

The other error is

[ERROR] [1674526819.464722103, 51.024000000]: TM : Time jump detected. Resetting time synchroniser.

There is warning about too many subscription

WARN  [logger] Too many subscriptions, failed to add: estimator_aid_src_ev_vel 5