mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
900 stars 994 forks source link

No messages on topic /mavros/global_position/home #1049

Closed wynn4 closed 6 years ago

wynn4 commented 6 years ago

This is only bug and feature tracker, please use it to report bugs or request features.


Issue details

I'm looking to obtain the LLA home position in order to compute local NED/ENU coordinates for a ground target whose latitude and longitude is known. I thought that this data would be available on the topic /mavros/global_position/home after getting a gps fix, and/or after arming the vehicle. Thus far no data appears on that topic. I've tried connecting to mavros over the USB port, and also through telem2. In both cases mavros fires up without problems, and state, IMU, local_position, etc. is published, but no global_position/home data.

MAVROS version and platform

Mavros: Latest from apt-get ROS: Kinetic Ubuntu: 16.04

Autopilot type and version

[ ] ArduPilot [ x ] PX4

Version: 1.7.3

Node logs

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/ttyTHS2:921600
 * /mavros/gcs_url: 
 * /mavros/global_position/child_frame_id: base_link
 * /mavros/global_position/frame_id: map
 * /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)
    mavros_ned (ibvs_sim/mavros_ned)

auto-starting new master
process[master]: started with pid [4123]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to a64f3c12-7034-11e8-b176-00044ba82ae4
process[rosout-1]: started with pid [4136]
started core service [/rosout]
process[mavros-2]: started with pid [4154]
process[mavros_ned-3]: started with pid [4155]
[ INFO] [1529023208.308116504]: FCU URL: /dev/ttyTHS2:921600
[ INFO] [1529023208.313739288]: serial0: device: /dev/ttyTHS2 @ 921600 bps
[ INFO] [1529023208.326408376]: GCS bridge disabled
[ INFO] [1529023208.375568344]: Plugin 3dr_radio loaded
[ INFO] [1529023208.381378456]: Plugin 3dr_radio initialized
[ INFO] [1529023208.381802136]: Plugin actuator_control loaded
[ INFO] [1529023208.395851704]: Plugin actuator_control initialized
[ INFO] [1529023208.406918904]: Plugin adsb loaded
[ INFO] [1529023208.427937816]: Plugin adsb initialized
[ INFO] [1529023208.428527896]: Plugin altitude loaded
[ INFO] [1529023208.436970616]: Plugin altitude initialized
[ INFO] [1529023208.437529496]: Plugin cam_imu_sync loaded
[ INFO] [1529023208.442566104]: Plugin cam_imu_sync initialized
[ INFO] [1529023208.443291384]: Plugin command loaded
[ INFO] [1529023208.465254808]: Plugin command initialized
[ INFO] [1529023208.465764824]: Plugin debug_value loaded
[ INFO] [1529023208.502086424]: Plugin debug_value initialized
[ INFO] [1529023208.502235096]: Plugin distance_sensor blacklisted
[ INFO] [1529023208.502923896]: Plugin fake_gps loaded
[ INFO] [1529023208.670607000]: Plugin fake_gps initialized
[ INFO] [1529023208.671612920]: Plugin ftp loaded
[ INFO] [1529023208.736465144]: Plugin ftp initialized
[ INFO] [1529023208.737076664]: Plugin global_position loaded
[ INFO] [1529023208.903846456]: Plugin global_position initialized
[ INFO] [1529023208.905081176]: Plugin hil loaded
[ INFO] [1529023209.060056312]: Plugin hil initialized
[ INFO] [1529023209.060959960]: Plugin home_position loaded
[ INFO] [1529023209.098079800]: Plugin home_position initialized
[ INFO] [1529023209.098815512]: Plugin imu loaded
[ INFO] [1529023209.192233496]: Plugin imu initialized
[ INFO] [1529023209.193552120]: Plugin local_position loaded
[ INFO] [1529023209.249950520]: Plugin local_position initialized
[ INFO] [1529023209.251252824]: Plugin manual_control loaded
[ INFO] [1529023209.281398296]: Plugin manual_control initialized
[ INFO] [1529023209.282546008]: Plugin mocap_pose_estimate loaded
[ INFO] [1529023209.328163320]: Plugin mocap_pose_estimate initialized
[ INFO] [1529023209.328946392]: Plugin obstacle_distance loaded
[ INFO] [1529023209.361183608]: Plugin obstacle_distance initialized
[ INFO] [1529023209.362177848]: Plugin odom loaded
[FATAL] [1529023209.400179832]: ODOM: invalid body frame orientation "frd"
[ INFO] [1529023209.400569048]: Plugin odom initialized
[ INFO] [1529023209.401695000]: Plugin param loaded
[ INFO] [1529023209.419048024]: Plugin param initialized
[ INFO] [1529023209.419667672]: Plugin px4flow loaded
[ INFO] [1529023209.500679480]: Plugin px4flow initialized
[ INFO] [1529023209.500998584]: Plugin rangefinder blacklisted
[ INFO] [1529023209.501849048]: Plugin rc_io loaded
[ INFO] [1529023209.536959128]: Plugin rc_io initialized
[ INFO] [1529023209.537201688]: Plugin safety_area blacklisted
[ INFO] [1529023209.538064152]: Plugin setpoint_accel loaded
[ INFO] [1529023209.576945720]: Plugin setpoint_accel initialized
[ INFO] [1529023209.578555352]: Plugin setpoint_attitude loaded
[ INFO] [1529023209.699913144]: Plugin setpoint_attitude initialized
[ INFO] [1529023209.701857944]: Plugin setpoint_position loaded
[ INFO] [1529023209.860154488]: Plugin setpoint_position initialized
[ INFO] [1529023209.861464504]: Plugin setpoint_raw loaded
[ INFO] [1529023209.969606072]: Plugin setpoint_raw initialized
[ INFO] [1529023209.971159992]: Plugin setpoint_velocity loaded
[ INFO] [1529023210.043093464]: Plugin setpoint_velocity initialized
[ INFO] [1529023210.044119576]: Plugin sys_status loaded
[ INFO] [1529023210.151974616]: Plugin sys_status initialized
[ INFO] [1529023210.153178552]: Plugin sys_time loaded
[ INFO] [1529023210.187909400]: TM: Timesync mode: MAVLINK
[ INFO] [1529023210.190210488]: Plugin sys_time initialized
[ INFO] [1529023210.190492280]: Plugin trajectory loaded
[ INFO] [1529023210.241727160]: Plugin trajectory initialized
[ INFO] [1529023210.243024568]: Plugin vfr_hud loaded
[ INFO] [1529023210.250901880]: Plugin vfr_hud initialized
[ INFO] [1529023210.251127736]: Plugin vibration blacklisted
[ INFO] [1529023210.251785464]: Plugin vision_pose_estimate loaded
[ INFO] [1529023210.325258936]: Plugin vision_pose_estimate initialized
[ INFO] [1529023210.326251608]: Plugin vision_speed_estimate loaded
[ INFO] [1529023210.373170744]: Plugin vision_speed_estimate initialized
[ INFO] [1529023210.374266456]: Plugin waypoint loaded
[ INFO] [1529023210.412617720]: Plugin waypoint initialized
[ INFO] [1529023210.413362968]: Plugin wind_estimation loaded
[ INFO] [1529023210.421287288]: Plugin wind_estimation initialized
[ INFO] [1529023210.421635384]: Autostarting mavlink via USB on PX4
[ INFO] [1529023210.422003192]: Built-in SIMD instructions: ARM NEON
[ INFO] [1529023210.422249816]: Built-in MAVLink package version: 2018.5.5
[ INFO] [1529023210.422496568]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1529023210.422837496]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1529023210.424779448]: IMU: High resolution IMU detected!
[ WARN] [1529023210.429155256]: TM: Clock skew detected (-1529021777.325628757 s). Hard syncing clocks.
[ INFO] [1529023210.434800376]: IMU: Attitude quaternion IMU detected!
[ INFO] [1529023210.622344312]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1529023210.629298040]: IMU: High resolution IMU detected!
[ INFO] [1529023210.632606744]: IMU: Attitude quaternion IMU detected!
[ INFO] [1529023211.634270200]: VER: 1.1: Capabilities         0x000000000000e4ef
[ INFO] [1529023211.634774296]: VER: 1.1: Flight software:     010703ff (0000000053F1AECA)
[ INFO] [1529023211.635145560]: VER: 1.1: Middleware software: 010703ff (0000000053F1AECA)
[ INFO] [1529023211.635443544]: VER: 1.1: OS software:         071600ff (0000000000000000)
[ INFO] [1529023211.635731192]: VER: 1.1: Board hardware:      00000011
[ INFO] [1529023211.636087352]: VER: 1.1: VID/PID:             26ac:0011
[ INFO] [1529023211.636410936]: VER: 1.1: UID:                 3136510e34313630
[ WARN] [1529023211.637061080]: CMD: Unexpected command 520, result 0
[ INFO] [1529023225.628460152]: WP: mission received

