mavros icon indicating copy to clipboard operation
mavros copied to clipboard

Mavros connects to FCU but it won't take any command - timeout

Open rsisto opened this issue 4 years ago • 18 comments

This is only bug and feature tracker, please use it to report bugs or request features.


Issue details

Hi, I'm having issues connecting using mavros to ardupilot rover. Using APM Planner the connection works great, but when trying over mavros I can receive data from the device, but timeout occurs when I want to send (for example, I can't change the mode).

Example, issuing this command replies ok: rosservice call /mavros/set_mode 0 AUTO mode_sent: True

After checking /diagnostics topic, the mode is still: key: "Mode" value: "HOLD"

And I keep seeing messages of this sort in mavros: [ INFO] [1588833010.541105240]: HP: requesting home position [ WARN] [1588833015.545757831]: CMD: Command 410 -- wait ack timeout

Any help will be appreciated, thanks!!

MAVROS version and platform

Mavros: 1.0.0 ROS: Kinetic Ubuntu: 16.04

Autopilot type and version

[ X] ArduPilot [ ] PX4

Node logs

ubuntu@ubuntu-VPCCW21FX:~/workspaces/hidrodata/hidrodata_heron$ roslaunch mavros apm.launch fcu_url:=/dev/ttyUSB0:57600 fcu_protocol:="v2.0"
... logging to /home/ubuntu/.ros/log/c2d08ec4-9029-11ea-9e88-2c8158f2e67b/roslaunch-ubuntu-VPCCW21FX-12995.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://ubuntu-VPCCW21FX:32853/

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: /dev/ttyUSB0: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/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: kinetic
 * /rosversion: 1.12.14

NODES
  /
    mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

