weixin_39869378
2020-12-27 18:09 阅读 38

Request failed. check MAVROS logs

Issue details

I have a pixhawk 2.1 and Tx2i with a carrier board and have connected them with the TX,RX, GND pins and I know that the pins are correct. When running the roslaunch mavros apm.launch fcu_url:=/dev/ttyACM0:57600 command, MAVROS starts. I am not sure if the /dev/ttyACMO:57600 is correct but it starts the MAVROS. After that when I try to run any MAVROS commands like rosrun mavros mavsafety arm, I get this error - request failed. check MAVROS logs. i tried running rostopic echo -n1 /diagnostics | tee /tmp/diag.yml, and the message says FCU connection not connected. I don't understand why the FCU conection is not connected. Is it because I don't have a GPS module, RC and receiver plugged to the pixhawk? or is it the pins issue because I am sure the pins(between Tx2i and pixhawk) are correct and the pixhawk is powered by a battery properly. Also, how do I connect to the mission planner on the localhost? Can it be done without USB?

I am not sure what is going wrong here. If I use any other roslaunch command like roslaunch mavros apm.launch fcu_url:=/dev/ttyACM0:14855, I get this error - [FATAL] [1606235473.482246655]: FCU: DeviceError:serial:set_option: Invalid argument.

So, how to get the FCU connection established? what is missing? How to run Mission planner on the localhost without USB? Is it required to run with MAVROS to check the flight route?

This is the log when MAVROS doesn't start i.e. roslaunch command doesn't run:


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://{TX2i name}-desktop:35237/

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:14855
 * /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: melodic
 * /rosversion: 1.14.10

NODES
  /
    mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

process[mavros-1]: started with pid [13137]
[ INFO] [1606235473.468836496]: FCU URL: /dev/ttyACM0:14855
[ INFO] [1606235473.474403148]: serial0: device: /dev/ttyACM0 @ 14855 bps
[FATAL] [1606235473.482246655]: FCU: DeviceError:serial:set_option: Invalid argument
================================================================================REQUIRED process [mavros-1] has died!
process has finished cleanly
log file: /home/{name}/.ros/log/13821174-2e6f-11eb-bfb2-711c43c1c01c/mavros-1*.log
Initiating shutdown!
================================================================================
[mavros-1] killing on exit

This is the log when MAVROS runs:


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://{TX2i name}-desktop:41749/

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: melodic
 * /rosversion: 1.14.10

NODES
  /
    mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

