mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
879 stars 990 forks source link

local_position data issue #933

Closed aaraujo11 closed 6 years ago

aaraujo11 commented 6 years ago

Issue details

1) I connected the Jetson TX1 through serial port between /dev/ttyTHS1 and TelemetryPort2 of PixHawk Cube 2.1, with a 921600 baudrate. I launched the mavros (apparently without any issues), then set the stream data rate to 10Hz rosservice call /mavros/set_stream_rate "stream_id: 0 message_rate: 10 on_off: true" or also rosrun mavros mavsys rate --all 10, i start to receive data at approx. 10Hz to some topics without any issue, but when i check the topics of /mavros/local_position/pose ... odom.... velocity i dont have any data (even when i arm and flight). So to be sure that i was receiving the specific mavlink ID 32 LOCAL_POSITION_NED msg, i run the rosrun mavros checkid and i verify that there wasn't any 32 ID. Should i need to activate some flag on the params list, in the pixhawk side?

2) Is it possible to set permanently the stream data rate? Because everytime i reboot the pixhawk i need to set again the stream rate to start receive data.

3) Why im receiving the warning msgs at the beginning of launch [ WARN] [1517338283.510153420]: init: message from ASLUAV, MSG-ID 201 ignored! Table has different entry. in the mavros version 0.17.3 for example didn't appear.

4) Time to time i receive HP: requesting home position msg why? Do I need to define a home position? Does the pixhawk set the home position automatically when is armed?

Thank you in advance.

MAVROS version and platform

Mavros: 0.22.0 ROS: Kinetic Ubuntu: 16.04

Autopilot type and version

[X] ArduPilot [ ] PX4

Version: Copter 3.5.4

Node logs

started roslaunch server http://tegra-ubuntu:59792/

SUMMARY
========

CLEAR PARAMETERS
 * /mavros/