process[mavros-1]: started with pid [13021]
[ INFO] [1588831970.528511447]: FCU URL: /dev/ttyUSB0:57600
[ INFO] [1588831970.531710184]: serial0: device: /dev/ttyUSB0 @ 57600 bps
[ INFO] [1588831970.533798676]: GCS bridge disabled
[ INFO] [1588831970.563294115]: Plugin 3dr_radio loaded
[ INFO] [1588831970.567481275]: Plugin 3dr_radio initialized
[ INFO] [1588831970.567561957]: Plugin actuator_control blacklisted
[ INFO] [1588831970.574185356]: Plugin adsb loaded
[ INFO] [1588831970.584826269]: Plugin adsb initialized
[ INFO] [1588831970.584900038]: Plugin altitude blacklisted
[ INFO] [1588831970.585134198]: Plugin cam_imu_sync loaded
[ INFO] [1588831970.586585771]: Plugin cam_imu_sync initialized
[ INFO] [1588831970.586843501]: Plugin command loaded
[ INFO] [1588831970.604831802]: Plugin command initialized
[ INFO] [1588831970.605120357]: Plugin companion_process_status loaded
[ INFO] [1588831970.613562591]: Plugin companion_process_status initialized
[ INFO] [1588831970.613643229]: Plugin debug_value blacklisted
[ INFO] [1588831970.613879234]: Plugin distance_sensor loaded
[ INFO] [1588831970.635967407]: Plugin distance_sensor initialized
[ INFO] [1588831970.636323100]: Plugin fake_gps loaded
[ INFO] [1588831970.680390134]: Plugin fake_gps initialized
[ INFO] [1588831970.680476118]: Plugin ftp blacklisted
[ INFO] [1588831970.680816583]: Plugin global_position loaded
[ INFO] [1588831970.732085515]: Plugin global_position initialized
[ INFO] [1588831970.732405414]: Plugin gps_rtk loaded
[ INFO] [1588831970.740172946]: Plugin gps_rtk initialized
[ INFO] [1588831970.740260893]: Plugin hil blacklisted
[ INFO] [1588831970.740555350]: Plugin home_position loaded
[ INFO] [1588831970.750095138]: Plugin home_position initialized
[ INFO] [1588831970.750482369]: Plugin imu loaded
[ INFO] [1588831970.773567470]: Plugin imu initialized
[ INFO] [1588831970.773921482]: Plugin landing_target loaded
[ INFO] [1588831970.814741379]: Plugin landing_target initialized
[ INFO] [1588831970.815352324]: Plugin local_position loaded
[ INFO] [1588831970.832054268]: Plugin local_position initialized
[ INFO] [1588831970.832321929]: Plugin log_transfer loaded
[ INFO] [1588831970.839472113]: Plugin log_transfer initialized
[ INFO] [1588831970.839837191]: Plugin manual_control loaded
[ INFO] [1588831970.848364454]: Plugin manual_control initialized
[ INFO] [1588831970.848718821]: Plugin mocap_pose_estimate loaded
[ INFO] [1588831970.862051666]: Plugin mocap_pose_estimate initialized
[ INFO] [1588831970.862315111]: Plugin mount_control loaded
[ INFO] [1588831970.872076091]: Plugin mount_control initialized
[ INFO] [1588831970.872338305]: Plugin obstacle_distance loaded
[ INFO] [1588831970.879679444]: Plugin obstacle_distance initialized
[ INFO] [1588831970.879919572]: Plugin odom loaded
[ INFO] [1588831970.890068552]: Plugin odom initialized
[ INFO] [1588831970.890353309]: Plugin onboard_computer_status loaded
[ INFO] [1588831970.899601207]: Plugin onboard_computer_status initialized
[ INFO] [1588831970.899979261]: Plugin param loaded
[ INFO] [1588831970.907098356]: Plugin param initialized
[ INFO] [1588831970.907221742]: Plugin px4flow blacklisted
[ INFO] [1588831970.907427792]: Plugin rangefinder loaded
[ INFO] [1588831970.909104264]: Plugin rangefinder initialized
[ INFO] [1588831970.909332280]: Plugin rc_io loaded
[ INFO] [1588831970.919526001]: Plugin rc_io initialized
[ INFO] [1588831970.919625845]: Plugin safety_area blacklisted
[ INFO] [1588831970.919867270]: Plugin setpoint_accel loaded
[ INFO] [1588831970.928119298]: Plugin setpoint_accel initialized
[ INFO] [1588831970.928426468]: Plugin setpoint_attitude loaded
[ INFO] [1588831970.956909979]: Plugin setpoint_attitude initialized
[ INFO] [1588831970.957215212]: Plugin setpoint_position loaded
[ INFO] [1588831970.999736520]: Plugin setpoint_position initialized
[ INFO] [1588831971.000078733]: Plugin setpoint_raw loaded
[ INFO] [1588831971.026230551]: Plugin setpoint_raw initialized
[ INFO] [1588831971.026865685]: Plugin setpoint_trajectory loaded
[ INFO] [1588831971.042301915]: Plugin setpoint_trajectory initialized
[ INFO] [1588831971.042709180]: Plugin setpoint_velocity loaded
[ INFO] [1588831971.056460352]: Plugin setpoint_velocity initialized
[ INFO] [1588831971.056740594]: Plugin sys_status loaded
[ INFO] [1588831971.085203120]: Plugin sys_status initialized
[ INFO] [1588831971.085525364]: Plugin sys_time loaded
[ INFO] [1588831971.101330990]: TM: Timesync mode: MAVLINK
[ INFO] [1588831971.104840843]: Plugin sys_time initialized
[ INFO] [1588831971.105149369]: Plugin trajectory loaded
[ INFO] [1588831971.123907485]: Plugin trajectory initialized
[ INFO] [1588831971.124202430]: Plugin vfr_hud loaded
[ INFO] [1588831971.125767995]: Plugin vfr_hud initialized
[ INFO] [1588831971.125849726]: Plugin vibration blacklisted
[ INFO] [1588831971.126059822]: Plugin vision_pose_estimate loaded
[ INFO] [1588831971.147224063]: Plugin vision_pose_estimate initialized
[ INFO] [1588831971.147317185]: Plugin vision_speed_estimate blacklisted
[ INFO] [1588831971.147571797]: Plugin waypoint loaded
[ INFO] [1588831971.164192075]: Plugin waypoint initialized
[ INFO] [1588831971.164284449]: Plugin wheel_odometry blacklisted
[ INFO] [1588831971.164545151]: Plugin wind_estimation loaded
[ INFO] [1588831971.166457537]: Plugin wind_estimation initialized
[ INFO] [1588831971.166574151]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1588831971.166635459]: Built-in MAVLink package version: 2020.3.3
[ INFO] [1588831971.166710201]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1588831971.166776475]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1588831971.539636052]: IMU: Raw IMU message used.
[ WARN] [1588831971.539833654]: IMU: linear acceleration on RAW_IMU known on APM only.
[ WARN] [1588831971.539929415]: IMU: ~imu/data_raw stores unscaled raw acceleration report.
[ INFO] [1588831971.678828581]: CON: Got HEARTBEAT, connected. FCU: ArduPilot
[ WARN] [1588831973.683642423]: VER: broadcast request timeout, retries left 4
[ WARN] [1588831974.684148898]: VER: broadcast request timeout, retries left 3
[ WARN] [1588831980.684330185]: CMD: Command 520 -- wait ack timeout
[ WARN] [1588831980.684657361]: VER: unicast request timeout, retries left 2
[ INFO] [1588831981.680163736]: HP: requesting home position
[ WARN] [1588831985.688226013]: CMD: Command 520 -- wait ack timeout
[ WARN] [1588831985.688641981]: VER: unicast request timeout, retries left 1
[ WARN] [1588831985.688840767]: PR: request list timeout, retries left 2
[ WARN] [1588831986.684587585]: CMD: Command 410 -- wait ack timeout
[ WARN] [1588831986.689702165]: PR: request list timeout, retries left 1
[ WARN] [1588831987.685810721]: WP: timeout, retries left 2
[ WARN] [1588831987.690677428]: PR: request list timeout, retries left 0
[ WARN] [1588831988.687276710]: WP: timeout, retries left 1
[ WARN] [1588831989.687942563]: WP: timeout, retries left 0
[ERROR] [1588831990.688857786]: WP: timed out.
[ WARN] [1588831990.691668891]: CMD: Command 520 -- wait ack timeout
[ WARN] [1588831990.692008389]: VER: unicast request timeout, retries left 0
[ INFO] [1588831991.679235812]: HP: requesting home position
[ WARN] [1588831995.696116197]: CMD: Command 520 -- wait ack timeout
[ WARN] [1588831995.696520495]: VER: your FCU don't support AUTOPILOT_VERSION, switched to default capabilities
[ WARN] [1588831996.683708448]: CMD: Command 410 -- wait ack timeout
[ WARN] [1588831997.043588871]: WP: timeout, retries left 2
[ WARN] [1588831998.044713978]: WP: timeout, retries left 1
[ WARN] [1588831999.045755620]: WP: timeout, retries left 0
[ERROR] [1588832000.046889698]: WP: timed out.
[ INFO] [1588832001.679615641]: HP: requesting home position
[ WARN] [1588832006.683974636]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832011.679529651]: HP: requesting home position
[ WARN] [1588832016.683898057]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832021.680048873]: HP: requesting home position
[ WARN] [1588832026.684404522]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832031.679539704]: HP: requesting home position
[ WARN] [1588832036.682970915]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832041.679879356]: HP: requesting home position
[ WARN] [1588832046.685131391]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832051.679051283]: HP: requesting home position
[ WARN] [1588832056.683771026]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832061.680159231]: HP: requesting home position
[ WARN] [1588832066.684746210]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832071.679389765]: HP: requesting home position
[ WARN] [1588832076.682293792]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832081.679484393]: HP: requesting home position
[ WARN] [1588832086.682403731]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832091.680091509]: HP: requesting home position
[ WARN] [1588832096.682915036]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832101.679118043]: HP: requesting home position
[ WARN] [1588832106.683060356]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832111.679284971]: HP: requesting home position
[ WARN] [1588832116.683312451]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588832121.680090632]: HP: requesting home position
[ WARN] [1588832126.683033675]: CMD: Command 410 -- wait ack timeout

