Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CON: Lost connection, HEARTBEAT timed out #1629

Closed
Ayush1285 opened this issue Oct 3, 2021 · 14 comments
Closed

CON: Lost connection, HEARTBEAT timed out #1629

Ayush1285 opened this issue Oct 3, 2021 · 14 comments

Comments

@Ayush1285
Copy link

Issue details

I am running px4 sitl on gazebo using command

roslaunch px4 mavros_posix_sitl.launch

and getting error CON: Lost connection, HEARTBEAT timed out

MAVROS version and platform

Mavros: 1.9.0
ROS: Noetic
Ubuntu: 20.04 (WSL 2)

Autopilot type and version

PX4

Node logs

started roslaunch server http://LAPTOP-U2IK80BP:45503/

SUMMARY
========

CLEAR PARAMETERS
 * /mavros/

PARAMETERS
 * /gazebo/enable_ros_network: True
 * /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: udp://:14540@loca...
 * /mavros/gcs_url:
 * /mavros/global_position/child_frame_id: base_link
 * /mavros/global_position/frame_id: map
 * /mavros/global_position/gps_uere: 0.1
 * /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: True
 * /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: 0.1
 * /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: noetic
 * /rosversion: 1.15.11
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    mavros (mavros/mavros_node)
    sitl (px4/px4)
    vehicle_spawn_LAPTOP_U2IK80BP_1932_4019052971869178344 (gazebo_ros/spawn_model)

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

setting /run_id to 496c40c8-247a-11ec-89c6-00155d16b81f
process[rosout-1]: started with pid [1950]
started core service [/rosout]
process[sitl-2]: started with pid [1958]
Creating symlink /home/ayush/sim_ws/Firmware/build/px4_sitl_default/etc -> /home/ayush/.ros/etc

______  __   __    ___
| ___ \ \ \ / /   /   |
| |_/ /  \ V /   / /| |
|  __/   /   \  / /_| |
| |     / /^\ \ \___  |
\_|     \/   \/     |_/

px4 starting.

