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: Got HEARTBEAT, connected. FCU: No valid autopilot #1221

Closed
huhu1030 opened this issue Apr 18, 2019 · 10 comments
Closed

CON: Got HEARTBEAT, connected. FCU: No valid autopilot #1221

huhu1030 opened this issue Apr 18, 2019 · 10 comments
Labels

Comments

@huhu1030
Copy link

huhu1030 commented Apr 18, 2019

Issue details

Hi guys,

I'm trying to launch Mavros on my drone (Intel Aero) with the command
roslaunch mavros apm.launch fcu_url:="udp://:14555@127.0.0.1:14555"
But I have this weird issue "Got HEARTBEAT, connected. FCU: No valid autopilot" and also "ERROR: I got 1 addresses, but not your target1:1" (when I launch rosrun mavros checkid).
I search through the web the whole day, and apparently, the issue is coming from the system_id and component_id not being set correctly.
The problem is that I checked these values on QGroundControl and they are 1/1. These values are by default 1/1 in the apm.launch file.

If someone can point me in the right direction I'll be happy.
Thank you very much.

MAVROS version and platform

Mavros: not sure
ROS: Kinetic
Ubuntu: 16.04

Autopilot type and version

[ X] ArduPilot
[ ] PX4

Version: 3.5.3

Node logs

roslaunch mavros apm.launch fcu_url:="udp://:14555@127.0.0.1:14555"
... logging to /home/drone02/.ros/log/7960effa-3c78-11e9-9a16-4a65e9c04346/roslaunch-drone02-2604.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://drone02:36828/

SUMMARY

CLEAR PARAMETERS

  • /mavros/

