mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
875 stars 987 forks source link

Mavros connection error #1818

Closed bilalkah closed 1 year ago

bilalkah commented 1 year ago

Issue details

I am having struggle to connect PX4 device with mavros. I use same launch file with same parameters and sometimes it works sometimes it does not. Devices is connecting to QGroundcontrol directly when I plug it to my computer via USB port and I can see it in /dev and /dev/serial/by-id/ folder. Also it does boot normally the tune sounds and the led colors are correct. So where is the problem? I tried several baudrates and nothing changed. I tried 57600, 115200 and 921600, response was same. Sometimes connecting and sometimes not. I tried it with two different computer and the results are same.

Additionally, I have connected device before. Then I changed the autopilot to Ardupilot to see something for 3 days. Then I changed it back to PX4 and there is mavros connection problem.

MAVROS version and platform

Mavros: 1.13.0 ROS: Melodic Ubuntu: 18.04

Autopilot type and version

[ ] ArduPilot [ x ] PX4

Version: ?1.13.2?

Node logs

... logging to /root/.ros/log/ba88ffa4-881e-11ed-b932-70f754eb32bb/roslaunch-Khadas-437.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://192.168.100.167:34349/

SUMMARY
========

CLEAR PARAMETERS
 * /mavros/

PARAMETERS
 * /mavros/camera/frame_id: base_link
 * /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/serial/by-id...
 * /mavros/gcs_url: udp://:15760@192....
 * /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.13

NODES
  /
    mavros (mavros/mavros_node)

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

