Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Mavros topics not publishing?

Hi,

I've been trying to connect to a Pixhawk quadcopter using the mavros library (http://wiki.ros.org/mavros) and I had some issues. We are using a pixhawk and a 3DR Iris quadcopter, and we launch the mavros code with

roslaunch mavros apm2_radio.launch

The code launches with no errors are we see a long list of topics being displayed:

/diagnostics
/mavlink/from
/mavlink/to
/mavros/battery
/mavros/fix
/mavros/gps_vel
/mavros/imu/atm_pressure
/mavros/imu/data
/mavros/imu/data_raw
/mavros/imu/mag
/mavros/imu/temperature
/mavros/mission/waypoints
/mavros/radio_status
/mavros/rc/in
/mavros/rc/out
/mavros/rc/override
/mavros/state
/mavros/time_reference
/rosout
/rosout_agg

The good news is that the /mavros/state, /diagnostics, and /mavros/radio_status seem to be publishing correctly

$:rostopic echo /mavros/state
    header: 
      seq: 100
      stamp: 
        secs: 1411583514
        nsecs: 793784329
      frame_id: ''
    armed: False
    guided: False
    mode: ALT_HOLD

The bad news is that every other topic is empty. No GPS data, no battery data, no RC data, etc. Has anyone else run this code and knows how to get this data to publish?

The closest thing online I found is this online book: http://erlerobotics.gitbooks.io/erlerobot/en/mavlink/ros/mavros.html

The problem is, they experienced the same problem but gave no reason/fix for it.

Thanks!

Mavros topics not publishing?

Hi,

I've been trying to connect to a Pixhawk quadcopter using the mavros library (http://wiki.ros.org/mavros) and I had some issues. We are using a pixhawk and a 3DR Iris quadcopter, and we launch the mavros code with

roslaunch mavros apm2_radio.launch

The code launches with no errors are we see a long list of topics being displayed:

/diagnostics
/mavlink/from
/mavlink/to
/mavros/battery
/mavros/fix
/mavros/gps_vel
/mavros/imu/atm_pressure
/mavros/imu/data
/mavros/imu/data_raw
/mavros/imu/mag
/mavros/imu/temperature
/mavros/mission/waypoints
/mavros/radio_status
/mavros/rc/in
/mavros/rc/out
/mavros/rc/override
/mavros/state
/mavros/time_reference
/rosout
/rosout_agg

The good news is that the /mavros/state, /diagnostics, and /mavros/radio_status seem to be publishing correctly

$:rostopic echo /mavros/state
    header: 
      seq: 100
      stamp: 
        secs: 1411583514
        nsecs: 793784329
      frame_id: ''
    armed: False
    guided: False
    mode: ALT_HOLD

The bad news is that every other topic is empty. No GPS data, no battery data, no RC data, etc. Has anyone else run this code and knows how to get this data to publish?

The closest thing online I found is this online book: http://erlerobotics.gitbooks.io/erlerobot/en/mavlink/ros/mavros.html

The problem is, they experienced the same problem but gave no reason/fix for it.

Thanks!

EDIT: Adding information On a fresh install of Ubuntu 14.04 and a newly installed mavros

sudo apt-get install mavros

I tried to get sensor data from a 3DR Iris Pixhawk. As per @vooon 's suggestion, I used rqt_logger_level to view the mavros.ros.mavconn debug messages.

# Changed the default fcu_url to ttyUSB0 instead of ttyACM0, because that's the port my 3DR modem was on.
<arg name="fcu_url" default="/dev/ttyUSB0:57600" />

Launched the file using px4.launch, enabled mavconn Debug messages, and watched the message ID's that showed up.

  1. First, during the section where you get the heartbeat, there were a mixture of 0, 166, and 109 messages.
  2. Then message ID 253 was published three times in a row, in conjunction with FCU lines for ArduCopter V3.1.2, PX4 and PX4v2:

    [DEBUG] [1411862177.961715937]: serial0:recv: Message-Id: 253 [51 bytes] Sys-Id: 1 Comp-Id: 1 [ INFO] [1411862177.961821314]: FCU: ArduCopter V3.1.2 (e2ed3dd1)

  3. After that, during bootup, there is a fast stream of 22 IDs split up by 0, 166, and 109

  4. At the end of a long stream of 22's it gets 43, 44, 40, 39, and 47 in quick succession:

    [DEBUG] [1411862299.848786274]: serial0:send: Message-Id: 43 [2 bytes] [DEBUG] [1411862299.929775171]: serial0:recv: Message-Id: 44 [4 bytes] Sys-Id: 1 Comp-Id: 1 [DEBUG] [1411862299.929917816]: serial0:send: Message-Id: 40 [4 bytes] [DEBUG] [1411862300.143771523]: serial0:recv: Message-Id: 39 [37 bytes] Sys-Id: 1 Comp-Id: 1 [ INFO] [1411862300.143899206]: WP: item #0 GAA WAYPOINT CUR params: 0, 0, 0, 0 x: 42.2936 y: -71.2638 z: 0 [DEBUG] [1411862300.143942143]: serial0:send: Message-Id: 47 [3 bytes] [ INFO] [1411862300.143995581]: WP: mission received [ WARN] [1411862300.673739713]: PR: request param #133 timeout, retries left 2, and 33 params still missing

  5. At this point, over and over the computer warns of a param request timeout and sends/recieves messages 20, 22:

    [ WARN] [1411862324.887729069]: PR: request param #161 timeout, retries left 2, and 13 params still missing [DEBUG] [1411862324.887842121]: serial0:send: Message-Id: 20 [20 bytes] [DEBUG] [1411862325.076784803]: serial0:recv: Message-Id: 22 [25 bytes] Sys-Id: 1 Comp-Id: 1

  6. After all the parameters are missed:

    [ INFO] [1411862558.949057993]: PR: parameters list received

the debug wessages settle into a 0-0-0-0-0-166-109 pattern.