PARAMETERS

  • /mavros/cmd/use_comp_id_system_control: False
  • /mavros/conn/heartbeat_mav_type: ONBOARD_CONTROLLER
  • /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/rangefinder_pub/field_of_view: 0.0
  • /mavros/distance_sensor/rangefinder_pub/frame_id: lidar
  • /mavros/distance_sensor/rangefinder_pub/id: 0
  • /mavros/distance_sensor/rangefinder_pub/send_tf: False
  • /mavros/distance_sensor/rangefinder_pub/sensor_position/x: 0.0
  • /mavros/distance_sensor/rangefinder_pub/sensor_position/y: 0.0
  • /mavros/distance_sensor/rangefinder_pub/sensor_position/z: -0.1
  • /mavros/distance_sensor/rangefinder_sub/id: 1
  • /mavros/distance_sensor/rangefinder_sub/orientation: PITCH_270
  • /mavros/distance_sensor/rangefinder_sub/subscriber: True
  • /mavros/fake_gps/eph: 2.0
  • /mavros/fake_gps/epv: 2.0
  • /mavros/fake_gps/fix_type: 3
  • /mavros/fake_gps/geo_origin/alt: 408.0
  • /mavros/fake_gps/geo_origin/lat: 47.3667
  • /mavros/fake_gps/geo_origin/lon: 8.55
  • /mavros/fake_gps/gps_rate: 5.0
  • /mavros/fake_gps/mocap_transform: True
  • /mavros/fake_gps/satellites_visible: 5
  • /mavros/fake_gps/tf/child_frame_id: fix
  • /mavros/fake_gps/tf/frame_id: map
  • /mavros/fake_gps/tf/listen: False
  • /mavros/fake_gps/tf/rate_limit: 10.0
  • /mavros/fake_gps/tf/send: False
  • /mavros/fake_gps/use_mocap: True
  • /mavros/fake_gps/use_vision: False
  • /mavros/fcu_protocol: v2.0
  • /mavros/fcu_url: udp://:14555@127....
  • /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.000349065850399
  • /mavros/imu/frame_id: base_link
  • /mavros/imu/linear_acceleration_stdev: 0.0003
  • /mavros/imu/magnetic_stdev: 0.0
  • /mavros/imu/orientation_stdev: 1.0
  • /mavros/local_position/frame_id: map
  • /mavros/local_position/tf/child_frame_id: base_link
  • /mavros/local_position/tf/frame_id: map
  • /mavros/local_position/tf/send: False
  • /mavros/local_position/tf/send_fcu: False
  • /mavros/mission/pull_after_gcs: True
  • /mavros/mocap/use_pose: True
  • /mavros/mocap/use_tf: False
  • /mavros/odometry/estimator_type: 3
  • /mavros/odometry/frame_tf/desired_frame: ned
  • /mavros/plugin_blacklist: ['actuator_contro...
  • /mavros/plugin_whitelist: []
  • /mavros/px4flow/frame_id: px4flow
  • /mavros/px4flow/ranger_fov: 0.118682389136
  • /mavros/px4flow/ranger_max_range: 5.0
  • /mavros/px4flow/ranger_min_range: 0.3
  • /mavros/safety_area/p1/x: 1.0
  • /mavros/safety_area/p1/y: 1.0
  • /mavros/safety_area/p1/z: 1.0
  • /mavros/safety_area/p2/x: -1.0
  • /mavros/safety_area/p2/y: -1.0
  • /mavros/safety_area/p2/z: -1.0
  • /mavros/setpoint_accel/send_force: False
  • /mavros/setpoint_attitude/reverse_thrust: False
  • /mavros/setpoint_attitude/tf/child_frame_id: target_attitude
  • /mavros/setpoint_attitude/tf/frame_id: map
  • /mavros/setpoint_attitude/tf/listen: False
  • /mavros/setpoint_attitude/tf/rate_limit: 50.0
  • /mavros/setpoint_attitude/use_quaternion: False
  • /mavros/setpoint_position/mav_frame: LOCAL_NED
  • /mavros/setpoint_position/tf/child_frame_id: target_position
  • /mavros/setpoint_position/tf/frame_id: map
  • /mavros/setpoint_position/tf/listen: False
  • /mavros/setpoint_position/tf/rate_limit: 50.0
  • /mavros/setpoint_velocity/mav_frame: LOCAL_NED
  • /mavros/startup_px4_usb_quirk: 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/time/timesync_mode: MAVLINK
  • /mavros/vibration/frame_id: base_link
  • /mavros/vision_pose/tf/child_frame_id: vision_estimate
  • /mavros/vision_pose/tf/frame_id: map
  • /mavros/vision_pose/tf/listen: False
  • /mavros/vision_pose/tf/rate_limit: 10.0
  • /mavros/vision_speed/listen_twist: True
  • /mavros/vision_speed/twist_cov: True
  • /rosdistro: kinetic
  • /rosversion: 1.12.14

NODES
/
mavros (mavros/mavros_node)

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

setting /run_id to 7960effa-3c78-11e9-9a16-4a65e9c04346
process[rosout-1]: started with pid [2629]
started core service [/rosout]
process[mavros-2]: started with pid [2647]
[ INFO] [1551482376.701838248]: FCU URL: udp://:14555@127.0.0.1:14555
[ INFO] [1551482376.705323731]: udp0: Bind address: 0.0.0.0:14555
[ INFO] [1551482376.705451185]: udp0: Remote address: 127.0.0.1:14555
[ INFO] [1551482376.705662355]: GCS bridge disabled
[ INFO] [1551482376.768224077]: Plugin 3dr_radio loaded
[ INFO] [1551482376.775060575]: Plugin 3dr_radio initialized
[ INFO] [1551482376.775141690]: Plugin actuator_control blacklisted
[ INFO] [1551482376.790650697]: Plugin adsb loaded
[ INFO] [1551482376.804918612]: Plugin adsb initialized
[ INFO] [1551482376.804993640]: Plugin altitude blacklisted
[ INFO] [1551482376.805220110]: Plugin cam_imu_sync loaded
[ INFO] [1551482376.807699620]: Plugin cam_imu_sync initialized
[ INFO] [1551482376.807973755]: Plugin command loaded
[ INFO] [1551482376.829497456]: Plugin command initialized
[ INFO] [1551482376.829757840]: Plugin companion_process_status loaded
[ INFO] [1551482376.842151578]: Plugin companion_process_status initialized
[ INFO] [1551482376.842218918]: Plugin debug_value blacklisted
[ INFO] [1551482376.842413637]: Plugin distance_sensor loaded
[ INFO] [1551482376.879883386]: Plugin distance_sensor initialized
[ INFO] [1551482376.880141682]: Plugin fake_gps loaded
[ INFO] [1551482376.940693936]: Plugin fake_gps initialized
[ INFO] [1551482376.940769676]: Plugin ftp blacklisted
[ INFO] [1551482376.941035260]: Plugin global_position loaded
[ INFO] [1551482377.007505167]: Plugin global_position initialized
[ INFO] [1551482377.007775289]: Plugin gps_rtk loaded
[ INFO] [1551482377.017507786]: Plugin gps_rtk initialized
[ INFO] [1551482377.017580426]: Plugin hil blacklisted
[ INFO] [1551482377.017829022]: Plugin home_position loaded
[ INFO] [1551482377.033057482]: Plugin home_position initialized
[ INFO] [1551482377.033328229]: Plugin imu loaded
[ INFO] [1551482377.063436737]: Plugin imu initialized
[ INFO] [1551482377.063729835]: Plugin local_position loaded
[ INFO] [1551482377.091086712]: Plugin local_position initialized
[ INFO] [1551482377.091321395]: Plugin log_transfer loaded
[ INFO] [1551482377.102385975]: Plugin log_transfer initialized
[ INFO] [1551482377.102689310]: Plugin manual_control loaded
[ INFO] [1551482377.114748674]: Plugin manual_control initialized
[ INFO] [1551482377.114994082]: Plugin mocap_pose_estimate loaded
[ INFO] [1551482377.133563745]: Plugin mocap_pose_estimate initialized
[ INFO] [1551482377.133828679]: Plugin obstacle_distance loaded
[ INFO] [1551482377.143693005]: Plugin obstacle_distance initialized
[ INFO] [1551482377.143946039]: Plugin odom loaded
[ INFO] [1551482377.168102806]: Plugin odom initialized
[ INFO] [1551482377.168377340]: Plugin param loaded
[ INFO] [1551482377.178899176]: Plugin param initialized
[ INFO] [1551482377.178978779]: Plugin px4flow blacklisted
[ INFO] [1551482377.179201199]: Plugin rangefinder loaded
[ INFO] [1551482377.181607332]: Plugin rangefinder initialized
[ INFO] [1551482377.181889579]: Plugin rc_io loaded
[ INFO] [1551482377.195931961]: Plugin rc_io initialized
[ INFO] [1551482377.196009039]: Plugin safety_area blacklisted
[ INFO] [1551482377.196251610]: Plugin setpoint_accel loaded
[ INFO] [1551482377.210391283]: Plugin setpoint_accel initialized
[ INFO] [1551482377.210690868]: Plugin setpoint_attitude loaded
[ INFO] [1551482377.260828964]: Plugin setpoint_attitude initialized
[ INFO] [1551482377.261121437]: Plugin setpoint_position loaded
[ INFO] [1551482377.323300171]: Plugin setpoint_position initialized
[ INFO] [1551482377.323593319]: Plugin setpoint_raw loaded
[ INFO] [1551482377.362717362]: Plugin setpoint_raw initialized
[ INFO] [1551482377.362986896]: Plugin setpoint_velocity loaded
[ INFO] [1551482377.388324866]: Plugin setpoint_velocity initialized
[ INFO] [1551482377.388705742]: Plugin sys_status loaded
[ INFO] [1551482377.428479595]: Plugin sys_status initialized
[ INFO] [1551482377.428780555]: Plugin sys_time loaded
[ INFO] [1551482377.455796645]: TM: Timesync mode: MAVLINK
[ INFO] [1551482377.460412679]: Plugin sys_time initialized
[ INFO] [1551482377.460742215]: Plugin trajectory loaded
[ INFO] [1551482377.483183098]: Plugin trajectory initialized
[ INFO] [1551482377.483463332]: Plugin vfr_hud loaded
[ INFO] [1551482377.485900491]: Plugin vfr_hud initialized
[ INFO] [1551482377.485988182]: Plugin vibration blacklisted
[ INFO] [1551482377.486200314]: Plugin vision_pose_estimate loaded
[ INFO] [1551482377.520402613]: Plugin vision_pose_estimate initialized
[ INFO] [1551482377.520491204]: Plugin vision_speed_estimate blacklisted
[ INFO] [1551482377.520787426]: Plugin waypoint loaded
[ INFO] [1551482377.537164476]: Plugin waypoint initialized
[ INFO] [1551482377.537454036]: Plugin wind_estimation loaded
[ INFO] [1551482377.539735302]: Plugin wind_estimation initialized
[ INFO] [1551482377.539851868]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1551482377.539948472]: Built-in MAVLink package version: 2019.1.12
[ INFO] [1551482377.540003499]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1551482377.540080926]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1551482377.561688780]: udp0: Remote address: 127.0.0.1:14555
[ INFO] [1551482378.404138565]: CON: Got HEARTBEAT, connected. FCU: No valid autopilot
[ WARN] [1551482380.417298167]: VER: broadcast request timeout, retries left 4
[ WARN] [1551482381.417578607]: VER: broadcast request timeout, retries left 3
[ WARN] [1551482382.416448587]: VER: unicast request timeout, retries left 2
[ WARN] [1551482383.412776267]: VER: unicast request timeout, retries left 1
[ WARN] [1551482384.411987309]: VER: unicast request timeout, retries left 0
[ WARN] [1551482385.415885674]: VER: your FCU don't support AUTOPILOT_VERSION, switched to default capabilities
[ INFO] [1551482388.405383894]: HP: requesting home position
[ WARN] [1551482389.406026347]: PR: request list timeout, retries left 2
[ WARN] [1551482390.408089374]: PR: request list timeout, retries left 1
[ WARN] [1551482391.408833231]: PR: request list timeout, retries left 0
[ WARN] [1551482394.406339938]: WP: timeout, retries left 2
[ WARN] [1551482395.408184658]: WP: timeout, retries left 1
[ WARN] [1551482396.410201446]: WP: timeout, retries left 0
[ERROR] [1551482397.411908885]: WP: timed out.
[ INFO] [1551482398.405388168]: HP: requesting home position
[ INFO] [1551482408.405502795]: HP: requesting home position