setting /run_id to ba88ffa4-881e-11ed-b932-70f754eb32bb
process[rosout-1]: started with pid [458]
started core service [/rosout]
process[mavros-2]: started with pid [466]
[ INFO] [1672390112.175863793]: FCU URL: /dev/serial/by-id/usb-3D_Robotics_PX4_FMU_v5.x_0-if00:115200
[ INFO] [1672390112.180392400]: serial0: device: /dev/serial/by-id/usb-3D_Robotics_PX4_FMU_v5.x_0-if00 @ 115200 bps
[ INFO] [1672390112.181282346]: GCS URL: udp://:15760@192.168.100.175:14550
[ INFO] [1672390112.181765007]: udp1: Bind address: 0.0.0.0:15760
[ INFO] [1672390112.181978920]: udp1: Remote address: 192.168.100.175:14550
[ INFO] [1672390112.202652480]: Plugin 3dr_radio loaded
[ INFO] [1672390112.205388569]: Plugin 3dr_radio initialized
[ INFO] [1672390112.205585733]: Plugin actuator_control loaded
[ INFO] [1672390112.211183992]: Plugin actuator_control initialized
[ INFO] [1672390112.219160844]: Plugin adsb loaded
[ INFO] [1672390112.224327234]: Plugin adsb initialized
[ INFO] [1672390112.224590147]: Plugin altitude loaded
[ INFO] [1672390112.226682286]: Plugin altitude initialized
[ INFO] [1672390112.226934200]: Plugin cam_imu_sync loaded
[ INFO] [1672390112.228829883]: Plugin cam_imu_sync initialized
[ INFO] [1672390112.229057213]: Plugin camera loaded
[ INFO] [1672390112.230585985]: Plugin camera initialized
[ INFO] [1672390112.230837190]: Plugin command loaded
[ INFO] [1672390112.243715477]: Plugin command initialized
[ INFO] [1672390112.243955433]: Plugin companion_process_status loaded
[ INFO] [1672390112.248299042]: Plugin companion_process_status initialized
[ INFO] [1672390112.248551497]: Plugin debug_value loaded
[ INFO] [1672390112.257336255]: Plugin debug_value initialized
[ INFO] [1672390112.257430796]: Plugin distance_sensor blacklisted
[ INFO] [1672390112.257660793]: Plugin esc_status loaded
[ INFO] [1672390112.260313341]: Plugin esc_status initialized
[ INFO] [1672390112.260572962]: Plugin esc_telemetry loaded
[ INFO] [1672390112.262023318]: Plugin esc_telemetry initialized
[ INFO] [1672390112.262405355]: Plugin fake_gps loaded
[ INFO] [1672390112.284628810]: Plugin fake_gps initialized
[ INFO] [1672390112.284914223]: Plugin ftp loaded
[ INFO] [1672390112.297828385]: Plugin ftp initialized
[ INFO] [1672390112.298120256]: Plugin geofence loaded
[ INFO] [1672390112.303645142]: Plugin geofence initialized
[ INFO] [1672390112.304063636]: Plugin global_position loaded
[ INFO] [1672390112.327819113]: Plugin global_position initialized
[ INFO] [1672390112.328157900]: Plugin gps_input loaded
[ INFO] [1672390112.332272679]: Plugin gps_input initialized
[ INFO] [1672390112.332565342]: Plugin gps_rtk loaded
[ INFO] [1672390112.340158824]: Plugin gps_rtk initialized
[ INFO] [1672390112.340476903]: Plugin gps_status loaded
[ INFO] [1672390112.345291423]: Plugin gps_status initialized
[ INFO] [1672390112.345617335]: Plugin hil loaded
[ INFO] [1672390112.366603849]: Plugin hil initialized
[ INFO] [1672390112.367002302]: Plugin home_position loaded
[ INFO] [1672390112.372947890]: Plugin home_position initialized
[ INFO] [1672390112.373287927]: Plugin imu loaded
[ INFO] [1672390112.384582944]: Plugin imu initialized
[ INFO] [1672390112.384887232]: Plugin landing_target loaded
[ INFO] [1672390112.404727177]: Plugin landing_target initialized
[ INFO] [1672390112.404992632]: Plugin local_position loaded
[ INFO] [1672390112.416618478]: Plugin local_position initialized
[ INFO] [1672390112.416894016]: Plugin log_transfer loaded
[ INFO] [1672390112.423830007]: Plugin log_transfer initialized
[ INFO] [1672390112.424082879]: Plugin mag_calibration_status loaded
[ INFO] [1672390112.426648095]: Plugin mag_calibration_status initialized
[ INFO] [1672390112.426965341]: Plugin manual_control loaded
[ INFO] [1672390112.432144439]: Plugin manual_control initialized
[ INFO] [1672390112.432488184]: Plugin mocap_pose_estimate loaded
[ INFO] [1672390112.438435272]: Plugin mocap_pose_estimate initialized
[ INFO] [1672390112.438694269]: Plugin mount_control loaded
[ INFO] [1672390112.446053463]: Plugin mount_control initialized
[ INFO] [1672390112.446358459]: Plugin nav_controller_output loaded
[ INFO] [1672390112.447851522]: Plugin nav_controller_output initialized
[ INFO] [1672390112.448123727]: Plugin obstacle_distance loaded
[ INFO] [1672390112.452433045]: Plugin obstacle_distance initialized
[ INFO] [1672390112.452898414]: Plugin odom loaded
[ INFO] [1672390112.460242066]: Plugin odom initialized
[ INFO] [1672390112.460520771]: Plugin onboard_computer_status loaded
[ INFO] [1672390112.464513176]: Plugin onboard_computer_status initialized
[ INFO] [1672390112.464805131]: Plugin param loaded
[ INFO] [1672390112.471081589]: Plugin param initialized
[ INFO] [1672390112.471350044]: Plugin play_tune loaded
[ INFO] [1672390112.475253117]: Plugin play_tune initialized
[ INFO] [1672390112.475503406]: Plugin px4flow loaded
[ INFO] [1672390112.486933671]: Plugin px4flow initialized
[ INFO] [1672390112.487241417]: Plugin rallypoint loaded
[ INFO] [1672390112.492974841]: Plugin rallypoint initialized
[ INFO] [1672390112.493092839]: Plugin rangefinder blacklisted
[ INFO] [1672390112.493401752]: Plugin rc_io loaded
[ INFO] [1672390112.499658252]: Plugin rc_io initialized
[ INFO] [1672390112.499778459]: Plugin safety_area blacklisted
[ INFO] [1672390112.500144871]: Plugin setpoint_accel loaded
[ INFO] [1672390112.505427384]: Plugin setpoint_accel initialized
[ INFO] [1672390112.505856587]: Plugin setpoint_attitude loaded
[ INFO] [1672390112.521527421]: Plugin setpoint_attitude initialized
[ INFO] [1672390112.521900791]: Plugin setpoint_position loaded
[ INFO] [1672390112.544511741]: Plugin setpoint_position initialized
[ INFO] [1672390112.544819904]: Plugin setpoint_raw loaded
[ INFO] [1672390112.558907301]: Plugin setpoint_raw initialized
[ INFO] [1672390112.559224171]: Plugin setpoint_trajectory loaded
[ INFO] [1672390112.567239648]: Plugin setpoint_trajectory initialized
[ INFO] [1672390112.567564144]: Plugin setpoint_velocity loaded
[ INFO] [1672390112.576489026]: Plugin setpoint_velocity initialized
[ INFO] [1672390112.576929895]: Plugin sys_status loaded
[ INFO] [1672390112.595444566]: Plugin sys_status initialized
[ INFO] [1672390112.595750562]: Plugin sys_time loaded
[ INFO] [1672390112.603618625]: TM: Timesync mode: MAVLINK
[ INFO] [1672390112.604398656]: TM: Not publishing sim time
[ INFO] [1672390112.606988913]: Plugin sys_time initialized
[ INFO] [1672390112.607273535]: Plugin terrain loaded
[ INFO] [1672390112.608796389]: Plugin terrain initialized
[ INFO] [1672390112.609091469]: Plugin trajectory loaded
[ INFO] [1672390112.619490331]: Plugin trajectory initialized
[ INFO] [1672390112.619769119]: Plugin tunnel loaded
[ INFO] [1672390112.624575805]: Plugin tunnel initialized
[ INFO] [1672390112.624868760]: Plugin vfr_hud loaded
[ INFO] [1672390112.626424489]: Plugin vfr_hud initialized
[ INFO] [1672390112.626530863]: Plugin vibration blacklisted
[ INFO] [1672390112.626744943]: Plugin vision_pose_estimate loaded
[ INFO] [1672390112.637828046]: Plugin vision_pose_estimate initialized
[ INFO] [1672390112.638109209]: Plugin vision_speed_estimate loaded
[ INFO] [1672390112.643730510]: Plugin vision_speed_estimate initialized
[ INFO] [1672390112.644019756]: Plugin waypoint loaded
[ INFO] [1672390112.652509935]: Plugin waypoint initialized
[ INFO] [1672390112.652637475]: Plugin wheel_odometry blacklisted
[ INFO] [1672390112.652899680]: Plugin wind_estimation loaded
[ INFO] [1672390112.654425826]: Plugin wind_estimation initialized
[ INFO] [1672390112.654741656]: Autostarting mavlink via USB on PX4
[ INFO] [1672390112.654934111]: Built-in SIMD instructions: ARM NEON
[ INFO] [1672390112.655013194]: Built-in MAVLink package version: 2022.3.3
[ INFO] [1672390112.655135984]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta
[ INFO] [1672390112.655274982]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1672390113.170898024]: udp1: Remote address: 192.168.100.175:14550