PARAMETERS
 * /mavros/cmd/use_comp_id_system_control: False
 * /mavros/conn/heartbeat_rate: 1.0
 * /mavros/conn/system_time_rate: 0.0
 * /mavros/conn/timeout: 10.0
 * /mavros/conn/timesync_rate: 0.0
 * /mavros/fcu_url: /dev/ttyTHS1:921600
 * /mavros/gcs_url: 
 * /mavros/global_position/frame_id: fcu
 * /mavros/global_position/rot_covariance: 99999.0
 * /mavros/global_position/tf/child_frame_id: fcu_utm
 * /mavros/global_position/tf/frame_id: local_origin
 * /mavros/global_position/tf/send: True
 * /mavros/image/frame_id: px4flow
 * /mavros/imu/angular_velocity_stdev: 0.000349065850399
 * /mavros/imu/frame_id: fcu
 * /mavros/imu/linear_acceleration_stdev: 0.0003
 * /mavros/imu/magnetic_stdev: 0.0
 * /mavros/imu/orientation_stdev: 1.0
 * /mavros/local_position/frame_id: fcu
 * /mavros/local_position/tf/child_frame_id: base_link
 * /mavros/local_position/tf/frame_id: world
 * /mavros/local_position/tf/send: True
 * /mavros/mission/pull_after_gcs: True
 * /mavros/mocap/use_pose: True
 * /mavros/mocap/use_tf: False
 * /mavros/plugin_blacklist: ['actuator_contro...
 * /mavros/plugin_whitelist: []
 * /mavros/px4flow/frame_id: px4flow
 * /mavros/px4flow/ranger_fov: 0.0
 * /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_throttle: False
 * /mavros/setpoint_attitude/tf/child_frame_id: attitude
 * /mavros/setpoint_attitude/tf/frame_id: local_origin
 * /mavros/setpoint_attitude/tf/listen: False
 * /mavros/setpoint_attitude/tf/rate_limit: 10.0
 * /mavros/setpoint_position/tf/child_frame_id: setpoint
 * /mavros/setpoint_position/tf/frame_id: local_origin
 * /mavros/setpoint_position/tf/listen: False
 * /mavros/setpoint_position/tf/rate_limit: 50.0
 * /mavros/startup_px4_usb_quirk: False
 * /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/vibration/frame_id: vibration
 * /mavros/vision_pose/tf/child_frame_id: vision
 * /mavros/vision_pose/tf/frame_id: local_origin
 * /mavros/vision_pose/tf/listen: False
 * /mavros/vision_pose/tf/rate_limit: 10.0
 * /mavros/vision_speed/listen_twist: False
 * /rosdistro: kinetic
 * /rosversion: 1.12.7

NODES
  /
    mavros (mavros/mavros_node)

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

setting /run_id to 906dec5a-05ee-11e8-a576-00044b66f56f
process[rosout-1]: started with pid [12511]
started core service [/rosout]
process[mavros-2]: started with pid [12529]
[ INFO] [1517338283.507641628]: FCU URL: /dev/ttyTHS1:921600
[ WARN] [1517338283.510153420]: init: message from ASLUAV, MSG-ID 201 ignored! Table has different entry.
[ WARN] [1517338283.510667007]: init: message from autoquad, MSG-ID 150 ignored! Table has different entry.
[ WARN] [1517338283.510710392]: init: message from autoquad, MSG-ID 152 ignored! Table has different entry.
[ WARN] [1517338283.511159918]: init: message from matrixpilot, MSG-ID 150 ignored! Table has different entry.
[ WARN] [1517338283.511202157]: init: message from matrixpilot, MSG-ID 151 ignored! Table has different entry.
[ WARN] [1517338283.511241479]: init: message from matrixpilot, MSG-ID 152 ignored! Table has different entry.
[ WARN] [1517338283.511277781]: init: message from matrixpilot, MSG-ID 153 ignored! Table has different entry.
[ WARN] [1517338283.511313770]: init: message from matrixpilot, MSG-ID 155 ignored! Table has different entry.
[ WARN] [1517338283.511350228]: init: message from matrixpilot, MSG-ID 156 ignored! Table has different entry.
[ WARN] [1517338283.511386113]: init: message from matrixpilot, MSG-ID 157 ignored! Table has different entry.
[ WARN] [1517338283.511421321]: init: message from matrixpilot, MSG-ID 158 ignored! Table has different entry.
[ WARN] [1517338283.511462727]: init: message from matrixpilot, MSG-ID 170 ignored! Table has different entry.
[ WARN] [1517338283.511498768]: init: message from matrixpilot, MSG-ID 171 ignored! Table has different entry.
[ WARN] [1517338283.511534444]: init: message from matrixpilot, MSG-ID 172 ignored! Table has different entry.
[ WARN] [1517338283.511569652]: init: message from matrixpilot, MSG-ID 173 ignored! Table has different entry.
[ WARN] [1517338283.511604756]: init: message from matrixpilot, MSG-ID 174 ignored! Table has different entry.
[ WARN] [1517338283.511639912]: init: message from matrixpilot, MSG-ID 175 ignored! Table has different entry.
[ WARN] [1517338283.511676891]: init: message from matrixpilot, MSG-ID 176 ignored! Table has different entry.
[ WARN] [1517338283.511712567]: init: message from matrixpilot, MSG-ID 177 ignored! Table has different entry.
[ WARN] [1517338283.511748661]: init: message from matrixpilot, MSG-ID 178 ignored! Table has different entry.
[ WARN] [1517338283.511784598]: init: message from matrixpilot, MSG-ID 179 ignored! Table has different entry.
[ WARN] [1517338283.511821108]: init: message from matrixpilot, MSG-ID 180 ignored! Table has different entry.
[ WARN] [1517338283.511856472]: init: message from matrixpilot, MSG-ID 181 ignored! Table has different entry.
[ WARN] [1517338283.511892305]: init: message from matrixpilot, MSG-ID 182 ignored! Table has different entry.
[ WARN] [1517338283.511927356]: init: message from matrixpilot, MSG-ID 183 ignored! Table has different entry.
[ WARN] [1517338283.511964595]: init: message from matrixpilot, MSG-ID 184 ignored! Table has different entry.
[ WARN] [1517338283.512001574]: init: message from matrixpilot, MSG-ID 185 ignored! Table has different entry.
[ WARN] [1517338283.512037147]: init: message from matrixpilot, MSG-ID 186 ignored! Table has different entry.
[ WARN] [1517338283.512495422]: init: message from paparazzi, MSG-ID 180 ignored! Table has different entry.
[ WARN] [1517338283.512532817]: init: message from paparazzi, MSG-ID 181 ignored! Table has different entry.
[ WARN] [1517338283.512568338]: init: message from paparazzi, MSG-ID 182 ignored! Table has different entry.
[ WARN] [1517338283.512603858]: init: message from paparazzi, MSG-ID 183 ignored! Table has different entry.
[ WARN] [1517338283.512639066]: init: message from paparazzi, MSG-ID 184 ignored! Table has different entry.
[ WARN] [1517338283.513080571]: init: message from slugs, MSG-ID 170 ignored! Table has different entry.
[ WARN] [1517338283.513118071]: init: message from slugs, MSG-ID 172 ignored! Table has different entry.
[ WARN] [1517338283.513153435]: init: message from slugs, MSG-ID 173 ignored! Table has different entry.
[ WARN] [1517338283.513188330]: init: message from slugs, MSG-ID 176 ignored! Table has different entry.
[ WARN] [1517338283.513223486]: init: message from slugs, MSG-ID 177 ignored! Table has different entry.
[ WARN] [1517338283.513258381]: init: message from slugs, MSG-ID 179 ignored! Table has different entry.
[ WARN] [1517338283.513293433]: init: message from slugs, MSG-ID 180 ignored! Table has different entry.
[ WARN] [1517338283.513328433]: init: message from slugs, MSG-ID 181 ignored! Table has different entry.
[ WARN] [1517338283.513363536]: init: message from slugs, MSG-ID 184 ignored! Table has different entry.
[ WARN] [1517338283.513400046]: init: message from slugs, MSG-ID 185 ignored! Table has different entry.
[ WARN] [1517338283.513437233]: init: message from slugs, MSG-ID 186 ignored! Table has different entry.
[ WARN] [1517338283.513472389]: init: message from slugs, MSG-ID 188 ignored! Table has different entry.
[ WARN] [1517338283.513514889]: init: message from slugs, MSG-ID 191 ignored! Table has different entry.
[ WARN] [1517338283.513551919]: init: message from slugs, MSG-ID 192 ignored! Table has different entry.
[ WARN] [1517338283.513587544]: init: message from slugs, MSG-ID 193 ignored! Table has different entry.
[ WARN] [1517338283.513622491]: init: message from slugs, MSG-ID 194 ignored! Table has different entry.
[ INFO] [1517338283.514901746]: serial0: device: /dev/ttyTHS1 @ 921600 bps
[ INFO] [1517338283.516130741]: GCS bridge disabled
[ INFO] [1517338283.529901820]: Plugin 3dr_radio blacklisted
[ INFO] [1517338283.530107807]: Plugin actuator_control blacklisted
[ INFO] [1517338283.619815075]: Plugin adsb loaded
[ INFO] [1517338283.640813511]: Plugin adsb initialized
[ INFO] [1517338283.641011998]: Plugin altitude blacklisted
[ INFO] [1517338283.641088247]: Plugin cam_imu_sync blacklisted
[ INFO] [1517338283.759263545]: Plugin command loaded
[ INFO] [1517338283.786652163]: Plugin command initialized
[ INFO] [1517338283.787115282]: Plugin debug_value loaded
[ INFO] [1517338283.814523222]: Plugin debug_value initialized
[ INFO] [1517338283.814617856]: Plugin distance_sensor blacklisted
[ INFO] [1517338283.815366076]: Plugin fake_gps loaded
[ INFO] [1517338283.857904296]: Plugin fake_gps initialized
[ INFO] [1517338283.857992367]: Plugin ftp blacklisted
[ INFO] [1517338283.858447831]: Plugin global_position loaded
[ INFO] [1517338283.925703607]: Plugin global_position initialized
[ INFO] [1517338283.926334537]: Plugin hil loaded
[ INFO] [1517338283.984996150]: Plugin hil initialized
[ INFO] [1517338283.985508800]: Plugin home_position loaded
[ INFO] [1517338284.001769587]: Plugin home_position initialized
[ INFO] [1517338284.002262497]: Plugin imu loaded
[ INFO] [1517338284.031959939]: Plugin imu initialized
[ INFO] [1517338284.032449621]: Plugin local_position loaded
[ INFO] [1517338284.055014756]: Plugin local_position initialized
[ INFO] [1517338284.055491208]: Plugin manual_control loaded
[ INFO] [1517338284.058511379]: Plugin manual_control initialized
[ INFO] [1517338284.058601742]: Plugin mocap_pose_estimate blacklisted
[ INFO] [1517338284.058967675]: Plugin odom loaded
[ INFO] [1517338284.072977969]: Plugin odom initialized
[ INFO] [1517338284.073743116]: Plugin param loaded
[ INFO] [1517338284.086305616]: Plugin param initialized
[ INFO] [1517338284.086396292]: Plugin px4flow blacklisted
[ INFO] [1517338284.086784724]: Plugin rangefinder loaded
[ INFO] [1517338284.089791249]: Plugin rangefinder initialized
[ INFO] [1517338284.090387127]: Plugin rc_io loaded
[ INFO] [1517338284.106625102]: Plugin rc_io initialized
[ INFO] [1517338284.106718486]: Plugin safety_area blacklisted
[ INFO] [1517338284.106771975]: Plugin setpoint_accel blacklisted
[ INFO] [1517338284.106814110]: Plugin setpoint_attitude blacklisted
[ INFO] [1517338284.106868745]: Plugin setpoint_position blacklisted
[ INFO] [1517338284.106912859]: Plugin setpoint_raw blacklisted
[ INFO] [1517338284.106954056]: Plugin setpoint_velocity blacklisted
[ INFO] [1517338284.107740921]: Plugin sys_status loaded
[ INFO] [1517338284.134374756]: Plugin sys_status initialized
[ INFO] [1517338284.134894437]: Plugin sys_time loaded
[ INFO] [1517338284.146888350]: TM: Timesync mode: MAVLINK
[ INFO] [1517338284.149572171]: Plugin sys_time initialized
[ INFO] [1517338284.150056488]: Plugin vfr_hud loaded
[ INFO] [1517338284.155378140]: Plugin vfr_hud initialized
[ INFO] [1517338284.155475483]: Plugin vibration blacklisted
[ INFO] [1517338284.155525899]: Plugin vision_pose_estimate blacklisted
[ INFO] [1517338284.155567721]: Plugin vision_speed_estimate blacklisted
[ INFO] [1517338284.155621887]: Plugin waypoint blacklisted
[ INFO] [1517338284.155811208]: Built-in SIMD instructions: ARM NEON
[ INFO] [1517338284.155873759]: Built-in MAVLink package version: 2018.1.1
[ INFO] [1517338284.155933289]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1517338284.155983445]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ WARN] [1517338284.172264023]: IMU: linear acceleration on RAW_IMU known on APM only.
[ WARN] [1517338284.172372616]: IMU: ~imu/data_raw stores unscaled raw acceleration report.
[ INFO] [1517338284.191095820]: RC_CHANNELS message detected!
[ INFO] [1517338284.942604366]: CON: Got HEARTBEAT, connected. FCU: ArduPilotMega / ArduCopter
[ INFO] [1517338285.008931560]: RC_CHANNELS message detected!
[ INFO] [1517338285.988384339]: VER: 1.1: Capabilities         0x0000000000001bcf
[ INFO] [1517338285.989105632]: VER: 1.1: Flight software:     030504ff (284349c30384802e1bcae90b)
[ INFO] [1517338285.989673594]: VER: 1.1: Middleware software: 00000000 (0384802e1bcae90b)
[ INFO] [1517338285.990574311]: VER: 1.1: OS software:         00000000 (1bcae90b)
[ INFO] [1517338285.991444040]: VER: 1.1: Board hardware:      00000000
[ INFO] [1517338285.992296634]: VER: 1.1: VID/PID:             0000:0000
[ INFO] [1517338285.993141727]: VER: 1.1: UID:                 0000000000000000
[ WARN] [1517338285.995259253]: CMD: Unexpected command 520, result 0
[ INFO] [1517338294.949929667]: HP: requesting home position
[ INFO] [1517338294.963579079]: FCU: APM:Copter V3.5.4 (284349c3)
[ INFO] [1517338294.964120843]: FCU: PX4: 0384802e NuttX: 1bcae90b
[ INFO] [1517338294.964514745]: FCU: Frame: HEXA
[ INFO] [1517338294.964988332]: FCU: PX4v3 00490020 30365110 35323931
[ INFO] [1517338304.950367385]: HP: requesting home position
[ WARN] [1517338307.298060208]: PR: Param STAT_FLTTIME (65535/773): <value><i4>1028</i4></value> different index: 601/773
[ WARN] [1517338307.303240924]: PR: Param STAT_RUNTIME (65535/773): <value><i4>47685</i4></value> different index: 602/773
[ INFO] [1517338312.554192539]: PR: parameters list received
[ INFO] [1517338314.949398666]: HP: requesting home position
[ INFO] [1517338324.949587453]: HP: requesting home position