INFO  [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
INFO  [init] found model autostart file as SYS_AUTOSTART=10016
process[gazebo-3]: started with pid [1972]
INFO  [param] selected parameter default file eeprom/parameters_10016
INFO  [parameters] BSON document size 473 bytes, decoded 473 bytes
[param] Loaded: eeprom/parameters_10016
process[gazebo_gui-4]: started with pid [1984]
process[vehicle_spawn_LAPTOP_U2IK80BP_1932_4019052971869178344-5]: started with pid [1995]
process[mavros-6]: started with pid [2002]
[ INFO] [1633286819.464800600]: FCU URL: udp://:14540@localhost:14557
[ INFO] [1633286819.474984100]: udp0: Bind address: 0.0.0.0:14540
[ INFO] [1633286819.475567400]: udp0: Remote address: 127.0.0.1:14557
[ INFO] [1633286819.476422500]: GCS bridge disabled
INFO  [dataman] Unknown restart, data manager file './dataman' size is 11798680 bytes
[ INFO] [1633286819.496151400]: Plugin 3dr_radio loaded
[ INFO] [1633286819.499097900]: Plugin 3dr_radio initialized
[ INFO] [1633286819.499550700]: Plugin actuator_control loaded
[ INFO] [1633286819.504714400]: Plugin actuator_control initialized
[ INFO] [1633286819.523182000]: Plugin adsb loaded
[ INFO] [1633286819.535472600]: Plugin adsb initialized
[ INFO] [1633286819.536073100]: Plugin altitude loaded
[ INFO] [1633286819.539531200]: Plugin altitude initialized
[ INFO] [1633286819.540025300]: Plugin cam_imu_sync loaded
[ INFO] [1633286819.541776000]: Plugin cam_imu_sync initialized
[ INFO] [1633286819.542194300]: Plugin command loaded
[ INFO] [1633286819.558432700]: Plugin command initialized
[ INFO] [1633286819.558787200]: Plugin companion_process_status loaded
[ INFO] [1633286819.562915600]: Plugin companion_process_status initialized
[ INFO] [1633286819.563215700]: Plugin debug_value loaded
[ INFO] [1633286819.571772900]: Plugin debug_value initialized
[ INFO] [1633286819.571878400]: Plugin distance_sensor blacklisted
[ INFO] [1633286819.572193800]: Plugin esc_status loaded
[ INFO] [1633286819.574619200]: Plugin esc_status initialized
[ INFO] [1633286819.575108500]: Plugin esc_telemetry loaded
[ INFO] [1633286819.576345000]: Plugin esc_telemetry initialized
[ INFO] [1633286819.576651900]: Plugin fake_gps loaded
PX4 SIM HOST: localhost
INFO  [simulator] Waiting for simulator to accept connection on TCP port 4560
[ INFO] [1633286819.596118800]: Plugin fake_gps initialized
[ INFO] [1633286819.596528500]: Plugin ftp loaded
[ INFO] [1633286819.607114100]: Plugin ftp initialized
[ INFO] [1633286819.607452200]: Plugin geofence loaded
[ INFO] [1633286819.612398600]: Plugin geofence initialized
[ INFO] [1633286819.612671900]: Plugin global_position loaded
[ INFO] [1633286819.643659300]: Plugin global_position initialized
[ INFO] [1633286819.644176600]: Plugin gps_input loaded
[ INFO] [1633286819.651706400]: Plugin gps_input initialized
[ INFO] [1633286819.652175600]: Plugin gps_rtk loaded
[ INFO] [1633286819.659242500]: Plugin gps_rtk initialized
[ INFO] [1633286819.659619500]: Plugin gps_status loaded
[ INFO] [1633286819.664332400]: Plugin gps_status initialized
[ INFO] [1633286819.664673700]: Plugin hil loaded
[ INFO] [1633286819.681255300]: Plugin hil initialized
[ INFO] [1633286819.681578500]: Plugin home_position loaded
[ INFO] [1633286819.699750300]: Plugin home_position initialized
[ INFO] [1633286819.700708900]: Plugin imu loaded
[ INFO] [1633286819.719509700]: Plugin imu initialized
[ INFO] [1633286819.720008600]: Plugin landing_target loaded
[ INFO] [1633286819.739446600]: Plugin landing_target initialized
[ INFO] [1633286819.739674700]: Plugin local_position loaded
[ INFO] [1633286819.747280500]: Plugin local_position initialized
[ INFO] [1633286819.747546600]: Plugin log_transfer loaded
[ INFO] [1633286819.752245200]: Plugin log_transfer initialized
[ INFO] [1633286819.752498000]: Plugin mag_calibration_status loaded
[ INFO] [1633286819.754121700]: Plugin mag_calibration_status initialized
[ INFO] [1633286819.754435200]: Plugin manual_control loaded
[ INFO] [1633286819.757873500]: Plugin manual_control initialized
[ INFO] [1633286819.758117700]: Plugin mocap_pose_estimate loaded
[ INFO] [1633286819.774471600]: Plugin mocap_pose_estimate initialized
[ INFO] [1633286819.775075600]: Plugin mount_control loaded
[ INFO] [1633286819.785796600]: Plugin mount_control initialized
[ INFO] [1633286819.786324800]: Plugin nav_controller_output loaded
[ INFO] [1633286819.787824100]: Plugin nav_controller_output initialized
[ INFO] [1633286819.788229200]: Plugin obstacle_distance loaded
[ INFO] [1633286819.793479900]: Plugin obstacle_distance initialized
[ INFO] [1633286819.793820200]: Plugin odom loaded
[ INFO] [1633286819.801113900]: Plugin odom initialized
[ INFO] [1633286819.801460300]: Plugin onboard_computer_status loaded
[ INFO] [1633286819.805440100]: Plugin onboard_computer_status initialized
[ INFO] [1633286819.805847200]: Plugin param loaded
[ INFO] [1633286819.810470100]: Plugin param initialized
[ INFO] [1633286819.810717000]: Plugin play_tune loaded
[ INFO] [1633286819.813993500]: Plugin play_tune initialized
[ INFO] [1633286819.814265900]: Plugin px4flow loaded
[ INFO] [1633286819.823439700]: Plugin px4flow initialized
[ INFO] [1633286819.823751300]: Plugin rallypoint loaded
[ INFO] [1633286819.828070300]: Plugin rallypoint initialized
[ INFO] [1633286819.828159300]: Plugin rangefinder blacklisted
[ INFO] [1633286819.828431600]: Plugin rc_io loaded
[ INFO] [1633286819.845365400]: Plugin rc_io initialized
[ INFO] [1633286819.845637800]: Plugin safety_area blacklisted
[ INFO] [1633286819.846515300]: Plugin setpoint_accel loaded
[ INFO] [1633286819.856668800]: Plugin setpoint_accel initialized
[ INFO] [1633286819.857406700]: Plugin setpoint_attitude loaded
[ INFO] [1633286819.876484100]: Plugin setpoint_attitude initialized
[ INFO] [1633286819.876774400]: Plugin setpoint_position loaded
[ INFO] [1633286819.895430500]: Plugin setpoint_position initialized
[ INFO] [1633286819.895642400]: Plugin setpoint_raw loaded
[ INFO] [1633286819.916324200]: Plugin setpoint_raw initialized
[ INFO] [1633286819.918360100]: Plugin setpoint_trajectory loaded
[ INFO] [1633286819.930696600]: Plugin setpoint_trajectory initialized
[ INFO] [1633286819.931091900]: Plugin setpoint_velocity loaded
[ INFO] [1633286819.941861200]: Plugin setpoint_velocity initialized
[ INFO] [1633286819.943102200]: Plugin sys_status loaded
[ INFO] [1633286819.959498400]: Plugin sys_status initialized
[ INFO] [1633286819.959823500]: Plugin sys_time loaded
[ INFO] [1633286819.965915700]: TM: Timesync mode: MAVLINK
[ INFO] [1633286819.967358300]: TM: Publishing sim time
[ INFO] [1633286819.969326300]: Plugin sys_time initialized
[ INFO] [1633286819.969530100]: Plugin trajectory loaded
[ INFO] [1633286819.975602600]: Plugin trajectory initialized
[ INFO] [1633286819.975824700]: Plugin vfr_hud loaded
[ INFO] [1633286819.976758200]: Plugin vfr_hud initialized
[ INFO] [1633286819.976842800]: Plugin vibration blacklisted
[ INFO] [1633286819.977082500]: Plugin vision_pose_estimate loaded
[ INFO] [1633286819.985571200]: Plugin vision_pose_estimate initialized
[ INFO] [1633286819.985843000]: Plugin vision_speed_estimate loaded
[ INFO] [1633286819.998679500]: Plugin vision_speed_estimate initialized
[ INFO] [1633286820.000122300]: Plugin waypoint loaded
[ INFO] [1633286820.027088000]: Plugin waypoint initialized
[ INFO] [1633286820.027264600]: Plugin wheel_odometry blacklisted
[ INFO] [1633286820.027850900]: Plugin wind_estimation loaded
[ INFO] [1633286820.029588700]: Plugin wind_estimation initialized
[ INFO] [1633286820.029792700]: Autostarting mavlink via USB on PX4
[ INFO] [1633286820.030302300]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1633286820.030495600]: Built-in MAVLink package version: 2021.3.3
[ INFO] [1633286820.030653300]: Known MAVLink dialects: common ardupilotmega ASLUAV all autoquad icarous matrixpilot paparazzi standard uAvionix ualberta
[ INFO] [1633286820.030810300]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[INFO] [1633286820.053677, 0.000000]: Loading model XML from file /home/ayush/sim_ws/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
[INFO] [1633286820.058080, 0.000000]: Waiting for service /gazebo/spawn_sdf_model
[ INFO] [1633286820.354550200]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1633286820.356880100]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1633286820.486147100]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1633286820.487812800]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
NVD3D10: CPU cyclestats are disabled on client virtualization
NVD3D10: CPU cyclestats are disabled on client virtualization
NVD3D10: CPU cyclestats are disabled on client virtualization
NVD3D10: CPU cyclestats are disabled on client virtualization
NVD3D10: CPU cyclestats are disabled on client virtualization
[ INFO] [1633286826.102126000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[INFO] [1633286826.105870, 0.000000]: Calling service /gazebo/spawn_sdf_model
[INFO] [1633286826.437800, 0.120000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1633286826.453790600, 0.120000000]: Physics dynamic reconfigure ready.
INFO  [simulator] Simulator connected on TCP port 4560.
INFO  [commander] LED: open /dev/led0 failed (22)
INFO  [init] Mixer: etc/mixers/quad_w.main.mix on /dev/pwm_output0
INFO  [init] setting PWM_AUX_OUT none
INFO  [mavlink] mode: Normal, data rate: 4000000 B/s on udp port 18570 remote port 14550
INFO  [mavlink] mode: Onboard, data rate: 4000000 B/s on udp port 14580 remote port 14540
[ INFO] [1633286827.137607000, 0.620000000]: udp0: Remote address: 127.0.0.1:14580
INFO  [mavlink] mode: Onboard, data rate: 4000 B/s on udp port 14280 remote port 14030
[vehicle_spawn_LAPTOP_U2IK80BP_1932_4019052971869178344-5] process has finished cleanly
log file: /home/ayush/.ros/log/496c40c8-247a-11ec-89c6-00155d16b81f/vehicle_spawn_LAPTOP_U2IK80BP_1932_4019052971869178344-5*.log
[ INFO] [1633286827.153316000, 0.636000000]: IMU: High resolution IMU detected!
INFO  [mavlink] mode: Gimbal, data rate: 400000 B/s on udp port 13030 remote port 13280
INFO  [logger] logger started (mode=all)
INFO  [logger] Start file log (type: full)
INFO  [logger] [logger] ./log/2021-10-03/18_47_06.ulg
INFO  [logger] Opened full log file: ./log/2021-10-03/18_47_06.ulg
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
INFO  [px4] Startup script returned successfully
pxh> INFO  [mavlink] partner IP: 127.0.0.1
[ INFO] [1633286828.190207200, 1.616000000]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1633286828.192424300, 1.616000000]: IMU: High resolution IMU detected!
[ INFO] [1633286828.194964400, 1633286828.189749000]: HP: requesting home position
[ WARN] [1633286828.195127200, 1633286828.189749000]: CON: Lost connection, HEARTBEAT timed out.
[ INFO] [1633286828.196018000, 1633286828.189749000]: GF: mission received
[ INFO] [1633286828.202586800, 1.628000000]: GF: Using MISSION_ITEM_INT
[ INFO] [1633286828.203235200, 1.628000000]: RP: Using MISSION_ITEM_INT
[ INFO] [1633286828.203552200, 1.628000000]: WP: Using MISSION_ITEM_INT
[ INFO] [1633286828.204124800, 1.628000000]: VER: 1.1: Capabilities         0x000000000000e4ef
[ INFO] [1633286828.204686900, 1.628000000]: VER: 1.1: Flight software:     010d0040 (f41e5985e8000000)
[ INFO] [1633286828.205233300, 1.628000000]: VER: 1.1: Middleware software: 010d0040 (f41e5985e8000000)
[ INFO] [1633286828.205562500, 1.628000000]: VER: 1.1: OS software:         050a2bff (80b730cdb35570b3)
[ INFO] [1633286828.206383300, 1.632000000]: VER: 1.1: Board hardware:      00000001
[ INFO] [1633286828.206849000, 1.632000000]: VER: 1.1: VID/PID:             0000:0000
[ INFO] [1633286828.207301200, 1.632000000]: VER: 1.1: UID:                 4954414c44494e4f
[ INFO] [1633286828.220112400, 1.644000000]: IMU: High resolution IMU detected!
[ INFO] [1633286829.192927400, 2.616000000]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1633286829.195145200, 2.616000000]: IMU: High resolution IMU detected!
[ INFO] [1633286829.196590100, 1633286829.192759000]: HP: requesting home position
[ WARN] [1633286829.196759700, 1633286829.192759000]: CON: Lost connection, HEARTBEAT timed out.
[ INFO] [1633286829.197571700, 2.620000000]: RP: mission received
[ INFO] [1633286829.198085800, 2.620000000]: WP: mission received
[ INFO] [1633286829.198843200, 2.620000000]: VER: 1.1: Capabilities         0x000000000000e4ef
[ INFO] [1633286829.198978100, 2.620000000]: VER: 1.1: Flight software:     010d0040 (f41e5985e8000000)
[ INFO] [1633286829.199083800, 2.620000000]: VER: 1.1: Middleware software: 010d0040 (f41e5985e8000000)
[ INFO] [1633286829.199167800, 2.620000000]: VER: 1.1: OS software:         050a2bff (80b730cdb35570b3)
[ INFO] [1633286829.199270400, 2.620000000]: VER: 1.1: Board hardware:      00000001
[ INFO] [1633286829.199343900, 2.620000000]: VER: 1.1: VID/PID:             0000:0000
[ INFO] [1633286829.199472100, 2.620000000]: VER: 1.1: UID:                 4954414c44494e4f
[ INFO] [1633286829.212483400, 2.636000000]: IMU: High resolution IMU detected!
[ INFO] [1633286830.195762100, 3.616000000]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1633286830.208033000, 3.624000000]: IMU: High resolution IMU detected!
[ INFO] [1633286830.219359000, 3.636000000]: HP: requesting home position
[ WARN] [1633286830.220900800, 3.636000000]: CON: Lost connection, HEARTBEAT timed out.
[ INFO] [1633286830.253158300, 3.668000000]: IMU: High resolution IMU detected!
[ INFO] [1633286830.254667800, 3.672000000]: VER: 1.1: Capabilities         0x000000000000e4ef
[ INFO] [1633286830.255371000, 3.672000000]: VER: 1.1: Flight software:     010d0040 (f41e5985e8000000)
[ INFO] [1633286830.255699800, 3.672000000]: VER: 1.1: Middleware software: 010d0040 (f41e5985e8000000)
[ INFO] [1633286830.255974500, 3.672000000]: VER: 1.1: OS software:         050a2bff (80b730cdb35570b3)
[ INFO] [1633286830.256100200, 3.672000000]: VER: 1.1: Board hardware:      00000001
[ INFO] [1633286830.256364700, 3.672000000]: VER: 1.1: VID/PID:             0000:0000
[ INFO] [1633286830.256569200, 3.672000000]: VER: 1.1: UID:                 4954414c44494e4f
[ INFO] [1633286831.199758100, 4.616000000]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1633286831.202363400, 4.616000000]: IMU: High resolution IMU detected!
[ INFO] [1633286831.203593100, 1633286831.199527000]: HP: requesting home position
[ WARN] [1633286831.203732300, 1633286831.199527000]: CON: Lost connection, HEARTBEAT timed out.

