mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
906 stars 995 forks source link

All mavros topics are empty #1065

Closed TeixeiraRafael closed 4 years ago

TeixeiraRafael commented 6 years ago

Issue details

I'm running mavros on my computer and connecting to the pixhawk using telemetry, all ports are set correctly, however all the mavros topics seem to be empty, the only one that had any data being published was /mavros/state, how can I solve this?

MAVROS version and platform

Mavros: ?0.18.4? ROS: Kinetic Ubuntu: 16.04

Autopilot type and version

[ ] ArduPilot [ x ] PX4

Version: 2.4.8

Node logs

Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://furgbot:44159/

SUMMARY
========

CLEAR PARAMETERS
 * /mavros/

PARAMETERS
 * /mavros/cmd/use_comp_id_system_control: False
 * /mavros/conn/heartbeat_rate: 1.0
 * /mavros/conn/system_time_rate: 1.0
 * /mavros/conn/timeout: 10.0
 * /mavros/conn/timesync_rate: 10.0
 * /mavros/distance_sensor/hrlv_ez4_pub/field_of_view: 0.0
 * /mavros/distance_sensor/hrlv_ez4_pub/frame_id: hrlv_ez4_sonar
 * /mavros/distance_sensor/hrlv_ez4_pub/id: 0
 * /mavros/distance_sensor/hrlv_ez4_pub/orientation: PITCH_270
 * /mavros/distance_sensor/hrlv_ez4_pub/send_tf: True
 * /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/x: 0.0
 * /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/y: 0.0
 * /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/z: -0.1
 * /mavros/distance_sensor/laser_1_sub/id: 3
 * /mavros/distance_sensor/laser_1_sub/orientation: PITCH_270
 * /mavros/distance_sensor/laser_1_sub/subscriber: True
 * /mavros/distance_sensor/lidarlite_pub/field_of_view: 0.0
 * /mavros/distance_sensor/lidarlite_pub/frame_id: lidarlite_laser
 * /mavros/distance_sensor/lidarlite_pub/id: 1
 * /mavros/distance_sensor/lidarlite_pub/orientation: PITCH_270
 * /mavros/distance_sensor/lidarlite_pub/send_tf: True
 * /mavros/distance_sensor/lidarlite_pub/sensor_position/x: 0.0
 * /mavros/distance_sensor/lidarlite_pub/sensor_position/y: 0.0
 * /mavros/distance_sensor/lidarlite_pub/sensor_position/z: -0.1
 * /mavros/distance_sensor/sonar_1_sub/id: 2
 * /mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270
 * /mavros/distance_sensor/sonar_1_sub/subscriber: True
 * /mavros/fake_gps/eph: 2.0
 * /mavros/fake_gps/epv: 2.0
 * /mavros/fake_gps/fix_type: 3
 * /mavros/fake_gps/geo_origin/alt: 408.0
 * /mavros/fake_gps/geo_origin/lat: 47.3667
 * /mavros/fake_gps/geo_origin/lon: 8.55
 * /mavros/fake_gps/gps_rate: 5.0
 * /mavros/fake_gps/mocap_transform: True
 * /mavros/fake_gps/satellites_visible: 5
 * /mavros/fake_gps/tf/child_frame_id: fix
 * /mavros/fake_gps/tf/frame_id: map
 * /mavros/fake_gps/tf/listen: False
 * /mavros/fake_gps/tf/rate_limit: 10.0
 * /mavros/fake_gps/tf/send: False
 * /mavros/fake_gps/use_mocap: True
 * /mavros/fake_gps/use_vision: False
 * /mavros/fcu_protocol: v2.0
 * /mavros/fcu_url: /dev/ttyUSB0
 * /mavros/gcs_url: 
 * /mavros/global_position/child_frame_id: base_link
 * /mavros/global_position/frame_id: map
 * /mavros/global_position/gps_uere: 1.0
 * /mavros/global_position/rot_covariance: 99999.0
 * /mavros/global_position/tf/child_frame_id: base_link
 * /mavros/global_position/tf/frame_id: map
 * /mavros/global_position/tf/global_frame_id: earth
 * /mavros/global_position/tf/send: False
 * /mavros/global_position/use_relative_alt: True
 * /mavros/image/frame_id: px4flow
 * /mavros/imu/angular_velocity_stdev: 0.000349065850399
 * /mavros/imu/frame_id: base_link
 * /mavros/imu/linear_acceleration_stdev: 0.0003
 * /mavros/imu/magnetic_stdev: 0.0
 * /mavros/imu/orientation_stdev: 1.0
 * /mavros/local_position/frame_id: map
 * /mavros/local_position/tf/child_frame_id: base_link
 * /mavros/local_position/tf/frame_id: map
 * /mavros/local_position/tf/send: False
 * /mavros/local_position/tf/send_fcu: False
 * /mavros/mission/pull_after_gcs: True
 * /mavros/mocap/use_pose: True
 * /mavros/mocap/use_tf: False
 * /mavros/odometry/frame_tf/body_frame_orientation: frd
 * /mavros/odometry/frame_tf/local_frame: vision_ned
 * /mavros/plugin_blacklist: ['safety_area', '...
 * /mavros/plugin_whitelist: []
 * /mavros/px4flow/frame_id: px4flow
 * /mavros/px4flow/ranger_fov: 0.118682389136
 * /mavros/px4flow/ranger_max_range: 5.0
 * /mavros/px4flow/ranger_min_range: 0.3
 * /mavros/safety_area/p1/x: 1.0
 * /mavros/safety_area/p1/y: 1.0
 * /mavros/safety_area/p1/z: 1.0
 * /mavros/safety_area/p2/x: -1.0
 * /mavros/safety_area/p2/y: -1.0
 * /mavros/safety_area/p2/z: -1.0
 * /mavros/setpoint_accel/send_force: False
 * /mavros/setpoint_attitude/reverse_thrust: False
 * /mavros/setpoint_attitude/tf/child_frame_id: target_attitude
 * /mavros/setpoint_attitude/tf/frame_id: map
 * /mavros/setpoint_attitude/tf/listen: False
 * /mavros/setpoint_attitude/tf/rate_limit: 50.0
 * /mavros/setpoint_attitude/use_quaternion: False
 * /mavros/setpoint_position/mav_frame: LOCAL_NED
 * /mavros/setpoint_position/tf/child_frame_id: target_position
 * /mavros/setpoint_position/tf/frame_id: map
 * /mavros/setpoint_position/tf/listen: False
 * /mavros/setpoint_position/tf/rate_limit: 50.0
 * /mavros/setpoint_velocity/mav_frame: LOCAL_NED
 * /mavros/startup_px4_usb_quirk: True
 * /mavros/sys/disable_diag: False
 * /mavros/sys/min_voltage: 10.0
 * /mavros/target_component_id: 1
 * /mavros/target_system_id: 1
 * /mavros/tdr_radio/low_rssi: 40
 * /mavros/time/time_ref_source: fcu
 * /mavros/time/timesync_avg_alpha: 0.6
 * /mavros/time/timesync_mode: MAVLINK
 * /mavros/vibration/frame_id: base_link
 * /mavros/vision_pose/tf/child_frame_id: vision_estimate
 * /mavros/vision_pose/tf/frame_id: map
 * /mavros/vision_pose/tf/listen: False
 * /mavros/vision_pose/tf/rate_limit: 10.0
 * /mavros/vision_speed/listen_twist: True
 * /mavros/vision_speed/twist_cov: True
 * /rosdistro: kinetic
 * /rosversion: 1.12.13

NODES
  /
    mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

process[mavros-1]: started with pid [10135]
[ INFO] [1532524740.139679607]: FCU URL: /dev/ttyUSB0
[ INFO] [1532524740.140570367]: serial0: device: /dev/ttyUSB0 @ 57600 bps
[ INFO] [1532524740.141457809]: GCS bridge disabled
[ INFO] [1532524740.147259861]: Plugin 3dr_radio loaded
[ INFO] [1532524740.148295592]: Plugin 3dr_radio initialized
[ INFO] [1532524740.148352517]: Plugin actuator_control loaded
[ INFO] [1532524740.150609825]: Plugin actuator_control initialized
[ INFO] [1532524740.151957946]: Plugin adsb loaded
[ INFO] [1532524740.155132081]: Plugin adsb initialized
[ INFO] [1532524740.155391407]: Plugin altitude loaded
[ INFO] [1532524740.158531972]: Plugin altitude initialized
[ INFO] [1532524740.158602914]: Plugin cam_imu_sync loaded
[ INFO] [1532524740.159171173]: Plugin cam_imu_sync initialized
[ INFO] [1532524740.159235399]: Plugin command loaded
[ INFO] [1532524740.162443798]: Plugin command initialized
[ INFO] [1532524740.162497119]: Plugin debug_value loaded
[ INFO] [1532524740.165695481]: Plugin debug_value initialized
[ INFO] [1532524740.165715167]: Plugin distance_sensor blacklisted
[ INFO] [1532524740.165766480]: Plugin fake_gps loaded
[ INFO] [1532524740.179250610]: Plugin fake_gps initialized
[ INFO] [1532524740.179332789]: Plugin ftp loaded
[ INFO] [1532524740.183631735]: Plugin ftp initialized
[ INFO] [1532524740.183690164]: Plugin global_position loaded
[ INFO] [1532524740.193809273]: Plugin global_position initialized
[ INFO] [1532524740.193869528]: Plugin hil loaded
[ INFO] [1532524740.202786257]: Plugin hil initialized
[ INFO] [1532524740.202895671]: Plugin home_position loaded
[ INFO] [1532524740.208622619]: Plugin home_position initialized
[ INFO] [1532524740.208927381]: Plugin imu loaded
[ INFO] [1532524740.215678847]: Plugin imu initialized
[ INFO] [1532524740.215770317]: Plugin local_position loaded
[ INFO] [1532524740.219332028]: Plugin local_position initialized
[ INFO] [1532524740.219415692]: Plugin manual_control loaded
[ INFO] [1532524740.221468151]: Plugin manual_control initialized
[ INFO] [1532524740.221525631]: Plugin mocap_pose_estimate loaded
[ INFO] [1532524740.224106463]: Plugin mocap_pose_estimate initialized
[ INFO] [1532524740.224158163]: Plugin obstacle_distance loaded
[ INFO] [1532524740.226010979]: Plugin obstacle_distance initialized
[ INFO] [1532524740.226068412]: Plugin odom loaded
[ INFO] [1532524740.228473191]: Plugin odom initialized
[ INFO] [1532524740.228540709]: Plugin param loaded
[ INFO] [1532524740.229898319]: Plugin param initialized
[ INFO] [1532524740.229963278]: Plugin px4flow loaded
[ INFO] [1532524740.235888441]: Plugin px4flow initialized
[ INFO] [1532524740.235947078]: Plugin rangefinder blacklisted
[ INFO] [1532524740.236092940]: Plugin rc_io loaded
[ INFO] [1532524740.243778549]: Plugin rc_io initialized
[ INFO] [1532524740.243802586]: Plugin safety_area blacklisted
[ INFO] [1532524740.243870030]: Plugin setpoint_accel loaded
[ INFO] [1532524740.246187187]: Plugin setpoint_accel initialized
[ INFO] [1532524740.246253737]: Plugin setpoint_attitude loaded
[ INFO] [1532524740.252595059]: Plugin setpoint_attitude initialized
[ INFO] [1532524740.252657187]: Plugin setpoint_position loaded
[ INFO] [1532524740.261450252]: Plugin setpoint_position initialized
[ INFO] [1532524740.261515864]: Plugin setpoint_raw loaded
[ INFO] [1532524740.268158623]: Plugin setpoint_raw initialized
[ INFO] [1532524740.268383531]: Plugin setpoint_velocity loaded
[ INFO] [1532524740.276825212]: Plugin setpoint_velocity initialized
[ INFO] [1532524740.276920055]: Plugin sys_status loaded
[ INFO] [1532524740.282360303]: Plugin sys_status initialized
[ INFO] [1532524740.282423479]: Plugin sys_time loaded
[ INFO] [1532524740.286036302]: TM: Timesync mode: MAVLINK
[ INFO] [1532524740.286767320]: Plugin sys_time initialized
[ INFO] [1532524740.286817082]: Plugin trajectory loaded
[ INFO] [1532524740.290167432]: Plugin trajectory initialized
[ INFO] [1532524740.290226974]: Plugin vfr_hud loaded
[ INFO] [1532524740.290598036]: Plugin vfr_hud initialized
[ INFO] [1532524740.290610682]: Plugin vibration blacklisted
[ INFO] [1532524740.290650152]: Plugin vision_pose_estimate loaded
[ INFO] [1532524740.296187419]: Plugin vision_pose_estimate initialized
[ INFO] [1532524740.296276442]: Plugin vision_speed_estimate loaded
[ INFO] [1532524740.299224358]: Plugin vision_speed_estimate initialized
[ INFO] [1532524740.299365077]: Plugin waypoint loaded
[ INFO] [1532524740.307388635]: Plugin waypoint initialized
[ INFO] [1532524740.307476371]: Plugin wind_estimation loaded
[ INFO] [1532524740.307867388]: Plugin wind_estimation initialized
[ INFO] [1532524740.307885804]: Autostarting mavlink via USB on PX4
[ INFO] [1532524740.307908617]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1532524740.307920568]: Built-in MAVLink package version: 2018.6.6
[ INFO] [1532524740.307938150]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1532524740.307951275]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1532524740.662002728]: CON: Got HEARTBEAT, connected. FCU: ArduPilotMega / ArduCopter
[ERROR] [1532524741.664232667]: FCU: PreArm: RC not calibrated
[ WARN] [1532524742.666504554]: VER: broadcast request timeout, retries left 4
[ WARN] [1532524743.666206438]: VER: broadcast request timeout, retries left 3
[ WARN] [1532524749.666643707]: VER: unicast request timeout, retries left 2
[ INFO] [1532524750.663332281]: HP: requesting home position
[ WARN] [1532524754.670196600]: VER: unicast request timeout, retries left 1
[ WARN] [1532524754.670448943]: PR: request list timeout, retries left 2
[ WARN] [1532524755.671549987]: PR: request list timeout, retries left 1
[ WARN] [1532524756.668121134]: WP: timeout, retries left 2
[ WARN] [1532524756.672777236]: PR: request list timeout, retries left 0
[ WARN] [1532524757.668707712]: WP: timeout, retries left 1
[ WARN] [1532524758.669090605]: WP: timeout, retries left 0
[ERROR] [1532524759.669772958]: WP: timed out.
[ WARN] [1532524759.673896620]: VER: unicast request timeout, retries left 0
[ INFO] [1532524760.663114292]: HP: requesting home position
[ WARN] [1532524764.677398420]: VER: your FCU don't support AUTOPILOT_VERSION, switched to default capabilities
[ INFO] [1532524770.662948243]: HP: requesting home position
[ERROR] [1532524771.768363026]: FCU: PreArm: RC not calibrated
[ INFO] [1532524780.663289432]: HP: requesting home position
[ INFO] [1532524790.662794211]: HP: requesting home position
[ INFO] [1532524800.662551567]: HP: requesting home position
[ERROR] [1532524801.804852187]: FCU: PreArm: RC not calibrated
[ INFO] [1532524810.662370647]: HP: requesting home position