process[mavros-1]: started with pid [13216]
[ INFO] [1606235505.653019515]: FCU URL: /dev/ttyACM0:57600
[ INFO] [1606235505.657359950]: serial0: device: /dev/ttyACM0 @ 57600 bps
[ INFO] [1606235505.657920388]: GCS bridge disabled
[ INFO] [1606235505.682519884]: Plugin 3dr_radio loaded
[ INFO] [1606235505.685931471]: Plugin 3dr_radio initialized
[ INFO] [1606235505.686031917]: Plugin actuator_control blacklisted
[ INFO] [1606235505.695045644]: Plugin adsb loaded
[ INFO] [1606235505.701000033]: Plugin adsb initialized
[ INFO] [1606235505.701079136]: Plugin altitude blacklisted
[ INFO] [1606235505.701287580]: Plugin cam_imu_sync loaded
[ INFO] [1606235505.702550661]: Plugin cam_imu_sync initialized
[ INFO] [1606235505.702752738]: Plugin command loaded
[ INFO] [1606235505.713192391]: Plugin command initialized
[ INFO] [1606235505.713485122]: Plugin companion_process_status loaded
[ INFO] [1606235505.719167164]: Plugin companion_process_status initialized
[ INFO] [1606235505.719266650]: Plugin debug_value blacklisted
[ INFO] [1606235505.719528822]: Plugin distance_sensor loaded
[ INFO] [1606235505.733414749]: Plugin distance_sensor initialized
[ INFO] [1606235505.733670521]: Plugin esc_status loaded
[ INFO] [1606235505.735938256]: Plugin esc_status initialized
[ INFO] [1606235505.736187980]: Plugin fake_gps loaded
[ INFO] [1606235505.768220591]: Plugin fake_gps initialized
[ INFO] [1606235505.768323213]: Plugin ftp blacklisted
[ INFO] [1606235505.768596680]: Plugin global_position loaded
[ INFO] [1606235505.798011482]: Plugin global_position initialized
[ INFO] [1606235505.798316532]: Plugin gps_rtk loaded
[ INFO] [1606235505.803644597]: Plugin gps_rtk initialized
[ INFO] [1606235505.803875953]: Plugin gps_status loaded
[ INFO] [1606235505.809553643]: Plugin gps_status initialized
[ INFO] [1606235505.809651562]: Plugin hil blacklisted
[ INFO] [1606235505.809905701]: Plugin home_position loaded
[ INFO] [1606235505.818598794]: Plugin home_position initialized
[ INFO] [1606235505.818917828]: Plugin imu loaded
[ INFO] [1606235505.831184137]: Plugin imu initialized
[ INFO] [1606235505.831428388]: Plugin landing_target loaded
[ INFO] [1606235505.857511282]: Plugin landing_target initialized
[ INFO] [1606235505.857811116]: Plugin local_position loaded
[ INFO] [1606235505.869523643]: Plugin local_position initialized
[ INFO] [1606235505.869810422]: Plugin log_transfer loaded
[ INFO] [1606235505.877203985]: Plugin log_transfer initialized
[ INFO] [1606235505.877536011]: Plugin manual_control loaded
[ INFO] [1606235505.883996568]: Plugin manual_control initialized
[ INFO] [1606235505.884298930]: Plugin mocap_pose_estimate loaded
[ INFO] [1606235505.890581762]: Plugin mocap_pose_estimate initialized
[ INFO] [1606235505.891002875]: Plugin mount_control loaded
[ INFO] [1606235505.899669056]: Plugin mount_control initialized
[ INFO] [1606235505.899932603]: Plugin obstacle_distance loaded
[ INFO] [1606235505.907152410]: Plugin obstacle_distance initialized
[ INFO] [1606235505.907442164]: Plugin odom loaded
[ INFO] [1606235505.915140171]: Plugin odom initialized
[ INFO] [1606235505.915477797]: Plugin onboard_computer_status loaded
[ INFO] [1606235505.919897910]: Plugin onboard_computer_status initialized
[ INFO] [1606235505.920189072]: Plugin param loaded
[ INFO] [1606235505.925143032]: Plugin param initialized
[ INFO] [1606235505.925384820]: Plugin play_tune loaded
[ INFO] [1606235505.929401964]: Plugin play_tune initialized
[ INFO] [1606235505.929484330]: Plugin px4flow blacklisted
[ INFO] [1606235505.929689287]: Plugin rangefinder loaded
[ INFO] [1606235505.930928016]: Plugin rangefinder initialized
[ INFO] [1606235505.931163852]: Plugin rc_io loaded
[ INFO] [1606235505.938710885]: Plugin rc_io initialized
[ INFO] [1606235505.938864642]: Plugin safety_area blacklisted
[ INFO] [1606235505.939150557]: Plugin setpoint_accel loaded
[ INFO] [1606235505.945502636]: Plugin setpoint_accel initialized
[ INFO] [1606235505.945845702]: Plugin setpoint_attitude loaded
[ INFO] [1606235505.961047990]: Plugin setpoint_attitude initialized
[ INFO] [1606235505.961364880]: Plugin setpoint_position loaded
[ INFO] [1606235505.990082094]: Plugin setpoint_position initialized
[ INFO] [1606235505.990436072]: Plugin setpoint_raw loaded
[ INFO] [1606235506.009496659]: Plugin setpoint_raw initialized
[ INFO] [1606235506.009847981]: Plugin setpoint_trajectory loaded
[ INFO] [1606235506.018059258]: Plugin setpoint_trajectory initialized
[ INFO] [1606235506.018383348]: Plugin setpoint_velocity loaded
[ INFO] [1606235506.028668476]: Plugin setpoint_velocity initialized
[ INFO] [1606235506.029099348]: Plugin sys_status loaded
[ INFO] [1606235506.048843283]: Plugin sys_status initialized
[ INFO] [1606235506.049175693]: Plugin sys_time loaded
[ INFO] [1606235506.063080469]: TM: Timesync mode: MAVLINK
[ INFO] [1606235506.066713364]: Plugin sys_time initialized
[ INFO] [1606235506.067126380]: Plugin trajectory loaded
[ INFO] [1606235506.076652578]: Plugin trajectory initialized
[ INFO] [1606235506.077015387]: Plugin vfr_hud loaded
[ INFO] [1606235506.078425474]: Plugin vfr_hud initialized
[ INFO] [1606235506.078552448]: Plugin vibration blacklisted
[ INFO] [1606235506.078786780]: Plugin vision_pose_estimate loaded
[ INFO] [1606235506.093316184]: Plugin vision_pose_estimate initialized
[ INFO] [1606235506.093577203]: Plugin vision_speed_estimate blacklisted
[ INFO] [1606235506.093928717]: Plugin waypoint loaded
[ INFO] [1606235506.104229109]: Plugin waypoint initialized
[ INFO] [1606235506.104351283]: Plugin wheel_odometry blacklisted
[ INFO] [1606235506.104604334]: Plugin wind_estimation loaded
[ INFO] [1606235506.106046836]: Plugin wind_estimation initialized
[ INFO] [1606235506.106238993]: Built-in SIMD instructions: ARM NEON
[ INFO] [1606235506.106311984]: Built-in MAVLink package version: 2020.10.11
[ INFO] [1606235506.106382318]: Known MAVLink dialects: common ardupilotmega ASLUAV all autoquad icarous matrixpilot paparazzi standard uAvionix ualberta
[ INFO] [1606235506.106442317]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ WARN] [1606235820.139443883]: CMD: Command 400 -- wait ack timeout
[ERROR] [1606236232.513249006]: MODE: Unsupported FCU
[ERROR] [1606237385.247188221]: MODE: Unsupported FCU
^C[mavros-1] killing on exit