Diagnostics

header:
  seq: 30
  stamp:
    secs: 1633286856
    nsecs: 263619000
  frame_id: ''
status:
  -
    level: 0
    name: "mavros: FCU connection"
    message: "connected"
    hardware_id: "udp://:14540@localhost:14557"
    values:
      -
        key: "Received packets:"
        value: "26969"
      -
        key: "Dropped packets:"
        value: "0"
      -
        key: "Buffer overruns:"
        value: "0"
      -
        key: "Parse errors:"
        value: "0"
      -
        key: "Rx sequence number:"
        value: "97"
      -
        key: "Tx sequence number:"
        value: "0"
      -
        key: "Rx total bytes:"
        value: "1252828"
      -
        key: "Tx total bytes:"
        value: "21192"
      -
        key: "Rx speed:"
        value: "49356.000000"
      -
        key: "Tx speed:"
        value: "739.000000"
  -
    level: 0
    name: "mavros: GPS"
    message: "3D fix"
    hardware_id: "udp://:14540@localhost:14557"
    values:
      -
        key: "Satellites visible"
        value: "10"
      -
        key: "Fix type"
        value: "3"
      -
        key: "EPH (m)"
        value: "0.00"
      -
        key: "EPV (m)"
        value: "0.00"
  -
    level: 0
    name: "mavros: Heartbeat"
    message: "Normal"
    hardware_id: "udp://:14540@localhost:14557"
    values:
      -
        key: "Heartbeats since startup"
        value: "29"
      -
        key: "Frequency (Hz)"
        value: "0.997139"
      -
        key: "Vehicle type"
        value: "Quadrotor"
      -
        key: "Autopilot type"
        value: "PX4 Autopilot"
      -
        key: "Mode"
        value: "AUTO.LOITER"
      -
        key: "System status"
        value: "Standby"
  -
    level: 2
    name: "mavros: System"
    message: "Sensor health"
    hardware_id: "udp://:14540@localhost:14557"
    values:
      -
        key: "Sensor present"
        value: "0x1028002C"
      -
        key: "Sensor enabled"
        value: "0x1021000C"
      -
        key: "Sensor health"
        value: "0x102E002F"
      -
        key: "3D magnetometer"
        value: "Ok"
      -
        key: "absolute pressure"
        value: "Ok"
      -
        key: "rc receiver"
        value: "Fail"
      -
        key: "AHRS subsystem health"
        value: "Ok"
      -
        key: "pre-arm check status. Always healthy when armed"
        value: "Ok"
      -
        key: "CPU Load (%)"
        value: "62.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: 0
    name: "mavros: Battery"
    message: "Normal"
    hardware_id: "udp://:14540@localhost:14557"
    values:
      -
        key: "Voltage"
        value: "16.20"
      -
        key: "Current"
        value: "-1.0"
      -
        key: "Remaining"
        value: "100.0"
  -
    level: 1
    name: "mavros: Time Sync"
    message: "Frequency too high."
    hardware_id: "udp://:14540@localhost:14557"
    values:
      -
        key: "Timesyncs since startup"
        value: "308"
      -
        key: "Frequency (Hz)"
        value: "11.051625"
      -
        key: "Last RTT (ms)"
        value: "0.000000"
      -
        key: "Mean RTT (ms)"
        value: "12166112449.223404"
      -
        key: "Last remote time (s)"
        value: "29.396000000"
      -
        key: "Estimated time offset (s)"
        value: "167975404.299634695"
