mavlink / mavros

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

FCU not connected, given that TX/RX seems to be functioning #1592

Closed hanzheteng closed 3 years ago

hanzheteng commented 3 years ago

Issue details

The mavros launch file got stuck at the line of MAVROS started. MY ID 1.240, TARGET ID 1.1. In the diagnostic message, it says that FCU is not connected.

Efforts so far:

Potential influence:

At this point I am still not entirely sure if this is a hardware issue (e.g., damaged FCU), or a software issue (e.g., incompatible/mismatched version). It seems to me that the computer and FCU are indeed exchanging data, bi-directionally, but somehow they don't recognize each other. (The baud rate is also matched, BTW). Went through existing issues but didn't get any more inspiration. Any hints or testing suggestions are appreciated.

MAVROS version and platform

Mavros: 1.8.0 (May 2021) ROS: Melodic Ubuntu: 18.04 Onboard computer: Jetson Xavier NX Autopilot: Pixhawk 4 Connection: Onboard computer and Pixhawk is directly connected via a FTDI chip (USB-JST)

Autopilot type and version

[X] PX4

Version: 1.11.3 (Jan 2021)

Node logs


... logging to /home/arcs/.ros/log/e06f65a2-e69c-11eb-868f-204ef6c5ef8f/roslaunch-xavier-nx-9241.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://xavier-nx:45997/

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/horizontal_fov_ratio: 1.0
 * /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/distance_sensor/sonar_1_sub/vertical_fov_ratio: 1.0
 * /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/ttyPixhawk:9...
 * /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.0003490659 // 0...
 * /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/landing_target/camera/fov_x: 2.0071286398
 * /mavros/landing_target/camera/fov_y: 2.0071286398
 * /mavros/landing_target/image/height: 480
 * /mavros/landing_target/image/width: 640
 * /mavros/landing_target/land_target_type: VISION_FIDUCIAL
 * /mavros/landing_target/listen_lt: False
 * /mavros/landing_target/mav_frame: LOCAL_NED
 * /mavros/landing_target/target_size/x: 0.3
 * /mavros/landing_target/target_size/y: 0.3
 * /mavros/landing_target/tf/child_frame_id: camera_center
 * /mavros/landing_target/tf/frame_id: landing_target
 * /mavros/landing_target/tf/listen: False
 * /mavros/landing_target/tf/rate_limit: 10.0
 * /mavros/landing_target/tf/send: True
 * /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/mission/use_mission_item_int: True
 * /mavros/mocap/use_pose: True
 * /mavros/mocap/use_tf: False
 * /mavros/odometry/fcu/odom_child_id_des: base_link
 * /mavros/odometry/fcu/odom_parent_id_des: map
 * /mavros/plugin_blacklist: ['safety_area', '...
 * /mavros/plugin_whitelist: []
 * /mavros/px4flow/frame_id: px4flow
 * /mavros/px4flow/ranger_fov: 0.118682
 * /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_raw/thrust_scaling: 1.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: odom
 * /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
 * /mavros/wheel_odometry/child_frame_id: base_link
 * /mavros/wheel_odometry/count: 2
 * /mavros/wheel_odometry/frame_id: odom
 * /mavros/wheel_odometry/send_raw: True
 * /mavros/wheel_odometry/send_twist: False
 * /mavros/wheel_odometry/tf/child_frame_id: base_link
 * /mavros/wheel_odometry/tf/frame_id: odom
 * /mavros/wheel_odometry/tf/send: False
 * /mavros/wheel_odometry/use_rpm: False
 * /mavros/wheel_odometry/vel_error: 0.1
 * /mavros/wheel_odometry/wheel0/radius: 0.05
 * /mavros/wheel_odometry/wheel0/x: 0.0
 * /mavros/wheel_odometry/wheel0/y: -0.15
 * /mavros/wheel_odometry/wheel1/radius: 0.05
 * /mavros/wheel_odometry/wheel1/x: 0.0
 * /mavros/wheel_odometry/wheel1/y: 0.15
 * /rosdistro: melodic
 * /rosversion: 1.14.11

NODES
  /
    mavros (mavros/mavros_node)

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

setting /run_id to e06f65a2-e69c-11eb-868f-204ef6c5ef8f
process[rosout-1]: started with pid [9274]
started core service [/rosout]
process[mavros-2]: started with pid [9292]
[ INFO] [1626484706.106608517]: FCU URL: /dev/ttyPixhawk:921600
[ INFO] [1626484706.122183026]: serial0: device: /dev/ttyPixhawk @ 921600 bps
[ INFO] [1626484706.127313633]: GCS bridge disabled
[ INFO] [1626484706.216414014]: Plugin 3dr_radio loaded
[ INFO] [1626484706.226066815]: Plugin 3dr_radio initialized
[ INFO] [1626484706.226602365]: Plugin actuator_control loaded
[ INFO] [1626484706.245522623]: Plugin actuator_control initialized
[ INFO] [1626484706.283764034]: Plugin adsb loaded
[ INFO] [1626484706.304985981]: Plugin adsb initialized
[ INFO] [1626484706.306081017]: Plugin altitude loaded
[ INFO] [1626484706.312952611]: Plugin altitude initialized
[ INFO] [1626484706.313807552]: Plugin cam_imu_sync loaded
[ INFO] [1626484706.317688947]: Plugin cam_imu_sync initialized
[ INFO] [1626484706.318698704]: Plugin command loaded
[ INFO] [1626484706.361426500]: Plugin command initialized
[ INFO] [1626484706.362219682]: Plugin companion_process_status loaded
[ INFO] [1626484706.378914859]: Plugin companion_process_status initialized
[ INFO] [1626484706.379717001]: Plugin debug_value loaded
[ INFO] [1626484706.410641668]: Plugin debug_value initialized
[ INFO] [1626484706.410884163]: Plugin distance_sensor blacklisted
[ INFO] [1626484706.411707520]: Plugin esc_status loaded
[ INFO] [1626484706.419195432]: Plugin esc_status initialized
[ INFO] [1626484706.420249604]: Plugin fake_gps loaded
[ INFO] [1626484706.523978353]: Plugin fake_gps initialized
[ INFO] [1626484706.525084270]: Plugin ftp loaded
[ INFO] [1626484706.568085697]: Plugin ftp initialized
[ INFO] [1626484706.569318941]: Plugin geofence loaded
[ INFO] [1626484706.589865818]: Plugin geofence initialized
[ INFO] [1626484706.590973942]: Plugin global_position loaded
[ INFO] [1626484706.696679165]: Plugin global_position initialized
[ INFO] [1626484706.697733562]: Plugin gps_rtk loaded
[ INFO] [1626484706.718210903]: Plugin gps_rtk initialized
[ INFO] [1626484706.718992948]: Plugin gps_status loaded
[ INFO] [1626484706.733592676]: Plugin gps_status initialized
[ INFO] [1626484706.734744513]: Plugin hil loaded
[ INFO] [1626484706.820343689]: Plugin hil initialized
[ INFO] [1626484706.821442245]: Plugin home_position loaded
[ INFO] [1626484706.843747453]: Plugin home_position initialized
[ INFO] [1626484706.844749593]: Plugin imu loaded
[ INFO] [1626484706.889903174]: Plugin imu initialized
[ INFO] [1626484706.890759811]: Plugin landing_target loaded
[ INFO] [1626484706.983594611]: Plugin landing_target initialized
[ INFO] [1626484706.984622032]: Plugin local_position loaded
[ INFO] [1626484707.025838638]: Plugin local_position initialized
[ INFO] [1626484707.026676523]: Plugin log_transfer loaded
[ INFO] [1626484707.044245813]: Plugin log_transfer initialized
[ INFO] [1626484707.045342866]: Plugin manual_control loaded
[ INFO] [1626484707.065075445]: Plugin manual_control initialized
[ INFO] [1626484707.065965938]: Plugin mocap_pose_estimate loaded
[ INFO] [1626484707.091194053]: Plugin mocap_pose_estimate initialized
[ INFO] [1626484707.092015971]: Plugin mount_control loaded
[ INFO] [1626484707.114578653]: Plugin mount_control initialized
[ INFO] [1626484707.115465787]: Plugin obstacle_distance loaded
[ INFO] [1626484707.133635651]: Plugin obstacle_distance initialized
[ INFO] [1626484707.134682240]: Plugin odom loaded
[ INFO] [1626484707.164441541]: Plugin odom initialized
[ INFO] [1626484707.165329666]: Plugin onboard_computer_status loaded
[ INFO] [1626484707.180666931]: Plugin onboard_computer_status initialized
[ INFO] [1626484707.181854479]: Plugin param loaded
[ INFO] [1626484707.199131482]: Plugin param initialized
[ INFO] [1626484707.199946936]: Plugin play_tune loaded
[ INFO] [1626484707.216350405]: Plugin play_tune initialized
[ INFO] [1626484707.217293283]: Plugin px4flow loaded
[ INFO] [1626484707.260735901]: Plugin px4flow initialized
[ INFO] [1626484707.261753850]: Plugin rallypoint loaded
[ INFO] [1626484707.279461124]: Plugin rallypoint initialized
[ INFO] [1626484707.279670755]: Plugin rangefinder blacklisted
[ INFO] [1626484707.280743488]: Plugin rc_io loaded
[ INFO] [1626484707.302908284]: Plugin rc_io initialized
[ INFO] [1626484707.303144667]: Plugin safety_area blacklisted
[ INFO] [1626484707.304025145]: Plugin setpoint_accel loaded
[ INFO] [1626484707.324925305]: Plugin setpoint_accel initialized
[ INFO] [1626484707.326330836]: Plugin setpoint_attitude loaded
[ INFO] [1626484707.389040980]: Plugin setpoint_attitude initialized
[ INFO] [1626484707.390034673]: Plugin setpoint_position loaded
[ INFO] [1626484707.488038533]: Plugin setpoint_position initialized
[ INFO] [1626484707.489016258]: Plugin setpoint_raw loaded
[ INFO] [1626484707.545421973]: Plugin setpoint_raw initialized
[ INFO] [1626484707.546427730]: Plugin setpoint_trajectory loaded
[ INFO] [1626484707.575444377]: Plugin setpoint_trajectory initialized
[ INFO] [1626484707.576419702]: Plugin setpoint_velocity loaded
[ INFO] [1626484707.612425544]: Plugin setpoint_velocity initialized
[ INFO] [1626484707.614112930]: Plugin sys_status loaded
[ INFO] [1626484707.678509309]: Plugin sys_status initialized
[ INFO] [1626484707.679510650]: Plugin sys_time loaded
[ INFO] [1626484707.715272300]: TM: Timesync mode: MAVLINK
[ INFO] [1626484707.722494902]: Plugin sys_time initialized
[ INFO] [1626484707.723430515]: Plugin trajectory loaded
[ INFO] [1626484707.757186860]: Plugin trajectory initialized
[ INFO] [1626484707.758160777]: Plugin vfr_hud loaded
[ INFO] [1626484707.762628603]: Plugin vfr_hud initialized
[ INFO] [1626484707.762890138]: Plugin vibration blacklisted
[ INFO] [1626484707.763588952]: Plugin vision_pose_estimate loaded
[ INFO] [1626484707.812247427]: Plugin vision_pose_estimate initialized
[ INFO] [1626484707.813360224]: Plugin vision_speed_estimate loaded
[ INFO] [1626484707.838105684]: Plugin vision_speed_estimate initialized
[ INFO] [1626484707.839092721]: Plugin waypoint loaded
[ INFO] [1626484707.870426321]: Plugin waypoint initialized
[ INFO] [1626484707.870700144]: Plugin wheel_odometry blacklisted
[ INFO] [1626484707.871639629]: Plugin wind_estimation loaded
[ INFO] [1626484707.876000896]: Plugin wind_estimation initialized
[ INFO] [1626484707.876467998]: Autostarting mavlink via USB on PX4
[ INFO] [1626484707.877347004]: Built-in SIMD instructions: ARM NEON
[ INFO] [1626484707.877569915]: Built-in MAVLink package version: 2021.3.3
[ INFO] [1626484707.877844634]: Known MAVLink dialects: common ardupilotmega ASLUAV all autoquad icarous matrixpilot paparazzi standard uAvionix ualberta
[ INFO] [1626484707.878015418]: MAVROS started. MY ID 1.240, TARGET ID 1.1

Diagnostics

header: 
  seq: 80
  stamp: 
    secs: 1626484816
    nsecs: 878943258
  frame_id: ''
status: 
  - 
    level: 1
    name: "mavros: FCU connection"
    message: "not connected"
    hardware_id: "/dev/ttyPixhawk:921600"
    values: 
      - 
        key: "Received packets:"
        value: "2"
      - 
        key: "Dropped packets:"
        value: "0"
      - 
        key: "Buffer overruns:"
        value: "0"
      - 
        key: "Parse errors:"
        value: "0"
      - 
        key: "Rx sequence number:"
        value: "53"
      - 
        key: "Tx sequence number:"
        value: "0"
      - 
        key: "Rx total bytes:"
        value: "1270113"
      - 
        key: "Tx total bytes:"
        value: "34937"
      - 
        key: "Rx speed:"
        value: "17120.000000"
      - 
        key: "Tx speed:"
        value: "500.000000"
  - 
    level: 2
    name: "mavros: GPS"
    message: "No satellites"
    hardware_id: "/dev/ttyPixhawk:921600"
    values: 
      - 
        key: "Satellites visible"
        value: "0"
      - 
        key: "Fix type"
        value: "0"
      - 
        key: "EPH (m)"
        value: "Unknown"
      - 
        key: "EPV (m)"
        value: "Unknown"
  - 
    level: 2
    name: "mavros: Heartbeat"
    message: "No events recorded."
    hardware_id: "/dev/ttyPixhawk:921600"
    values: 
      - 
        key: "Heartbeats since startup"
        value: "0"
      - 
        key: "Frequency (Hz)"
        value: "0.000000"
      - 
        key: "Vehicle type"
        value: "Generic micro air vehicle"
      - 
        key: "Autopilot type"
        value: "Generic autopilot"
      - 
        key: "Mode"
        value: ''
      - 
        key: "System status"
        value: "Uninit"
  - 
    level: 0
    name: "mavros: System"
    message: "Normal"
    hardware_id: "/dev/ttyPixhawk:921600"
    values: 
      - 
        key: "Sensor present"
        value: "0x00000000"
      - 
        key: "Sensor enabled"
        value: "0x00000000"
      - 
        key: "Sensor health"
        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/ttyPixhawk:921600"
    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/ttyPixhawk:921600"
    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)"
        value: "0.000000000"