Diagnostics

header: 
  seq: 13
  stamp: 
    secs: 1588831980
    nsecs: 168289960
  frame_id: ''
status: 
  - 
    level: 0
    name: "mavros: FCU connection"
    message: "connected"
    hardware_id: "/dev/ttyUSB0:57600"
    values: 
      - 
        key: "Received packets:"
        value: "454"
      - 
        key: "Dropped packets:"
        value: "0"
      - 
        key: "Buffer overruns:"
        value: "0"
      - 
        key: "Parse errors:"
        value: "0"
      - 
        key: "Rx sequence number:"
        value: "2"
      - 
        key: "Tx sequence number:"
        value: "0"
      - 
        key: "Rx total bytes:"
        value: "13359"
      - 
        key: "Tx total bytes:"
        value: "3050"
      - 
        key: "Rx speed:"
        value: "1479.000000"
      - 
        key: "Tx speed:"
        value: "320.000000"
  - 
    level: 0
    name: "mavros: GPS"
    message: "3D fix"
    hardware_id: "/dev/ttyUSB0:57600"
    values: 
      - 
        key: "Satellites visible"
        value: "8"
      - 
        key: "Fix type"
        value: "3"
      - 
        key: "EPH (m)"
        value: "2.51"
      - 
        key: "EPV (m)"
        value: "Unknown"
  - 
    level: 0
    name: "mavros: Heartbeat"
    message: "Normal"
    hardware_id: "/dev/ttyUSB0:57600"
    values: 
      - 
        key: "Heartbeats since startup"
        value: "9"
      - 
        key: "Frequency (Hz)"
        value: "0.987766"
      - 
        key: "Vehicle type"
        value: "Ground rover"
      - 
        key: "Autopilot type"
        value: "ArduPilot"
      - 
        key: "Mode"
        value: "HOLD"
      - 
        key: "System status"
        value: "Uninit"
  - 
    level: 0
    name: "mavros: System"
    message: "Normal"
    hardware_id: "/dev/ttyUSB0:57600"
    values: 
      - 
        key: "Sensor present"
        value: "0x0020DC27"
      - 
        key: "Sensor enabled"
        value: "0x00208027"
      - 
        key: "Sensor health"
        value: "0x0020DC27"
      - 
        key: "3D gyro"
        value: "Ok"
      - 
        key: "3D accelerometer"
        value: "Ok"
      - 
        key: "3D magnetometer"
        value: "Ok"
      - 
        key: "GPS"
        value: "Ok"
      - 
        key: "motor outputs / control"
        value: "Ok"
      - 
        key: "AHRS subsystem health"
        value: "Ok"
      - 
        key: "CPU Load (%)"
        value: "49.6"
      - 
        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: 1
    name: "mavros: Battery"
    message: "Low voltage"
    hardware_id: "/dev/ttyUSB0:57600"
    values: 
      - 
        key: "Voltage"
        value: "1.79"
      - 
        key: "Current"
        value: "3.6"
      - 
        key: "Remaining"
        value: "-96.0"
  - 
    level: 2
    name: "mavros: Time Sync"
    message: "No events recorded."
    hardware_id: "/dev/ttyUSB0: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"

Check ID

rosrun mavros checkid
OK. I got messages from 1:1.

---
Received 668 messages, from 1 addresses
sys:comp   list of messages
  1:1     0, 1, 2, 163, 36, 165, 33, 42, 24, 35, 62, 150, 152, 27, 74, 30