Diagnostics

header:
seq: 56
stamp:
secs: 1551482444
nsecs: 41031127
frame_id: ''
status:

level: 0
name: "mavros: FCU connection"
message: "connected"
hardware_id: "udp://:14555@127.0.0.1:14555"
values: 
  - 
    key: "Received packets:"
    value: "1483"
  - 
    key: "Dropped packets:"
    value: "0"
  - 
    key: "Buffer overruns:"
    value: "0"
  - 
    key: "Parse errors:"
    value: "0"
  - 
    key: "Rx sequence number:"
    value: "202"
  - 
    key: "Tx sequence number:"
    value: "203"
  - 
    key: "Rx total bytes:"
    value: "40558"
  - 
    key: "Tx total bytes:"
    value: "40558"
  - 
    key: "Rx speed:"
    value: "600.000000"
  - 
    key: "Tx speed:"
    value: "600.000000"
  • level: 2
    name: "mavros: GPS"
    message: "No satellites"
    hardware_id: "udp://:14555@127.0.0.1:14555"
    values:

    key: "Satellites visible"
    value: "0"
    
    • key: "Fix type"
      value: "0"
    • key: "EPH (m)"
      value: "Unknown"
    • key: "EPV (m)"
      value: "Unknown"
  • level: 0
    name: "mavros: Heartbeat"
    message: "Normal"
    hardware_id: "udp://:14555@127.0.0.1:14555"
    values:

    key: "Heartbeats since startup"
    value: "66"
    
    • key: "Frequency (Hz)"
      value: "0.963059"
    • key: "Vehicle type"
      value: "Onboard companion controller"
    • key: "Autopilot type"
      value: "No valid autopilot"
    • key: "Mode"
      value: "MODE(0xC0)"
    • key: "System status"
      value: "Active"
  • level: 0
    name: "mavros: System"
    message: "Normal"
    hardware_id: "udp://:14555@127.0.0.1:14555"
    values:

    key: "Sensor present"
    value: "0x00000000"
    
  • level: 2
    name: "mavros: Battery"
    message: "No data"
    hardware_id: "udp://:14555@127.0.0.1:14555"
    values:

    key: "Voltage"
    value: "-1.00"
    
    • key: "Current"
      value: "0.0"
    • key: "Remaining"
      value: "0.0"
  • level: 0
    name: "mavros: Time Sync"
    message: "Normal"
    hardware_id: "udp://:14555@127.0.0.1:14555"
    values:

    key: "Timesyncs since startup"
    value: "665"
    
    • key: "Frequency (Hz)"
      value: "10.001075"
    • key: "Last RTT (ms)"
      value: "0.503029"
    • key: "Mean RTT (ms)"
      value: "0.661527"
    • key: "Last remote time (s)"
      value: "1551482443.961940765"
    • key: "Estimated time offset (s)"
      value: "9223372036.854604721"

