ERROR: unsupported FCU while trying to send mavros commands to flight controller

Hi, I am trying to connect my apm to ros through usb cable to my laptop running ubuntu 20.04 and ros noetic.

  • I run first roscore in the terminal
  • Then in the second terminal, roslaunch mavros apm.launch. Till here everything is fine.
  • In the third terminal: rosrun mavros mavsys mode -c 0. This gives me "request failed. Check mavros logs.

I checked the logs stating: [ERROR] [1660644371.449748186]: MODE: Unsupported FCU
What would the problem be?

[First terminal]:

... logging to /home/nabil/.ros/log/070b52da-1d4b-11ed-b187-ff489c9c487a/roslaunch-linux-17342.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://linux:43719/
ros_comm version 1.15.14


SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.15.14

NODES

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

setting /run_id to 070b52da-1d4b-11ed-b187-ff489c9c487a
process[rosout-1]: started with pid [17364]
started core service [/rosout]

[Second terminal]:

... logging to /home/nabil/.ros/log/070b52da-1d4b-11ed-b187-ff489c9c487a/roslaunch-linux-17485.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://linux:42399/

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_id: 4
 * /mavros/fake_gps/gps_rate: 5.0
 * /mavros/fake_gps/horiz_accuracy: 0.5
 * /mavros/fake_gps/mocap_transform: False
 * /mavros/fake_gps/mocap_withcovariance: False
 * /mavros/fake_gps/satellites_visible: 6
 * /mavros/fake_gps/speed_accuracy: 0.0
 * /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_hil_gps: True
 * /mavros/fake_gps/use_mocap: True
 * /mavros/fake_gps/use_vision: False
 * /mavros/fake_gps/vert_accuracy: 0.5
 * /mavros/fcu_protocol: v2.0
 * /mavros/fcu_url: /dev/ttyACM0:57600
 * /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/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.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: 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
 * /mavros/wheel_odometry/child_frame_id: base_link
 * /mavros/wheel_odometry/count: 2
 * /mavros/wheel_odometry/frame_id: map
 * /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: map
 * /mavros/wheel_odometry/tf/send: True
 * /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.14

NODES
  /
    mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