---

Check ID

ERROR. I got 430 addresses, but not your target 1:1

---
Received 1008 messages, from 430 addresses
sys:comp   list of messages
 128:27    251
  0:100   201, 50
 160:123   172
 32:44    217, 215
 129:60    57
 160:148   200, 41, 207, 211, 201, 251
 39:45    254
 165:255   254
 11:129   64, 228, 36
 128:234   221
 160:3     128, 197
 173:171   235
 32:224   213
 187:148   154
 156:254   18
 32:228   65, 82, 211, 213, 137
 128:18    250
 219:254   34
 129:234   177
 32:188   202, 194, 221, 223
 43:167   242
 129:140   124
 163:203   138
 128:203   106, 159
 125:194   124
 160:36    41, 210, 205
 171:242   254
 128:122   231
 128:36    73, 117
 128:114   201
 129:114   202, 228
  0:36    75
 128:236   162, 149
 129:20    228, 202, 235, 141, 146, 219
 107:234   254
 32:168   27
 32:52    224, 137, 195, 205, 233
 160:204   192
 254:10    129
 211:67    249
 129:32    224, 192, 100, 165, 102, 236, 172, 146, 14, 210, 20, 212
 160:162   210
 128:91    214
 143:254   188
 235:157   141
  3:251   254
 216:232   42
 32:212   33, 98, 197, 75, 242, 215, 250
  3:129   132
 129:228   229, 205, 166, 101
 160:195   139
 59:150   254
 32:42    233
 129:176   215, 60, 149, 223
 128:82    217
 160:114   221
 129:170   131, 38, 104, 77, 206, 145, 18, 67
 32:124   106, 195, 202
 43:192   254
 215:170   164
 189:147   228
 160:116   196, 170, 210, 147, 213, 91
 32:82    45
 160:228   202
 160:138   213
 134:231   130
 160:218   125
 211:198   254
 238:254   18
 91:171   254
 160:83    33, 50
 32:100   81, 178, 236, 106, 207
 129:50    213
 128:190   179
 137:254   26, 212
 32:4     81, 210, 21, 250, 213
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/timer.py", line 234, in run
    self._callback(TimerEvent(last_expected, last_real, current_expected, current_real, last_duration))
  File "/home/arcs/catkin_ws/src/mavros/mavros/scripts/checkid", line 82, in timer_cb
    for address, messages in self.message_sources.iteritems():