Check ID

ERROR. I got 1 addresses, but not your target 1:1
Received 332 messages, from 1 addresses
sys:comp list of messages
1:240 0, 2, 76, 111

@huhu1030
Copy link
Author

I updated Ardupilot from 3.5.3 to 3.7.0. Still the same issue..

@vooon vooon added the question label Apr 19, 2019
@vooon
Copy link
Member

vooon commented Apr 19, 2019

You use same port for bind and remote, mavros simply got it's own heartbeats. See "Vehicle type".
You should use different ports, like udp://:14550@localhost:14555 (flight firmware should listen to port 14555).

@huhu1030
Copy link
Author

Okay, it was indeed a port problem. Thank you very much.
Now I'm trying to launch a basic node that arm and takeoff. But as soon as it arms the drone, the remote address changes to another IP and thus Mavros is losing connection. Do you know why?

@vooon
Copy link
Member

vooon commented Apr 23, 2019

Some other computer sending the data to port that mavros binds to. Because UDP is connectless, libmavconn uses address of the last packet to talk back. Try to use other port, e.g udp://:14540@.

@huhu1030
Copy link
Author

if I use 14540 it's not connecting to fcu.

@vooon
Copy link
Member

vooon commented Apr 25, 2019

Because you should first configure your AP to use another port.