---

Check ID

OK. I got messages from 1:1.

---
Received 300 messages, from 1 addresses
sys:comp   list of messages
Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/timer.py", line 234, in run
    self._callback(TimerEvent(last_expected, last_real, current_expected, current_real, last_duration))
  File "/home/ayush/catkin_ws/src/mavros/mavros/scripts/checkid", line 82, in timer_cb
    for address, messages in self.message_sources.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
@vooon
Copy link
Member

vooon commented Oct 3, 2021

From node log, disconnection event occurs too fast. Maybe timeout setting changed?

@Ayush1285
Copy link
Author

Ayush1285 commented Oct 4, 2021

From node log, disconnection event occurs too fast. Maybe timeout setting changed?

This is my CON settings.

sys_status & sys_time connection options

conn:
heartbeat_rate: 1.0 # send hertbeat rate in Hertz
timeout: 10.0 # hertbeat timeout in seconds
timesync_rate: 10.0 # TIMESYNC rate in Hertz (feature disabled if 0.0)
system_time_rate: 1.0 # send system time to FCU rate in Hertz (disabled if 0.0)

@vooon
Copy link
Member

vooon commented Oct 4, 2021

Looks correct.

@Ayush1285
Copy link
Author

Looks correct.

yeah, but still I'm getting the same error