RuntimeError: dictionary changed size during iteration

launch file: px4.launch

vooon commented 3 years ago

From diagnostics i see that something coming in at relatively high speed, but only 2 messages ok. From checkid i see that it is having some complete garbage messages (checkid do not verify framing status, which likely indicating CRC errors).

From that facts i can suspect that you're having problem with hardware link. Please verify that you properly connected Rx-Tx and Grounds, and that you do not have ground loops, which can cause a lot of noise. If you could, i suggest to use some simple oscilloscope to check signal conditions. Most of the pins on STM32 are 5V tolerant, so probably you hadn't damaged it. Anyway you can try to use TELEM1.

hanzheteng commented 3 years ago

Thank you for the constructive feedback. It ends up with the case that both cables I used are problematic.

The mRo USB FTDI Serial to JST-GH adapter is not a ready-to-go product (though recommended by PX4 docs in this section). I have to swap the TX and RX cables (cut them off and solder again). As for the second adapter I used, the chip is not a proper one and the noise level is too high (soldering was bad).

After fixing the hardware link, I made it work on the TELEM2 port. Out of curiosity, I also tested it with the FTDI chip in 5V mode, and it worked as well (the red power pin is not connected anyway). As you pointed out that most pins are 5V tolerant, I didn't really damage the port. Also found it in this section in PX4 docs,

All Pixhawk serial ports operate at 3.3V and are 5V level compatible.

Thanks again for the help. I am closing this issue.