rsisto avatar May 07 '20 06:05 rsisto

You have a problem somewhere on computer Tx -- FCU Rx connection.

vooon avatar May 07 '20 07:05 vooon

Hi @vooon , thanks for your reply. I realised this only happens with mavros, so I think I'm missing some configuration.. Using APM Planner (on the same Ubuntu host) works flawlessly, no errors and connects instantly.

Can you suggest some parameters to check to keep looking into this?

Thanks, I appreciate your comments!!

rsisto avatar May 08 '20 11:05 rsisto

Have you had apm planner running, while trying to start mavros? From logs i see that message flow from autopilot to mavros works, but nothing gets to the autopilot from mavros. Usually that is hardware problem, e.g. bad connection, not connected grounds etc. But serial port may be blocked by other software. So need to check if you can connect with something else, e.g. mavproxy to /dev/ttyUSB0 with 57600 baud rate. Also maybe you configured fcu's port for some other function than mavlink (v2).

vooon avatar May 08 '20 19:05 vooon

Hi, thanks for your quick answer!!

Regarding your questions, I'm confident the port is free for mavros. From a fresh startup, I run: first terminal

$ roscore
... logging to /home/ubuntu/.ros/log/23bf80f8-916c-11ea-811d-2c8158f2e67b/roslaunch-ubuntu-VPCCW21FX-14585.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://ubuntu-VPCCW21FX:33405/
ros_comm version 1.12.14


SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES

auto-starting new master
process[master]: started with pid [14595]
ROS_MASTER_URI=http://ubuntu-VPCCW21FX:11311/

setting /run_id to 23bf80f8-916c-11ea-811d-2c8158f2e67b
process[rosout-1]: started with pid [14612]
started core service [/rosout]

second terminal

~$ roslaunch mavros apm.launch fcu_url:=/dev/ttyUSB0:57600 
... logging to /home/ubuntu/.ros/log/23bf80f8-916c-11ea-811d-2c8158f2e67b/roslaunch-ubuntu-VPCCW21FX-14596.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://ubuntu-VPCCW21FX:36019/

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: /dev/ttyUSB0: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/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: kinetic
 * /rosversion: 1.12.14

NODES
  /
    mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

