Mavros no GPS

#1

Hi there
I am very new here and am currenty trying to work with mavros.
So i set everything up and it seems quite a lot works. BUT i have a few questions and would be very happy if someone can help me:

When I launch: roslaunch mavros px4.launch I always get the warning: No GPS fix.
And I think because of that, I am not able to ask for local NEDs etc.

I can run: rostopic list and for example: rostopic echo /mavros/state

I am sure that I have a GPS signal (QGC proves it)

What could be my mistake?

And another, very basic question:
When I run: roslaunch mavros px4.launch and then rostopic echo /mavros/state, what are all these headers? Why is it continuosly generating more headers? Why don’t I have one header for my pixhawk?

Thanks a lot!

#2

roslaunch px4 mavros_posix_sitl.launch

Try this command.

#3

Doesn’t work… Tells me that is neither a launch file nor is a launch file name :frowning:

#4

cd Firmware

source ~/catkin_ws/devel/setup.bash
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:/usr/lib/x86_64-linux-gnu/gazebo-9/plugins:/opt/ros/melodic/lib
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/sitl_gazebo

roslaunch px4 mavros_posix_sitl.launch

#5

when i try this i get the following errors:

#6
make px4_sitl_default gazebo
...
after build run previous commands
#7

still got the same errors :frowning:

#8

The package mavlink_sitl_gazebo is in Firmware/Tools/sitl_gazebo . Make sure that ROS_PACKAGE_PATH has the correct path to that folder.