Diagnostics

header: 
  seq: 65
  stamp: 
    secs: 1517338363
    nsecs: 661646696
  frame_id: ''
status: 
  - 
    level: 0
    name: mavros: FCU connection
    message: connected
    hardware_id: /dev/ttyTHS1:921600
    values: 
      - 
        key: Received packets:
        value: 17655
      - 
        key: Dropped packets:
        value: 0
      - 
        key: Buffer overruns:
        value: 0
      - 
        key: Parse errors:
        value: 0
      - 
        key: Rx sequence number:
        value: 99
      - 
        key: Tx sequence number:
        value: 88
      - 
        key: Rx total bytes:
        value: 533145
      - 
        key: Tx total bytes:
        value: 1681
      - 
        key: Rx speed:
        value: 11450.000000
      - 
        key: Tx speed:
        value: 17.000000
  - 
    level: 0
    name: mavros: GPS
    message: 3D fix
    hardware_id: /dev/ttyTHS1:921600
    values: 
      - 
        key: Satellites visible
        value: 7
      - 
        key: Fix type
        value: 3
      - 
        key: EPH (m)
        value: 1.65
      - 
        key: EPV (m)
        value: 2.55
  - 
    level: 0
    name: mavros: Heartbeat
    message: Normal
    hardware_id: /dev/ttyTHS1:921600
    values: 
      - 
        key: Heartbeats since startup
        value: 78
      - 
        key: Frequency (Hz)
        value: 0.962971
      - 
        key: Vehicle type
        value: Hexarotor
      - 
        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/ttyTHS1:921600
    values: 
      - 
        key: Sensor present
        value: 0x0361FC2F
      - 
        key: Sensor enabled
        value: 0x02619C2F
      - 
        key: Sensor helth
        value: 0x0361FC2F
      - 
        key: 3D gyro
        value: Ok
      - 
        key: 3D accelerometer
        value: Ok
      - 
        key: 3D magnetometer
        value: Ok
      - 
        key: absolute pressure
        value: Ok
      - 
        key: GPS
        value: Ok
      - 
        key: 3D angular rate control
        value: Ok
      - 
        key: attitude stabilization
        value: Ok
      - 
        key: yaw position
        value: Ok
      - 
        key: motor outputs / control
        value: Ok
      - 
        key: rc receiver
        value: Ok
      - 
        key: AHRS subsystem health
        value: Ok
      - 
        key: Terrain subsystem health
        value: Ok
      - 
        key: Battery
        value: Ok
      - 
        key: CPU Load (%)
        value: 53.2
      - 
        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/ttyTHS1:921600
    values: 
      - 
        key: Voltage
        value: 13.01
      - 
        key: Current
        value: 0.0
      - 
        key: Remaining
        value: 99.0