process[mavros-1]: started with pid [14643]
[ INFO] [1588970425.802465057]: FCU URL: /dev/ttyUSB0:57600
[ INFO] [1588970425.804755043]: serial0: device: /dev/ttyUSB0 @ 57600 bps
[ INFO] [1588970425.806300020]: GCS bridge disabled
[ INFO] [1588970425.830287279]: Plugin 3dr_radio loaded
[ INFO] [1588970425.835862991]: Plugin 3dr_radio initialized
[ INFO] [1588970425.836008394]: Plugin actuator_control blacklisted
[ INFO] [1588970425.844069043]: Plugin adsb loaded
[ INFO] [1588970425.852102650]: Plugin adsb initialized
[ INFO] [1588970425.852174307]: Plugin altitude blacklisted
[ INFO] [1588970425.852378593]: Plugin cam_imu_sync loaded
[ INFO] [1588970425.853584693]: Plugin cam_imu_sync initialized
[ INFO] [1588970425.853793013]: Plugin command loaded
[ INFO] [1588970425.865558271]: Plugin command initialized
[ INFO] [1588970425.865849964]: Plugin companion_process_status loaded
[ INFO] [1588970425.875063567]: Plugin companion_process_status initialized
[ INFO] [1588970425.875134185]: Plugin debug_value blacklisted
[ INFO] [1588970425.875362059]: Plugin distance_sensor loaded
[ INFO] [1588970425.897285909]: Plugin distance_sensor initialized
[ INFO] [1588970425.897562660]: Plugin fake_gps loaded
[ INFO] [1588970425.935650702]: Plugin fake_gps initialized
[ INFO] [1588970425.935726660]: Plugin ftp blacklisted
[ INFO] [1588970425.936023567]: Plugin global_position loaded
[ INFO] [1588970425.976160200]: Plugin global_position initialized
[ INFO] [1588970425.976416675]: Plugin gps_rtk loaded
[ INFO] [1588970425.981749476]: Plugin gps_rtk initialized
[ INFO] [1588970425.981822842]: Plugin hil blacklisted
[ INFO] [1588970425.982084649]: Plugin home_position loaded
[ INFO] [1588970425.992273882]: Plugin home_position initialized
[ INFO] [1588970425.992729212]: Plugin imu loaded
[ INFO] [1588970426.013668309]: Plugin imu initialized
[ INFO] [1588970426.013935216]: Plugin landing_target loaded
[ INFO] [1588970426.050272175]: Plugin landing_target initialized
[ INFO] [1588970426.050699533]: Plugin local_position loaded
[ INFO] [1588970426.065022188]: Plugin local_position initialized
[ INFO] [1588970426.065280334]: Plugin log_transfer loaded
[ INFO] [1588970426.070980774]: Plugin log_transfer initialized
[ INFO] [1588970426.071266426]: Plugin manual_control loaded
[ INFO] [1588970426.087239491]: Plugin manual_control initialized
[ INFO] [1588970426.087637113]: Plugin mocap_pose_estimate loaded
[ INFO] [1588970426.097176765]: Plugin mocap_pose_estimate initialized
[ INFO] [1588970426.097590884]: Plugin mount_control loaded
[ INFO] [1588970426.105207160]: Plugin mount_control initialized
[ INFO] [1588970426.105572810]: Plugin obstacle_distance loaded
[ INFO] [1588970426.113714162]: Plugin obstacle_distance initialized
[ INFO] [1588970426.113981940]: Plugin odom loaded
[ INFO] [1588970426.129247672]: Plugin odom initialized
[ INFO] [1588970426.129519415]: Plugin onboard_computer_status loaded
[ INFO] [1588970426.135288506]: Plugin onboard_computer_status initialized
[ INFO] [1588970426.135605131]: Plugin param loaded
[ INFO] [1588970426.141157956]: Plugin param initialized
[ INFO] [1588970426.141229590]: Plugin px4flow blacklisted
[ INFO] [1588970426.141456637]: Plugin rangefinder loaded
[ INFO] [1588970426.142689289]: Plugin rangefinder initialized
[ INFO] [1588970426.142938079]: Plugin rc_io loaded
[ INFO] [1588970426.150839875]: Plugin rc_io initialized
[ INFO] [1588970426.150925800]: Plugin safety_area blacklisted
[ INFO] [1588970426.151218037]: Plugin setpoint_accel loaded
[ INFO] [1588970426.165194243]: Plugin setpoint_accel initialized
[ INFO] [1588970426.165526722]: Plugin setpoint_attitude loaded
[ INFO] [1588970426.187247772]: Plugin setpoint_attitude initialized
[ INFO] [1588970426.187574693]: Plugin setpoint_position loaded
[ INFO] [1588970426.228428625]: Plugin setpoint_position initialized
[ INFO] [1588970426.228898403]: Plugin setpoint_raw loaded
[ INFO] [1588970426.257521007]: Plugin setpoint_raw initialized
[ INFO] [1588970426.257818393]: Plugin setpoint_trajectory loaded
[ INFO] [1588970426.268886002]: Plugin setpoint_trajectory initialized
[ INFO] [1588970426.269184989]: Plugin setpoint_velocity loaded
[ INFO] [1588970426.287309070]: Plugin setpoint_velocity initialized
[ INFO] [1588970426.287645488]: Plugin sys_status loaded
[ INFO] [1588970426.312158883]: Plugin sys_status initialized
[ INFO] [1588970426.312641286]: Plugin sys_time loaded
[ INFO] [1588970426.334175796]: TM: Timesync mode: MAVLINK
[ INFO] [1588970426.336918137]: Plugin sys_time initialized
[ INFO] [1588970426.337184886]: Plugin trajectory loaded
[ INFO] [1588970426.350603226]: Plugin trajectory initialized
[ INFO] [1588970426.350890168]: Plugin vfr_hud loaded
[ INFO] [1588970426.352237786]: Plugin vfr_hud initialized
[ INFO] [1588970426.352313354]: Plugin vibration blacklisted
[ INFO] [1588970426.352522144]: Plugin vision_pose_estimate loaded
[ INFO] [1588970426.378328567]: Plugin vision_pose_estimate initialized
[ INFO] [1588970426.378444076]: Plugin vision_speed_estimate blacklisted
[ INFO] [1588970426.378736362]: Plugin waypoint loaded
[ INFO] [1588970426.388053555]: Plugin waypoint initialized
[ INFO] [1588970426.388147933]: Plugin wheel_odometry blacklisted
[ INFO] [1588970426.388423312]: Plugin wind_estimation loaded
[ INFO] [1588970426.389686803]: Plugin wind_estimation initialized
[ INFO] [1588970426.389777660]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1588970426.389831415]: Built-in MAVLink package version: 2020.4.4
[ INFO] [1588970426.389886813]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1588970426.389952929]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ WARN] [1588970426.419580538]: GP: No GPS fix
[ WARN] [1588970426.685667090]: TM: Wrong FCU time.
[ INFO] [1588970426.765956827]: IMU: Raw IMU message used.
[ WARN] [1588970426.766114777]: IMU: linear acceleration on RAW_IMU known on APM only.
[ WARN] [1588970426.766171088]: IMU: ~imu/data_raw stores unscaled raw acceleration report.
[ INFO] [1588970426.913598212]: CON: Got HEARTBEAT, connected. FCU: ArduPilot
[ WARN] [1588970428.918006339]: VER: broadcast request timeout, retries left 4
[ WARN] [1588970429.918462765]: VER: broadcast request timeout, retries left 3
[ WARN] [1588970435.918030699]: CMD: Command 520 -- wait ack timeout
[ WARN] [1588970435.918458330]: VER: unicast request timeout, retries left 2
[ INFO] [1588970436.914370820]: HP: requesting home position
[ WARN] [1588970440.922066511]: CMD: Command 520 -- wait ack timeout
[ WARN] [1588970440.922505101]: VER: unicast request timeout, retries left 1
[ WARN] [1588970440.922607456]: PR: request list timeout, retries left 2
[ WARN] [1588970441.917569532]: CMD: Command 410 -- wait ack timeout
[ WARN] [1588970441.923352330]: PR: request list timeout, retries left 1
[ WARN] [1588970442.918228538]: WP: timeout, retries left 2
[ WARN] [1588970442.923750847]: PR: request list timeout, retries left 0
[ WARN] [1588970443.919355952]: WP: timeout, retries left 1
[ WARN] [1588970444.920166477]: WP: timeout, retries left 0
[ERROR] [1588970445.921097081]: WP: timed out.
[ WARN] [1588970445.925732230]: CMD: Command 520 -- wait ack timeout
[ WARN] [1588970445.926011339]: VER: unicast request timeout, retries left 0
[ INFO] [1588970446.914020430]: HP: requesting home position
[ WARN] [1588970450.929472661]: CMD: Command 520 -- wait ack timeout
[ WARN] [1588970450.929883867]: VER: your FCU don't support AUTOPILOT_VERSION, switched to default capabilities
[ WARN] [1588970451.917615037]: CMD: Command 410 -- wait ack timeout
[ WARN] [1588970456.497631194]: GP: No GPS fix
[ INFO] [1588970456.914774612]: HP: requesting home position
[ WARN] [1588970461.918344857]: CMD: Command 410 -- wait ack timeout
[ INFO] [1588970466.914223197]: HP: requesting home position