MAVROS version and platform

Mavros: Latest(command line download from Ardupilot docs) ROS: Melodic Ubuntu: 18.04

Autopilot type and version

ArduPilot

Version: 4.0.3

Diagnostics


header: 
  seq: 260
  stamp: 
    secs: 1606235874
    nsecs: 607295234
  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: "83436"
      - 
        key: "Tx total bytes:"
        value: "117945"
      - 
        key: "Rx speed:"
        value: "450.000000"
      - 
        key: "Tx speed:"
        value: "460.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"
---

该提问来源于开源项目:mavlink/mavros

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

7条回答 默认 最新

  • weixin_39792803 weixin_39792803 2020-12-27 18:09

    /dev/ttyACM0:57600 refers to USB connection, aka the Pixhawk will communicate to your TX2i via USB at a baud rate of 57600. However, based on your current setup you are trying to communicate to the Pixhawk via UART which requires /dev/ttyS0 or whatever your UART port is. Note that there are specific baud rates which are supported by the Pixhawk (so you can't just simply define them).

    点赞 评论 复制链接分享
  • weixin_39869378 weixin_39869378 2020-12-27 18:09

    Thanks for the quick response. So, if I connect the pixhawk to the localhost via USB and on the other end, pixhawk is connected to the TX2i, do I have to use /dev/ttyACM0:57600? Also, how is MAVROS starting if the fcu connection is not proper?

    点赞 评论 复制链接分享
  • weixin_39792803 weixin_39792803 2020-12-27 18:09

    Thanks for the quick response. So, if I connect the pixhawk to the localhost via USB and on the other end, pixhawk is connected to the TX2i, do I have to use /dev/ttyACM0:57600? Also, how is MAVROS starting if the fcu connection is not proper?

    For the first question, i do not understand why do you want to connect two computers to the Pixhawk and to answer if it will work, it depends on where you are running mavros and whether the usb port of your localhost (PC) is actually defined as ACM0. Additionally, data will not be shared between two computers. For the second question, if you notice your log you are not getting any heartbeat communication from Pixhawk. Yes mavros did run because essentially the launch command you used is a script but you can see it is not connected to the Pixhawk.

    点赞 评论 复制链接分享
  • weixin_39869378 weixin_39869378 2020-12-27 18:09

    Let me clear the air a bit. I am running MAVROS commands on the Tx2i. It is connected to a monitor. Whenever I use the localhost, I use an SSH connection to the Tx2i and run the commands on the Tx2i only. Regarding the USB port on the computer, I will figure out what the name of the port is. I wanted to ask how do I check the baud rate which in this case is 57600 as I am not sure whether that is correct? Also, just wanted to confirm that I don't need a connection between the localhost and the pixhawk right? as all the commands are going to be sent to the Tx2i and tx2i will in turn send them to pixhawk. One more question I had was if I need all the components like GPS, Rc, receiver connected to the pixhawk while making this connection to the Tx2i, or will it work if I have the pixhawk without these components just for testing? and will it recognize the MAVROS commands?

    Thanks.

    点赞 评论 复制链接分享
  • weixin_39792803 weixin_39792803 2020-12-27 18:09

    So basically in that setup you described above, what you should do is, run mavros with fcu_url as the serial port of the TX2i instead of usb port from localhost to pixhawk (assuming you are powering it via that although the serial port of the TX2i should give it power too). Yes, you do not need a connection between Pixhawk and localhost cause mavros is running on TX2i and commands are given by TX2i to Pixhawk (the localhost is merely just a client to your TX2i to show you what is going on wiht your TX2i). The baud rate is the baud rate that is set for Pixhawk, you can check it on Mission Planner (since you are using APM). To merely connect to Pixhawk via MAVROS, you do not need the peripherals. However, for flight you will need them. In SITL (cause APM does not support HITL), you do not need them to run your code.

    点赞 评论 复制链接分享
  • weixin_39869378 weixin_39869378 2020-12-27 18:09

    Thanks a lot. That helped me a lot. The fcu connection is done now and the tx2i is communicating with the pixhawk. I ran the commands on https://ardupilot.org/dev/docs/ros-connecting.html and the fcu is responding to those, however, I am not sure what are the next steps. I read this page(http://wiki.ros.org/mavros#Utility_commands) completely but it doesn't give a good description of how to use the mavlink commands. Now, my aim is to run them onto the tx2i(connected to the pixhawk of the actual drone) but could you guide me on the safety measures I should take before doing that and how do I run the commands and check if they are working properly? The link also doesn't mention HOW TO USE these commands. Also, how do I run these commands on the Arducopter (for sitl/gazebo)? because when I try to simulate it on gazebo, it opens the MAVProxy terminal which would mean I need to type the Mavproxy commands but I want to write these commands.

    点赞 评论 复制链接分享
  • weixin_39792803 weixin_39792803 2020-12-27 18:09

    I think it is best if you go through ROS tutorials (do this first) and also look at PX4 offboard mode example to see how to actually send take-off arming commands and etc from TX2i to Pixhawk.

    点赞 评论 复制链接分享