@huhu1030
Copy link
Author

I've fixed this by changing the IP to localhost ip: 127.0.0.1.
But can you tell me where I can change the port ? Thanks.

@vooon
Copy link
Member

vooon commented Apr 28, 2019

That is really depends on flight firmware you are using. E.g. as i remember, APM may be tuned by command line args.

@huhu1030
Copy link
Author

huhu1030 commented May 7, 2019

I don't know about APM but you can change the port inside the Mavlink-router conf file.
I'm facing another issue. It appears that I can connect to the fcu only 1 when system_id target_id.
I'm changing the SYSMAV_ID to 25, same with the target_id but It doesn't seems to work.

[ INFO] [1557198201.889025826]: MAVROS started. MY ID 1.240, TARGET ID 25.1

CheckId returns :
ERROR. I got 1 addresses, but not your target 25:1 Received 1708 messages, from 1 addresses sys:comp list of messages 1:1 0, 1, 2, 22, 129, 136, 152, 147, 150, 24, 27, 29, 30, 32, 33, 163, 36, 165, 42, 178, 182, 62, 65, 74, 193, 164, 111, 241, 116, 125

@huhu1030
Copy link
Author

huhu1030 commented May 7, 2019

I've fixed it.
Once you modify the SYSMAV_ID on GCS, you need to reboot.
Now the target_id == SYSMAV_ID and FCU is connected.
Thanks Vooon for your time and help.

@vooon vooon closed this as completed May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants