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

mavros global_position topic not publishing

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

newtoros gravatar image

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

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]

ROS_MASTER_URI=http://localhost:11311

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

/diagnostics

/mavlink/from

/mavlink/to

/mavros/actuator_control

/mavros/battery

/mavros/cam_imu_sync/cam_imu_stamp

/mavros/global_position/compass_hdg

/mavros/global_position/global

/mavros/global_position/local

/mavros/global_position/raw/fix

/mavros/global_position/raw/gps_vel

/mavros/global_position/rel_alt

/mavros/imu/atm_pressure

/mavros/imu/data

/mavros/imu/data_raw

/mavros/imu/mag

/mavros/imu/temperature

/mavros/local_position/local

/mavros/manual_control/control

/mavros/mission/waypoints

/mavros/mocap/pose

/mavros/px4flow/ground_distance

/mavros/px4flow/raw/optical_flow_rad

/mavros/px4flow/temperature

/mavros/radio_status

/mavros/rc/in

/mavros/rc/out

/mavros/rc/override

/mavros/setpoint_accel/accel

/mavros/setpoint_attitude/att_throttle

/mavros/setpoint_attitude/attitude

/mavros/setpoint_attitude/cmd_vel

/mavros/setpoint_position/local

/mavros/setpoint_velocity/cmd_vel

/mavros/state

/mavros/time_reference

/mavros/vfr_hud

/mavros/vision_pose/pose

/mavros/vision_speed/speed_vector

/mavros/wind_estimation

/rosout

/rosout_agg

/tf

/tf_static


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


header:

seq: 594

stamp:

secs: 1449742645

nsecs: 599718628

frame_id: fcu

status:

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
0

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

vooon gravatar image

You do not have GPS Fix.

Tip: see diagnostics first before asking questions!

edit flag offensive delete link more

Comments

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 -0600 )edit

The following is the roslaunch full output

http://pastebin.com/yqRBepPk

newtoros gravatar image newtoros  ( 2015-12-28 01:58:35 -0600 )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 -0600 )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 -0600 )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 -0600 )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 -0600 )edit

Question Tools

Stats

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

Seen: 3,244 times

Last updated: Dec 28 '15