Diagnostics

place here result of:
header: 
  seq: 97
  stamp: 
    secs: 1672390176
    nsecs: 655734499
  frame_id: ''
status: 
  - 
    level: 1
    name: "mavros: FCU connection"
    message: "not connected"
    hardware_id: "/dev/serial/by-id/usb-3D_Robotics_PX4_FMU_v5.x_0-if00:115200"
    values: 
      - 
        key: "Received packets:"
        value: "0"
      - 
        key: "Dropped packets:"
        value: "0"
      - 
        key: "Buffer overruns:"
        value: "0"
      - 
        key: "Parse errors:"
        value: "0"
      - 
        key: "Rx sequence number:"
        value: "1"
      - 
        key: "Tx sequence number:"
        value: "0"
      - 
        key: "Rx total bytes:"
        value: "20466"
      - 
        key: "Tx total bytes:"
        value: "21597"
      - 
        key: "Rx speed:"
        value: "469.000000"
      - 
        key: "Tx speed:"
        value: "517.000000"
  - 
    level: 2
    name: "mavros: GPS"
    message: "No satellites"
    hardware_id: "/dev/serial/by-id/usb-3D_Robotics_PX4_FMU_v5.x_0-if00:115200"
    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/serial/by-id/usb-3D_Robotics_PX4_FMU_v5.x_0-if00:115200"
    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/serial/by-id/usb-3D_Robotics_PX4_FMU_v5.x_0-if00:115200"
    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/serial/by-id/usb-3D_Robotics_PX4_FMU_v5.x_0-if00:115200"
    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/serial/by-id/usb-3D_Robotics_PX4_FMU_v5.x_0-if00:115200"
    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 4 addresses, but not your target 1:1

---
Received 16 messages, from 4 addresses
sys:comp   list of messages
 190:8     27
 212:134   53
 53:205   179
 91:75    255
vooon commented 1 year ago

Hi,

Baud rate doesn't really matter for USB port on STM32 based devices as they naively implements ACM device. It only matters if you have real UART somewhere on the chain, e.g. FTDI chip -> AVR on old APM 2.6. Or if you use TELEM port with the UART of the onboard computer.