@vooon
Copy link
Member

vooon commented Oct 4, 2021

Currently i do not have any idea why that was happening. But i never ever tried WSL, so maybe it's worth to try setup VM with Ubuntu and setup mavros there.

@gssammy
Copy link

gssammy commented Nov 9, 2021

i'm seeing this and i'm not using WSL: #1645

@boris-gu
Copy link

boris-gu commented Nov 17, 2021

I started getting the same error, I use docker.
image

@vooon
Copy link
Member

vooon commented Nov 20, 2021

Just tried to reproduce on AArch64. But it works.
Снимок экрана от 2021-11-21 02-21-30

@vooon
Copy link
Member

vooon commented Nov 20, 2021

Hmm. I see a pattern in timestamps:

[ INFO] [1633286829.192927400, 2.616000000]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1633286829.195145200, 2.616000000]: IMU: High resolution IMU detected!
[ INFO] [1633286829.196590100, 1633286829.192759000]: HP: requesting home position
[ WARN] [1633286829.196759700, 1633286829.192759000]: CON: Lost connection, HEARTBEAT timed out.

What that second number is? Perhaps it somehow related to boot_time_ms? Or it is simulated time?
Anyway if timer is not based on wall time, it certainly will expire on that huge bump.

@vooon
Copy link
Member