---

Check ID

OK. I got messages from 1:1.

---
Received 3782 messages, from 1 addresses
sys:comp   list of messages
  1:1     0, 129, 2, 1, 136, 137, 24, 147, 150, 152, 27, 29, 30, 193, 33, 35, 36, 165, 42, 178, 182, 62, 65, 74, 77, 163, 241, 116, 125
TSC21 commented 6 years ago
  1. I don't know how it works with APM, but the logical is that you can only receive the local position from the vehicle if know where it is (position lock). So the question is, are you feeding any kind of position source to the vehicle?
  2. APM internals can probably let you set the stream on the vehicle starting config, so you don't have to use MAVROS for it.
  3. That will soon be fixed by https://github.com/mavlink/mavros/issues/834. Though, not a problem.
  4. That just confirms what I said in 1. - no position lock, no home position set. That's basically warning you that you don't have home position set, which the autopilot should set automatically when it gets a position lock (it does not set when arms, but rather when it actually is able to estimate is position).
aaraujo11 commented 6 years ago

Hi @TSC21, You are right, the place where i was testing, somehow didn't have enough data/signal to perform lock position, i change the place of test, and that's it, the controller starts to stream local position. Thank you very much!

TSC21 commented 6 years ago

Boa sorte!

aaraujo11 commented 6 years ago

Obrigado Nuno!