ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

mavros global_position topic not publishing

asked 2015-12-10 04:25:32 -0500

newtoros gravatar image

updated 2016-10-24 09:04:04 -0500

ngrennan gravatar image

Hi, I am having problem getting the message published in global_position.

I am using Ubuntu 14.04 Ros Indigo and recently just updated the firmware. I use a pixhawk and 3DR Iris in Hexacopter .

The code I type is

roslaunch mavros px4.launch '

The code displayed is

NODES / mavros (mavros/mavros_node)

auto-starting new master

process[master]: started with pid [3595]


setting /run_id to ed737cc2-9f24-11e5-83d8-605718672f0f

process[rosout-1]: started with pid [3608]

started core service [/rosout]

process[mavros-2]: started with pid [3626]

[1449741666.239332817]: Plugin global_position loaded and initialized

After that I type in

rostopic list

The info displayed are













































But when I type in rostopic echo /mavros/global_position/local there is nothing displaying out same go to other topic in global_position except for global_position/raw/fix and global_position/raw/gps_vel

which the code is shown below


seq: 594


secs: 1449742645

nsecs: 599718628

frame_id: fcu


status: -1

service: 1

latitude: 0.0

longitude: 0.0

altitude: -17.0

position_covariance: [-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

position_covariance_type: 0

May I know why is there still missing messages publishing in global_position where the Plugin global_position loaded and initialized has been successful?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-12 08:20:50 -0500

vooon gravatar image

You do not have GPS Fix.

Tip: see diagnostics first before asking questions!

edit flag offensive delete link more


Even with GPS fix, I am only able to get message published to global_position/raw/gps_vel and global_position/raw/fix but other global_position topics such as global_position/compass_hdg,global_position/rel_alt,global_position/global and global_position/local have no messages published out.

newtoros gravatar image newtoros  ( 2015-12-28 01:55:10 -0500 )edit

The following is the roslaunch full output

newtoros gravatar image newtoros  ( 2015-12-28 01:58:35 -0500 )edit
  1. Pixhawk USB only for ground maintenance and tests. Read about SYS_COMPANION parameter and TELEM2.
  2. Anyway problem on FCU side. Check streams configuration (extras.txt & rc)
  3. FCU: WPM is usual on PX4 with empty mission list.
  4. rostopic echo -n1 /diagnostics
vooon gravatar image vooon  ( 2015-12-28 09:27:50 -0500 )edit

Sorry you are right, I need to have a GPS fix in order to get all messages published out in global message but the weird thing is through direct usb connection with the use of (roslaunch mavros px4.launch) I cannot get all the messages published in global_position even with GPS fix.

newtoros gravatar image newtoros  ( 2016-01-05 01:17:27 -0500 )edit

But through indirect connection with the use of 3DR antenna(roslaunch mavros px4.launch fcu_url:='/dev/ttyUSB0:57600'), I am able to get all the messages published in global_position, thanks a lot.

newtoros gravatar image newtoros  ( 2016-01-05 01:20:34 -0500 )edit

@newtoros I have been working with the 3dr solo as well and I have the same problem. When connected directly with a usb, some of the data is not published. Can you give some more detail on how you did it through the "indirect connection with 3dr antenna"? Thanks!

soloros gravatar image soloros  ( 2017-02-16 12:49:22 -0500 )edit

Question Tools


Asked: 2015-12-10 04:25:32 -0500

Seen: 3,001 times

Last updated: Dec 28 '15