vooon commented Nov 20, 2021

Try to change config to have:

time:
  publish_sim_time: false

@gssammy
Copy link

gssammy commented Nov 23, 2021

setting publish_sim_time to false worked for me. Thanks!

@vooon
Copy link
Member

vooon commented Nov 24, 2021

@gssammy great! So timers is not wall-based. Good to know.

@SamLin55587
Copy link

@gssammy I have same problem ,but I don't know where I can setting publish_sim_time can you tell me?

@gssammy
Copy link

gssammy commented Dec 13, 2021

@SamLin55587: I edited the time plugin config in the px4_config:

. It should look something like below:

# sys_time
time:
  time_ref_source: "fcu"  # time_reference source
  timesync_mode: MAVLINK
  timesync_avg_alpha: 0.6 # timesync averaging factor
  publish_sim_time: false

It's also weird that the developers choose not to talk about this particular parameter in the plugin description here: http://wiki.ros.org/mavros#mavros.2FPlugins.sys_time

chengguizi added a commit to chengguizi/mavros that referenced this issue Mar 26, 2022
* bugfix - add estimator type in odom message

Add missing estimator_type field in  Odometry message.
Issue mavlink#1524

* readme: add source install note for Noetic release

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* update changelog

* 1.5.2

* Fixed a bug in mavros_extras/src/plugins/odom.cpp by switching lines 175 and 180.

Rationale: The pose covariance matrix published to the /mavros/odometry/in topic is exclusively zeros. This is because the transformation matrix r_pose is initialised as zeros (line 140), then applied to the covariance matrix cov_pose (line 176) and then populated (line 180). Clearly the latter two steps should be the other way around, and the comments in the code appear to suggest that this was the intention, but that lines 175 and 180 were accidentally written the wrong way around. Having switched them, the pose covariance is now published to /mavros/odometry/in as expected.

JohnG897