I suspect that QGC claims the port, at least i saw that on linux...

Other possibility that you've installed newer PX4 which for whatever reason has incompatible HEARTBEAT. But that realy-really-really strange to happen. Some signal noise more probable.

vooon commented 1 year ago

Hmm, more over, you have some traffic on port (see Rx/Tx speed diag), but check-id looks like you catch some garbage (because you have several random addresses, it's unlikely to have different system id for the single FCU, except for 3D RADIO message).

vooon commented 1 year ago

Have you restored params after reflash?

bilalkah commented 1 year ago

I closed QGroundcontrol on my computer and did not work. Also The second computer I did not download it so it can not occupied the port I think. After I reflash I just did basic configuration and calibration. I believe, I should able to connect fcu with mavros right? Also, I have second board of mine and its same flight controller cuav v5+. I just flashed last stable version from QGroundcontrol and able to connect with QGroundcontrol. However, it did not work with mavros again.

bilalkah commented 1 year ago

As you said, mavros sees the board. Because when I eject the usb connection node kills itself. If I wait for a long time without cutting the connection, it throws

serial0: write: No such device px4

error and kills itself. After that device start playing the error tune.

bilalkah commented 1 year ago

I flashed previous version of PX4 which is 1.13.1 and same problem continues. I need help...

vooon commented 1 year ago

Ok, i think it's not related to QGC. Could you try to connect with mavproxy (pymavlink)?

vooon commented 1 year ago

Also, could you please try to build today's version of mavros (1.15.0)?

bilalkah commented 1 year ago

Hi @vooon , I tried latest verison of mavros and it did seem work for both of the fcus. Thank you for your help.

vooon commented 1 year ago

It's good that update helps, but bad, that we didn't really understand what is the source.

bilalkah commented 1 year ago

Me neither. It was working for 8 months approximately and everything was fine. The problem occurred after, I changed PX4 autopilot estimator to LPE and I lost connection with board. So I reset the board with ArduPilot because QGC could not establish any connection with board. So I work with it for a while and also I connected to board with same version. Then I changed back to PX4 autopilot and could not connect properly.

bilalkah commented 1 year ago

Besides it works, it gives these warnings;

[ WARN] [1672756008.687417010]: Could not retrive negate_measured_roll parameter value, using default (0)
[ WARN] [1672756008.688300457]: Could not retrive negate_measured_pitch parameter value, using default (0)
[ WARN] [1672756008.689690356]: Could not retrive negate_measured_yaw parameter value, using default (0)
[ WARN] [1672756008.692487903]: Could not retrive debounce_s parameter value, using default (4.000000)
[ WARN] [1672756008.693221227]: Could not retrive err_threshold_deg parameter value, using default (10.000000)
[ WARN] [1672756012.785014845]: TM : RTT too high for timesync: 2298.89 ms.
[ WARN] [1672756012.785991249]: TM : RTT too high for timesync: 1699.90 ms.
[ WARN] [1672756012.787567395]: TM : RTT too high for timesync: 1101.47 ms.
[ WARN] [1672756012.789555661]: TM : RTT too high for timesync: 503.48 ms.
vooon commented 1 year ago

First one - mount_control - https://github.com/mavlink/mavros/blob/master/mavros_extras/src/plugins/mount_control.cpp#L187

Second - really high RTT for time sync, but perhaps you can ignore.

bilalkah commented 1 year ago

Also, may I ask that how modifiable odom plugin is? Because I want to feed my FCU with external odometry source except intel realsense t265 however I could not get the same stability. I am not sure should it be done by FCU or MAVROS. Should I focus on odometry topics or odometry tf of my odometry source. It seems complicated to me. Because I could not understand the instructions. They are too basic and does not briefly explain to me what to do in calculation part.

vooon commented 1 year ago

Sorry, i can't recommend anything here. Suppose you to contact with the author of the plugin.

Nikhiljohnson21 commented 1 year ago

Hi I am also facing a similar issue I'm trying to send commands via mavros to my pixhawk flight controller to control the drone. For now I'm testing with 1 motor.

Mavros is connected to pixhawk and I'm able to arm the motor "rosrun mavros mavsafety arm"

Now I'm trying to take-off the drone using the command "rosrun mavros mavcmd takeoff (with the yaw, pitch roll, latitude, longitude)"

But I'm getting "request failed. Check mavros logs. ACK:4"

I followed the steps instructed in mavros/utility commands documentation.