third terminal

ubuntu@ubuntu-VPCCW21FX:~$ rosservice call /mavros/set_mode 0 AUTO
mode_sent: True
ubuntu@ubuntu-VPCCW21FX:~$ rosservice call /mavros/set_mode 0 MANUAL
mode_sent: True
ubuntu@ubuntu-VPCCW21FX:~$ rosservice call /mavros/set_mode 0 HOLD
mode_sent: True
ubuntu@ubuntu-VPCCW21FX:~$ rosservice call /mavros/set_mode 0 HOLD
mode_sent: True
ubuntu@ubuntu-VPCCW21FX:~$ ^C
ubuntu@ubuntu-VPCCW21FX:~$ rosservice call /mavros/set_mode 0 HOLD
mode_sent: True
ubuntu@ubuntu-VPCCW21FX:~$ rostopic echo /diagnostics 
header: 
  seq: 15
  stamp: 
    secs: 1588970440
    nsecs: 922589651
  frame_id: ''
status: 
  - 
    level: 0
    name: "mavros: FCU connection"
    message: "connected"
    hardware_id: "/dev/ttyUSB0:57600"
    values: 
      - 
        key: "Received packets:"
        value: "665"
      - 
        key: "Dropped packets:"
        value: "0"
      - 
        key: "Buffer overruns:"
        value: "0"
      - 
        key: "Parse errors:"
        value: "0"
      - 
        key: "Rx sequence number:"
        value: "149"
      - 
        key: "Tx sequence number:"
        value: "0"
      - 
        key: "Rx total bytes:"
        value: "19538"
      - 
        key: "Tx total bytes:"
        value: "3630"
      - 
        key: "Rx speed:"
        value: "1297.400024"
      - 
        key: "Tx speed:"
        value: "84.400002"
  - 
    level: 2
    name: "mavros: GPS"
    message: "No satellites"
    hardware_id: "/dev/ttyUSB0:57600"
    values: 
      - 
        key: "Satellites visible"
        value: "0"
      - 
        key: "Fix type"
        value: "1"
      - 
        key: "EPH (m)"
        value: "99.99"
      - 
        key: "EPV (m)"
        value: "Unknown"
  - 
    level: 0
    name: "mavros: Heartbeat"
    message: "Normal"
    hardware_id: "/dev/ttyUSB0:57600"
    values: 
      - 
        key: "Heartbeats since startup"
        value: "15"
      - 
        key: "Frequency (Hz)"
        value: "1.024949"
      - 
        key: "Vehicle type"
        value: "Ground rover"
      - 
        key: "Autopilot type"
        value: "ArduPilot"
      - 
        key: "Mode"
        value: "AUTO"
      - 
        key: "System status"
        value: "Active"
  - 
    level: 2
    name: "mavros: System"
    message: "Sensor health"
    hardware_id: "/dev/ttyUSB0:57600"
    values: 
      - 
        key: "Sensor present"
        value: "0x0020DC27"
      - 
        key: "Sensor enabled"
        value: "0x0020DC27"
      - 
        key: "Sensor health"
        value: "0x0020DC07"
      - 
        key: "3D gyro"
        value: "Ok"
      - 
        key: "3D accelerometer"
        value: "Ok"
      - 
        key: "3D magnetometer"
        value: "Ok"
      - 
        key: "GPS"
        value: "Fail"
      - 
        key: "3D angular rate control"
        value: "Ok"
      - 
        key: "attitude stabilization"
        value: "Ok"
      - 
        key: "yaw position"
        value: "Ok"
      - 
        key: "x/y position control"
        value: "Ok"
      - 
        key: "motor outputs / control"
        value: "Ok"
      - 
        key: "AHRS subsystem health"
        value: "Ok"
      - 
        key: "CPU Load (%)"
        value: "61.2"
      - 
        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: 1
    name: "mavros: Battery"
    message: "Low voltage"
    hardware_id: "/dev/ttyUSB0:57600"
    values: 
      - 
        key: "Voltage"
        value: "2.06"
      - 
        key: "Current"
        value: "4.7"
      - 
        key: "Remaining"
        value: "98.0"
  - 
    level: 2
    name: "mavros: Time Sync"
    message: "No events recorded."
    hardware_id: "/dev/ttyUSB0: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"