Diagnostics

  seq: 14
  stamp: 
    secs: 1532524754
    nsecs: 670326788
  frame_id: ''
status: 
  - 
    level: 0
    name: "mavros: FCU connection"
    message: "connected"
    hardware_id: "/dev/ttyUSB0"
    values: 
      - 
        key: "Received packets:"
        value: "16"
      - 
        key: "Dropped packets:"
        value: "0"
      - 
        key: "Buffer overruns:"
        value: "0"
      - 
        key: "Parse errors:"
        value: "0"
      - 
        key: "Rx sequence number:"
        value: "67"
      - 
        key: "Tx sequence number:"
        value: "131"
      - 
        key: "Rx total bytes:"
        value: "314"
      - 
        key: "Tx total bytes:"
        value: "3585"
      - 
        key: "Rx speed:"
        value: "21.250000"
      - 
        key: "Tx speed:"
        value: "80.500000"
  - 
    level: 2
    name: "mavros: GPS"
    message: "No satellites"
    hardware_id: "/dev/ttyUSB0"
    values: 
      - 
        key: "Satellites visible"
        value: "0"
      - 
        key: "Fix type"
        value: "0"
      - 
        key: "EPH (m)"
        value: "Unknown"
      - 
        key: "EPV (m)"
        value: "Unknown"
  - 
    level: 0
    name: "mavros: Heartbeat"
    message: "Normal"
    hardware_id: "/dev/ttyUSB0"
    values: 
      - 
        key: "Heartbeats since startup"
        value: "15"
      - 
        key: "Frequency (Hz)"
        value: "1.042150"
      - 
        key: "Vehicle type"
        value: "Quadrotor"
      - 
        key: "Autopilot type"
        value: "ArduPilotMega / ArduCopter"
      - 
        key: "Mode"
        value: "STABILIZE"
      - 
        key: "System status"
        value: "Standby"
  - 
    level: 0
    name: "mavros: System"
    message: "Normal"
    hardware_id: "/dev/ttyUSB0"
    values: 
      - 
        key: "Sensor present"
        value: "0x00000000"
      - 
        key: "Sensor enabled"
        value: "0x00000000"
      - 
        key: "Sensor helth"
        value: "0x00000000"
      - 
        key: "CPU Load (%)"
        value: "0.0"
      - 
        key: "Drop rate (%)"
        value: "0.0"
      - 
        key: "Errors comm"
        value: "0"
      - 
        key: "Errors count #1"
        value: "0"
      - 
        key: "Errors count #2"
        value: "0"
      - 
        key: "Errors count #3"
        value: "0"
      - 
        key: "Errors count #4"
        value: "0"
  - 
    level: 2
    name: "mavros: Battery"
    message: "No data"
    hardware_id: "/dev/ttyUSB0"
    values: 
      - 
        key: "Voltage"
        value: "-1.00"
      - 
        key: "Current"
        value: "0.0"
      - 
        key: "Remaining"
        value: "0.0"
  - 
    level: 2
    name: "mavros: Time Sync"
    message: "No events recorded."
    hardware_id: "/dev/ttyUSB0"
    values: 
      - 
        key: "Timesyncs since startup"
        value: "0"
      - 
        key: "Frequency (Hz)"
        value: "0.000000"
      - 
        key: "Last RTT (ms)"
        value: "0.000000"
      - 
        key: "Mean RTT (ms)"
        value: "0.000000"
      - 
        key: "Last remote time (s)"
        value: "0.000000000"
      - 
        key: "Estimated time offset (s)"

Check ID

OK. I got messages from 1:1.

---
Received 16 messages, from 1 addresses
sys:comp   list of messages
  1:1     0, 253
vooon commented 6 years ago

Check wiring, looks like USB-UART Tx -> FCU Rx broken. Also check stream rates. Try rosrun mavros mavsys rate --all 10.

TeixeiraRafael commented 6 years ago

I'm using telemetry, there's no wiring. Running rosrun mavros mavsys rate --all 10 didn't solved the problem :(

TSC21 commented 5 years ago

@TeixeiraRafael updates?

AbelMartinez90 commented 4 years ago

Check wiring, looks like USB-UART Tx -> FCU Rx broken. Also check stream rates. Try rosrun mavros mavsys rate --all 10.

That solved my problem, thanks a lot!!!

lidorshimoni commented 2 years ago

My problem was in dds qos profile. I did not see any traffic in rqt but in ros2 topic echo it worked