Diagnostics

nvidia@tegra-ubuntu:~$ rostopic echo -n1 /diagnostics 
header: 
  seq: 141
  stamp: 
    secs: 1529023392
    nsecs: 425714264
  frame_id: ''
status: 
  - 
    level: 0
    name: "mavros: FCU connection"
    message: "connected"
    hardware_id: "/dev/ttyTHS2:921600"
    values: 
      - 
        key: "Received packets:"
        value: "8546"
      - 
        key: "Dropped packets:"
        value: "0"
      - 
        key: "Buffer overruns:"
        value: "0"
      - 
        key: "Parse errors:"
        value: "0"
      - 
        key: "Rx sequence number:"
        value: "248"
      - 
        key: "Tx sequence number:"
        value: "170"
      - 
        key: "Rx total bytes:"
        value: "3521597"
      - 
        key: "Tx total bytes:"
        value: "105729"
      - 
        key: "Rx speed:"
        value: "28450.000000"
      - 
        key: "Tx speed:"
        value: "890.000000"
  - 
    level: 0
    name: "mavros: GPS"
    message: "3D fix"
    hardware_id: "/dev/ttyTHS2:921600"
    values: 
      - 
        key: "Satellites visible"
        value: "15"
      - 
        key: "Fix type"
        value: "3"
      - 
        key: "EPH (m)"
        value: "0.70"
      - 
        key: "EPV (m)"
        value: "1.10"
  - 
    level: 0
    name: "mavros: Heartbeat"
    message: "Normal"
    hardware_id: "/dev/ttyTHS2:921600"
    values: 
      - 
        key: "Heartbeats since startup"
        value: "910"
      - 
        key: "Frequency (Hz)"
        value: "5.000290"
      - 
        key: "Vehicle type"
        value: "Octorotor"
      - 
        key: "Autopilot type"
        value: "PX4 Autopilot"
      - 
        key: "Mode"
        value: "AUTO.RTL"
      - 
        key: "System status"
        value: "Standby"
  - 
    level: 0
    name: "mavros: System"
    message: "Normal"
    hardware_id: "/dev/ttyTHS2:921600"
    values: 
      - 
        key: "Sensor present"
        value: "0x00000000"
      - 
        key: "Sensor enabled"
        value: "0x00000000"
      - 
        key: "Sensor helth"
        value: "0x00000000"
      - 
        key: "CPU Load (%)"
        value: "72.8"
      - 
        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: 0
    name: "mavros: Battery"
    message: "Normal"
    hardware_id: "/dev/ttyTHS2:921600"
    values: 
      - 
        key: "Voltage"
        value: "15.20"
      - 
        key: "Current"
        value: "0.0"
      - 
        key: "Remaining"
        value: "42.0"
  - 
    level: 0
    name: "mavros: Time Sync"
    message: "Normal"
    hardware_id: "/dev/ttyTHS2:921600"
    values: 
      - 
        key: "Timesyncs since startup"
        value: "1821"
      - 
        key: "Frequency (Hz)"
        value: "10.000580"
      - 
        key: "Last dt (ms)"
        value: "0.240816"
      - 
        key: "Mean dt (ms)"
        value: "0.004469"
      - 
        key: "Last system time (s)"
        value: "1615.072275000"
      - 
        key: "Time offset (s)"
        value: "1529021777.320725441"
  - 
    level: 1
    name: "mavros: 3DR Radio"
    message: "Low RSSI"
    hardware_id: "/dev/ttyTHS2:921600"
    values: 
      - 
        key: "RSSI"
        value: "37"
      - 
        key: "RSSI (dBm)"
        value: "-107.5"
      - 
        key: "Remote RSSI"
        value: "0"
      - 
        key: "Remote RSSI (dBm)"
        value: "-127.0"
      - 
        key: "Tx buffer (%)"
        value: "94"
      - 
        key: "Noice level"
        value: "38"
      - 
        key: "Remote noice level"
        value: "0"
      - 
        key: "Rx errors"
        value: "0"
      - 
        key: "Fixed"
        value: "0"

Check ID

nvidia@tegra-ubuntu:~$ rosrun mavros checkid 
OK. I got messages from 1:1.

---
Received 5985 messages, from 2 addresses
sys:comp   list of messages
 51:68    109
  1:1     0, 1, 2, 140, 141, 147, 24, 30, 31, 32, 33, 36, 74, 76, 85, 87, 230, 231, 105, 111, 241, 242, 245
wynn4 commented 6 years ago

I also wanted to add that I do get data on the topics: /global_position/raw/fix /global_position/raw/gps_vel /global_position/local /global_position/global

I don't get data on topics: /global_position/home

TSC21 commented 6 years ago

The data you want is available on mavros/global_position/global topic. You will get data on mavros/global_position/home initially, when the autopilot sets the home position.