---


After failing with a 100% success rate :P , I closed all terminals and ran apm planner 2, sent AUTO mode and switched immediately.

image

There may be an issue with hardware, but definitely apm planner software manages that better, I realise retries may be transparent for the user idk.

I didn't know MAVlink, thanks for the suggestion! MAVlink works the same as mavros... it connects, gets all the data from the rover, but when trying to send any message or get information, there's no answer. apparently this doesn't handle any timeouts (i assume all comms are async, since it tries to send the message and the answer will come sometime)

ubuntu@ubuntu-VPCCW21FX:~/workspaces/hidrodata$ mavproxy.py 
Auto-detected serial ports are:
/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0
Connecting to /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0
Connect /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0 source_system=255
Log Directory: 
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0
 MAV> GPS lock at 51 meters
online system 1
ARMED
MANUAL> Mode MANUAL
Arming checks disabled
fence breach
waypoint 1

MANUAL> 
MANUAL> wp
MANUAL> usage: wp <editor|list|load|update|save|set|clear|loop|remove|move|movemulti|changealt>
wp list
MANUAL> log list
MANUAL> Requesting log list
auto
MANUAL> 

This seems a good question for mavlink team as well then :)

Any other thoughts? Everything works great with APM Planner... I assume it uses the same software stack beneath.. Can you suggest please some other tool to use, or command, config?

rsisto avatar May 08 '20 22:05 rsisto

Hi, just a quick follow up... I switched to a second antenna and same thing happening.

Looking up I found a mavproxy argument that helped: https://discuss.ardupilot.org/t/raspberry-pi-not-sending-information-to-pixhawk/12272/8

mavproxy.py --mav10

This command now enables me to switch mode without any issues. Yay!!

I continued the path back to mavros: From the second terminal I added fcu_protocol parameter roslaunch mavros apm.launch fcu_url:=/dev/ttyUSB0:57600 fcu_protocol:=v1.0 This doesn't seem to affect anything, I keep seeing timeouts when sending messages:

[ INFO] [1589982600.738849960]: CON: Got HEARTBEAT, connected. FCU: ArduPilot
[ WARN] [1589982602.744371347]: VER: broadcast request timeout, retries left 4
[ WARN] [1589982603.743987067]: VER: broadcast request timeout, retries left 3
[ WARN] [1589982609.743032611]: CMD: Command 520 -- wait ack timeout
[ WARN] [1589982609.743554877]: VER: unicast request timeout, retries left 2
[ INFO] [1589982610.740000936]: HP: requesting home position
^[[B[ WARN] [1589982614.748280592]: CMD: Command 520 -- wait ack timeout
[ WARN] [1589982614.748717988]: VER: unicast request timeout, retries left 1
[ WARN] [1589982614.748870369]: PR: request list timeout, retries left 2
[ WARN] [1589982615.744252275]: CMD: Command 410 -- wait ack timeout
[ WARN] [1589982615.749490225]: PR: request list timeout, retries left 1
[ WARN] [1589982616.745747384]: WP: timeout, retries left 2
[ WARN] [1589982616.750713158]: PR: request list timeout, retries left 0
[ WARN] [1589982617.746781562]: WP: timeout, retries left 1
[ WARN] [1589982618.748061441]: WP: timeout, retries left 0
[ERROR] [1589982619.749175099]: WP: timed out.
[ WARN] [1589982619.752748360]: CMD: Command 520 -- wait ack timeout
[ WARN] [1589982619.753107057]: VER: unicast request timeout, retries left 0
[ INFO] [1589982620.739136481]: HP: requesting home position
[ WARN] [1589982624.757393120]: CMD: Command 520 -- wait ack timeout
[ WARN] [1589982624.757861471]: VER: your FCU don't support AUTOPILOT_VERSION, switched to default capabilities
[ WARN] [1589982625.742833761]: CMD: Command 410 -- wait ack timeout

I may dig into mavproxy source, hopefully I'll find a difference on the serial call... Any help will be appreciated, thanks!

rsisto avatar May 20 '20 13:05 rsisto

@vooon do you have any insight for this? I need to move forward, my plan now is to start building a mavproxy.py wrapper, but that's what mavros does, right? It's definitely some tweaking in mavros that I'm missing.

Thanks!

rsisto avatar Jun 01 '20 15:06 rsisto

Since MAVLink 1.0 works, you may try to set ~fcu_protocol = v1.0. See: https://github.com/mavlink/mavros/blob/master/mavros/src/lib/mavros.cpp#L55

But i recommend to check firmware parameters and change to MAVLink 2.0.

Also to eliminate possible wiring problem, try to connect to FCU's USB and use /dev/ttyACM0.

vooon avatar Jun 03 '20 11:06 vooon

Hi, thanks as always for your answer!

I checked and there's no wiring problems, since mavproxy works great. I even ran a mavproxy as daemon as suggested in https://ardupilot.org/dev/docs/making-a-mavlink-wifi-bridge-using-the-raspberry-pi.html Connecting a second mavproxy via udp works great as well, like this: MAVPROXY -UDP-> MAVPROXY -TTYUSB0-> ROVER.

But when trying mavros (even in this scenario, swapping the first mavproxy to mavros) I step with timeout issues and no message being sent.

[ INFO] [1593268904.634011131]: udp0: Remote address: 127.0.0.1:14550 [ INFO] [1593268904.826430207]: IMU: Raw IMU message used. [ WARN] [1593268904.826560056]: IMU: linear acceleration on RAW_IMU known on APM only. [ WARN] [1593268904.826610975]: IMU: ~imu/data_raw stores unscaled raw acceleration report. [ INFO] [1593268905.552538558]: CON: Got HEARTBEAT, connected. FCU: ArduPilot [ WARN] [1593268907.557015277]: VER: broadcast request timeout, retries left 4 [ WARN] [1593268908.557748588]: VER: broadcast request timeout, retries left 3 [ WARN] [1593268914.557073756]: CMD: Command 520 -- wait ack timeout [ WARN] [1593268914.557387545]: VER: unicast request timeout, retries left 2 [ INFO] [1593268915.553417151]: HP: requesting home position [ WARN] [1593268919.560201295]: CMD: Command 520 -- wait ack timeout [ WARN] [1593268919.560751968]: PR: request list timeout, retries left 2 [ WARN] [1593268919.560987780]: VER: unicast request timeout, retries left 1 [ WARN] [1593268920.556941833]: CMD: Command 410 -- wait ack timeout [ WARN] [1593268920.561007286]: PR: request list timeout, retries left 1 [ WARN] [1593268921.558353678]: WP: timeout, retries left 2 [ WARN] [1593268921.561846591]: PR: request list timeout, retries left 0 [ WARN] [1593268922.559670102]: WP: timeout, retries left 1 [ WARN] [1593268923.560162676]: WP: timeout, retries left 0 [ERROR] [1593268924.561451728]: WP: timed out. [ WARN] [1593268924.564051079]: CMD: Command 520 -- wait ack timeout [ WARN] [1593268924.564434707]: VER: unicast request timeout, retries left 0 [ INFO] [1593268925.553258953]: HP: requesting home position [ WARN] [1593268929.568573596]: CMD: Command 520 -- wait ack timeout [ WARN] [1593268929.569000617]: VER: your FCU don't support AUTOPILOT_VERSION, switched to default capabilities [ WARN] [1593268930.557696087]: CMD: Command 410 -- wait ack timeout [ INFO] [1593268935.553244725]: HP: requesting home position [ WARN] [1593268940.558100571]: CMD: Command 410 -- wait ack timeout [ INFO] [1593268945.553709390]: HP: requesting home position [ WARN] [1593268950.557819343]: CMD: Command 410 -- wait ack timeout [ INFO] [1593268955.553543099]: HP: requesting home position

I'll try to switch to a previous version of mavros, to identify if that's a possible issue.

Thanks again for your thoughts

rsisto avatar Jun 27 '20 14:06 rsisto

Hi @vooon , sorry for the late reply but I finally found time to test this thoroughly. Starting, I tried changing mavros source as you suggested and the problem persists.

After further tests, I used source install with these versions and everything works again. mavros: release 0.32.0 mavlink: release 2020.2.2-1

After this worked ok, I tried using mavros 0.33.0, which started failing with the original error. I see there were a lot of changes in how messages are parsed, so something regarding fcu protocol v1.0 was broken (since it's legacy and there weren't probably enough tests).

I'll move forward with the versions stated above and moving on I'll update the hardware with a newer one. I was hoping to leave this information in case some old school mavros user comes by :) Please do let me know your comments on this. Thanks!

rsisto avatar Jul 13 '20 02:07 rsisto

Maybe you can switch to mavlink v2? As i remember it is even possible with APM 2.6. So anything with STM32 should be fine.

vooon avatar Jul 13 '20 10:07 vooon

I am having the same problem with apm 2.8 and mavros. Any solution would be appreciated?

debanik123 avatar Aug 25 '20 11:08 debanik123

Which mavros version is compatible with apm 2.8 ?

debanik123 avatar Aug 25 '20 11:08 debanik123

Hi @debanik123 , glad to see some activity here :) Did you try downgrading mavros and mavlink versions? I made sure to add ways to determine the issue in this thread.

rsisto avatar Aug 26 '20 11:08 rsisto

Yes I did according to your version

debanik123 avatar Aug 26 '20 14:08 debanik123

Can you please tell me which mavros version is working with apm2.8

debanik123 avatar Aug 26 '20 14:08 debanik123

@rsisto thanks for your replay

debanik123 avatar Aug 26 '20 14:08 debanik123

Hello all, so what are the best versions of ROS, MAVROS and MAVLINK to connect ROS to APM 2.8 through Rpi3B?

NabilHaidar avatar Aug 13 '22 10:08 NabilHaidar

i also need help with this 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.

Nikhiljohnson21 avatar Aug 31 '23 10:08 Nikhiljohnson21