* fix inconsistency in direction of yaw when using set_position in BODY frames and fix problems with yaw in setponit_raw

* update changelog

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* 1.6.0

* Fix mavlink#849

* README: Update PX4 Autopilot references

Much needed fixes to clarify the project is named correctly throughout the README
for the PX4 Autopilot, QGroundControl, and MAVLink

* MissionBase: breakout mission protocol from waypoint.cpp

* Waypoint: inherit MissionBase class for mission protocol

* Rallypoint: add rallypoint plugin

* Geofence: add geofence plugin

* add rallypoint and geofence plugins to CMakeList

* add rallypoint and geofence plugins to mavros plugins xml

* whitespace

* uncrustify

* MissionBase: add copyright from origional waypoint.cpp

* MissionBase: correction to file information

* plugins: mission: re-generate the code

* lib: re-generate the code

* msgs: re-generate the code

* update changelog

* 1.7.0

* re-generate all pymavlink enums

* update changelog

* 1.7.1

* convert whole expression to mm

* distance_sensor: Fill horizontal_fov, vertical_fov, quaternion

* distance_sensor: Add horizontal_fov_ratio, vertical_fov_ratio, sensor_orientation parameters

* px4_config: Add distance_sensor parameters

* extras: distance_sensor: rename param for custom orientation, apply uncrustify

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* lib: ftf: allow both Quaterniond and Quaternionf for quaternion_to_mavlink()

* extras: mavlink#1370: set obstacle aangle offset

* ci: install geographiclib datasets

* ci: github uses yaml parser which do not support anchors. surprise, surprise!

* Create codeql-analysis.yml

* Create semgrep-analysis.yml

* update changelog

* 1.8.0

* readme: update

* ci: remove travis

* ci: update industrial-ci usage

* Add compass calibration feedback status. Add service to call the 'Next' button in calibrations.

* Add message and service definition.

* Remove extra message from CMakeLists.

* Move Compass calibration report to extras. Rewrite code based on instructions.

* Set progress array to global to prevent erasing data.

* Apply uncrustify changes.

* Delete debug files.

* Exclude changes to launch files.

* Reset calibration flag when re-calibrating. Prevent wrong data output.

* Add Mount angles message for communications with ardupilotmega.

* added esc_telemetry plugin

* fixed some compile errors

* actually allocate memory for the telemetry information

* msgs: fix types for apm's esc telemetry

* extras: fix apm esc_telemetry

* extras: reformat plugins xml

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* plugins: reformat xml

* extras: uncrustify all plugins

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* extras: fix esc_telemetry centi-volt/amp conversion

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* extras: esc_telemetry: fix build

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* Remove Mount_Status plugin. Add Status data to Mount_Control plugin. Remove Mount_Status message.

* Add missing subscription.

* Publish quaternion information with Mount Status mavlink message.

* Convert status data from cdeg to rad.

* Update esc_status plugin with datatype change on MAVLink.

ESC_INFO MAVLink message was updated to have negative temperates and also at a different resolution. This commit updates those changes on this side.

Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>

* Added GPS_INPUT plugin

* Added NAV_CONTROLLER_OUTPUT Plugin

* Mavlink v2.0 specs for RC_CHANNELS_OVERRIDE accepts upto 18 channels. The plugin publishes channels 9 to 18 if the FCU protocol version is 2.0

* publish BATTERY2 message as /mavros/battery2 topic

* This adds functionality to erase all logs on the SD card via mavlink

* Changed OverrideRCIn to 18 channels

* Spelling corrections

* update changelog

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* 1.9.0

* sys_time: publish /clock for simulation times

* sys_time.cpp: typo

* MountControl.msg: fix copy-paste

* mavros_msgs: Add Tunnel message

* mavros_extras: Create tunnel plugin

* Tunnel.msg: Generate enum with cog

* Tunnel: Check for invalid payload length

* Show ENOTCONN error instead of crash

When a client suddenly drops the connection,
socket.shutdown() will throw an exception:
boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >
  what():  shutdown: Transport endpoint is not connected

Showing an error in this common case looks more reasonable than crashing.

* Catch std::length_error in send_message

Instead of crashing the process

* Remove reference

* msgs: update gpsraw to have yaw field

* prepare release

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* 1.10.0

* msgs: add yaw field to GPS_INPUT

* Add camera plugin for interfacing with mavlink camera protocol

Add camera image captured message for handling camera trigger information

* Address review comments

* distance_sensor: Initialize sensor orientation quaternion to zero

Without this, you'll get random garbage data for the quaternion field
of the DISTANCE_SENSOR MAVLink messages sent to the autopilot.