process[mavros-1]: started with pid [17500]
[ INFO] [1660644365.758431655]: FCU URL: /dev/ttyACM0:57600
[ INFO] [1660644365.760104301]: serial0: device: /dev/ttyACM0 @ 57600 bps
[ INFO] [1660644365.760360212]: GCS bridge disabled
[ INFO] [1660644365.767868422]: Plugin 3dr_radio loaded
[ INFO] [1660644365.768874618]: Plugin 3dr_radio initialized
[ INFO] [1660644365.768901309]: Plugin actuator_control blacklisted
[ INFO] [1660644365.771963158]: Plugin adsb loaded
[ INFO] [1660644365.774527945]: Plugin adsb initialized
[ INFO] [1660644365.774555031]: Plugin altitude blacklisted
[ INFO] [1660644365.774622221]: Plugin cam_imu_sync loaded
[ INFO] [1660644365.775018286]: Plugin cam_imu_sync initialized
[ INFO] [1660644365.775085770]: Plugin camera loaded
[ INFO] [1660644365.775468126]: Plugin camera initialized
[ INFO] [1660644365.775544036]: Plugin command loaded
[ INFO] [1660644365.780746470]: Plugin command initialized
[ INFO] [1660644365.780816269]: Plugin companion_process_status loaded
[ INFO] [1660644365.782414000]: Plugin companion_process_status initialized
[ INFO] [1660644365.782434467]: Plugin debug_value blacklisted
[ INFO] [1660644365.782484979]: Plugin distance_sensor loaded
[ INFO] [1660644365.788850554]: Plugin distance_sensor initialized
[ INFO] [1660644365.788944102]: Plugin esc_status loaded
[ INFO] [1660644365.789750112]: Plugin esc_status initialized
[ INFO] [1660644365.789817432]: Plugin esc_telemetry loaded
[ INFO] [1660644365.790169600]: Plugin esc_telemetry initialized
[ INFO] [1660644365.790232123]: Plugin fake_gps loaded
[ INFO] [1660644365.802159420]: Plugin fake_gps initialized
[ INFO] [1660644365.802192898]: Plugin ftp blacklisted
[ INFO] [1660644365.802277841]: Plugin geofence loaded
[ INFO] [1660644365.804170352]: Plugin geofence initialized
[ INFO] [1660644365.804247565]: Plugin global_position loaded
[ INFO] [1660644365.814560645]: Plugin global_position initialized
[ INFO] [1660644365.814657804]: Plugin gps_input loaded
[ INFO] [1660644365.816284385]: Plugin gps_input initialized
[ INFO] [1660644365.816372853]: Plugin gps_rtk loaded
[ INFO] [1660644365.818510347]: Plugin gps_rtk initialized
[ INFO] [1660644365.818615780]: Plugin gps_status loaded
[ INFO] [1660644365.820328965]: Plugin gps_status initialized
[ INFO] [1660644365.820351887]: Plugin hil blacklisted
[ INFO] [1660644365.820441160]: Plugin home_position loaded
[ INFO] [1660644365.822570336]: Plugin home_position initialized
[ INFO] [1660644365.822662953]: Plugin imu loaded
[ INFO] [1660644365.827443623]: Plugin imu initialized
[ INFO] [1660644365.827537004]: Plugin landing_target loaded
[ INFO] [1660644365.836671455]: Plugin landing_target initialized
[ INFO] [1660644365.836767286]: Plugin local_position loaded
[ INFO] [1660644365.841208945]: Plugin local_position initialized
[ INFO] [1660644365.841357728]: Plugin log_transfer loaded
[ INFO] [1660644365.843446227]: Plugin log_transfer initialized
[ INFO] [1660644365.843582869]: Plugin mag_calibration_status loaded
[ INFO] [1660644365.844271341]: Plugin mag_calibration_status initialized
[ INFO] [1660644365.844428210]: Plugin manual_control loaded
[ INFO] [1660644365.846396955]: Plugin manual_control initialized
[ INFO] [1660644365.846539358]: Plugin mocap_pose_estimate loaded
[ INFO] [1660644365.849122098]: Plugin mocap_pose_estimate initialized
[ INFO] [1660644365.849272804]: Plugin mount_control loaded
[ INFO] [1660644365.851834125]: Plugin mount_control initialized
[ INFO] [1660644365.851995487]: Plugin nav_controller_output loaded
[ INFO] [1660644365.852358979]: Plugin nav_controller_output initialized
[ INFO] [1660644365.852485431]: Plugin obstacle_distance loaded
[ INFO] [1660644365.854416814]: Plugin obstacle_distance initialized
[ INFO] [1660644365.854540469]: Plugin odom loaded
[ INFO] [1660644365.856930361]: Plugin odom initialized
[ INFO] [1660644365.857062499]: Plugin onboard_computer_status loaded
[ INFO] [1660644365.858609553]: Plugin onboard_computer_status initialized
[ INFO] [1660644365.858779001]: Plugin param loaded
[ INFO] [1660644365.860543215]: Plugin param initialized
[ INFO] [1660644365.860676758]: Plugin play_tune loaded
[ INFO] [1660644365.862394420]: Plugin play_tune initialized
[ INFO] [1660644365.862431853]: Plugin px4flow blacklisted
[ INFO] [1660644365.862581333]: Plugin rallypoint loaded
[ INFO] [1660644365.864374497]: Plugin rallypoint initialized
[ INFO] [1660644365.864503165]: Plugin rangefinder loaded
[ INFO] [1660644365.864955839]: Plugin rangefinder initialized
[ INFO] [1660644365.865102660]: Plugin rc_io loaded
[ INFO] [1660644365.867415941]: Plugin rc_io initialized
[ INFO] [1660644365.867471339]: Plugin safety_area blacklisted
[ INFO] [1660644365.867622254]: Plugin setpoint_accel loaded
[ INFO] [1660644365.869620339]: Plugin setpoint_accel initialized
[ INFO] [1660644365.869796221]: Plugin setpoint_attitude loaded
[ INFO] [1660644365.875805878]: Plugin setpoint_attitude initialized
[ INFO] [1660644365.875969323]: Plugin setpoint_position loaded
[ INFO] [1660644365.886625461]: Plugin setpoint_position initialized
[ INFO] [1660644365.886831677]: Plugin setpoint_raw loaded
[ INFO] [1660644365.892676940]: Plugin setpoint_raw initialized
[ INFO] [1660644365.892843058]: Plugin setpoint_trajectory loaded
[ INFO] [1660644365.895898297]: Plugin setpoint_trajectory initialized
[ INFO] [1660644365.896058195]: Plugin setpoint_velocity loaded
[ INFO] [1660644365.899675969]: Plugin setpoint_velocity initialized
[ INFO] [1660644365.899846278]: Plugin sys_status loaded
[ INFO] [1660644365.907022629]: Plugin sys_status initialized
[ INFO] [1660644365.907177812]: Plugin sys_time loaded
[ INFO] [1660644365.911514726]: TM: Timesync mode: MAVLINK
[ INFO] [1660644365.911924889]: TM: Not publishing sim time
[ INFO] [1660644365.912960667]: Plugin sys_time initialized
[ INFO] [1660644365.913080973]: Plugin terrain loaded
[ INFO] [1660644365.913436597]: Plugin terrain initialized
[ INFO] [1660644365.913505314]: Plugin trajectory loaded
[ INFO] [1660644365.917332917]: Plugin trajectory initialized
[ INFO] [1660644365.917423231]: Plugin tunnel loaded
[ INFO] [1660644365.919466806]: Plugin tunnel initialized
[ INFO] [1660644365.919568986]: Plugin vfr_hud loaded
[ INFO] [1660644365.920007525]: Plugin vfr_hud initialized
[ INFO] [1660644365.920032704]: Plugin vibration blacklisted
[ INFO] [1660644365.920110763]: Plugin vision_pose_estimate loaded
[ INFO] [1660644365.924975708]: Plugin vision_pose_estimate initialized
[ INFO] [1660644365.925011562]: Plugin vision_speed_estimate blacklisted
[ INFO] [1660644365.925099400]: Plugin waypoint loaded
[ INFO] [1660644365.928011017]: Plugin waypoint initialized
[ INFO] [1660644365.928033247]: Plugin wheel_odometry blacklisted
[ INFO] [1660644365.928123469]: Plugin wind_estimation loaded
[ INFO] [1660644365.928464400]: Plugin wind_estimation initialized
[ INFO] [1660644365.928559647]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1660644365.928590892]: Built-in MAVLink package version: 2022.3.3
[ INFO] [1660644365.928626901]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta
[ INFO] [1660644365.928662189]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ERROR] [1660644371.449748186]: MODE: Unsupported FCU


[Third Terminal]:

Request failed. Check mavros logs

EDIT:

When I run rostopic echo -n1 /diagnostics I get that the ardupilot is not connected:

header: 
  seq: 34
  stamp: 
    secs: 1660649618
    nsecs: 514736010
  frame_id: ''
status: 
  - 
    level: 1
    name: "mavros: FCU connection"
    message: "not connected"
    hardware_id: "/dev/ttyACM0:57600"
    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: "88"
      - 
        key: "Tx total bytes:"
        value: "12160"
      - 
        key: "Rx speed:"
        value: "0.000000"
      - 
        key: "Tx speed:"
        value: "320.000000"
  - 
    level: 2
    name: "mavros: GPS"
    message: "No satellites"
    hardware_id: "/dev/ttyACM0:57600"
    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/ttyACM0:57600"
    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/ttyACM0:57600"
    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/ttyACM0:57600"
    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/ttyACM0:57600"
    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"
---