The quaternion field should be set to zero when unused, according to the
MAVLink message's field description.

* Use meters for relative altitude

* plugin: sys: Use wall timers for connection management

Fixes mavlink#1629

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* plugin: initialize quaternions with identity

Eigen::Quaternion[d|f] () does not initialize with zeroes or identity.
So we must initialize with identity vector objects that can be left
unassigned.

Related to mavlink#1652

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* plugin: sys: fix compillation error

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* msgs: try to hide 'unaligned pointer' warning

* plugin: setpoint_raw: fix misprint

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* msgs: fix convert const

* extras: landing_target: fix misprint

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* msgs: use pragmas to ignore unaligned pointer warnings

* lib: fix ftf warnings

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* update changelog

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* 1.11.0

* lib: fix build

* update changelog

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* 1.11.1

* extras: distance_sensor: revert back to zero quaternion

Fix mavlink#1653

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* lib: fix mission frame debug print

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* Fix multiple bugs

- fix bad_weak_ptr on connect and disconnect
- introduce new API to avoid thread race when assigning callbacks
- fix uninitialized variable in TCP client constructor which would
randomly block TCP server

This is an API breaking change: if client code creates connections using
make_shared<>() instead of open_url(), it is now necessary to call new
connect() method explicitly.

* update changelog

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* 1.12.0

* mavros: Fix some warnings

* mavros_extras: Fix some warnings

* mavconn: fix connection issue introduced by mavlink#1658

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* update changelog

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* 1.12.1

* extras: trajectory: backport mavlink#1667

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* plugin: setpoint_raw: move getParam to initializer

Repeatedly getting the thrust_scaling parameter in a callback that can
be invoked from a fast control loop may fail spuriously and trigger a
fatal error

* Set time/publish_sim_time to false by default

* update changelog

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* 1.12.2

* Add plugin for reporting terrain height estimate from FCU

* Fixed topic names to match more closely what other plugins use.  Fixed a typo.

* Add extra MAV_FRAMES to waypoint message as defined in https://mavlink.io/en/messages/common.html

* Fixed callback name to match `handle_{MESSAGE_NAME.lower()}` convention

* More explicitly state "TerrainReport" to allow for future extension of the plugin to support other terrain messages

* Removed CamelCase for class members.  Publish to "report"

* lib: Fix rotation search for CUSTOM

Fix mavlink#1688.

* test: add checks for ROTATION_CUSTOM

* re-generate all coglets

* py-lib: fix compatibility with py3 for Noetic

* update changelog

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>

* 1.13.0

Co-authored-by: Ashwin Varghese Kuruttukulam <35679537+ashwinvk94@users.noreply.github.com>
Co-authored-by: Vladimir Ermakov <vooon341@gmail.com>
Co-authored-by: John Gifford <john.gifford@leonardo-itg.com>
Co-authored-by: zhouzhiwen2000 <zhouzhiwen2000@gmail.com>
Co-authored-by: Tobias Fischer <info@tobiasfischer.info>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Charlie-Burge <charlie.burge@manna.aero>
Co-authored-by: Thomas <thomas@rigi.tech>
Co-authored-by: Alexey Rogachevskiy <sfalexrog@gmail.com>
Co-authored-by: André Filipe <andre.ferreira@beyond-vision.pt>
Co-authored-by: BV-OpenSource <opensource@beyond-vision.pt>
Co-authored-by: Russell <russell@rizse.io>
Co-authored-by: Abhijith Thottumadayil Jagadeesh <abhijith@rizse.io>
Co-authored-by: Ricardo Marques <marques.ricardo17@gmail.com>
Co-authored-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
Co-authored-by: Karthik Desai <karthik.desai@iav.de>
Co-authored-by: David Jablonski <dayjaby@gmail.com>
Co-authored-by: Morten Fyhn Amundsen <morten.fyhn.amundsen@gmail.com>
Co-authored-by: Val Doroshchuk <val@sevendof.com>
Co-authored-by: Marcelino Almeida <marcelino@pensasystems.com>
Co-authored-by: Jaeyoung-Lim <jalim@ethz.ch>
Co-authored-by: Alexander Sherikov <alexander@sevendof.com>
Co-authored-by: hs293go <hellston20a@gmail.com>
Co-authored-by: Oleg Kalachev <okalachev@gmail.com>
Co-authored-by: matt <anderson_rayner@hotmail.com>
Co-authored-by: Ubuntu <ubuntu@ubuntu1804.lxd>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants