Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

FCU connection lost after running rosservice call /mavros/set_stream_rate 0 10 1 #1274

Open
kunaala opened this issue Jul 16, 2019 · 1 comment

Comments

@kunaala
Copy link

kunaala commented Jul 16, 2019

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


Issue details

Please describe the problem, or desired feature

1.I'm able to list topics from the FCU.
2.At this stage when I echo /diagnostics it says FCU Connected.
3.To subscribe to topics I need to change the stream rate using rosservice command to 10 Hz
rosservice call /mavros/set_stream_rate 0 10 1
4.After this the /diagnostics says the FCU is not connected and thus I cant subscribe to topics published by mavros

MAVROS version and platform

Mavros: ?0.18.4?
ROS: Melodic
Ubuntu: 18.04

Autopilot type and version

[ x ] ArduPilot
[ ] PX4

Version: 3.6.9

Node logs

copy output of mavros_node. Usually console where you run roslaunch
```.. logging to /home/nano/.ros/log/6e1f369e-a79c-11e9-bdab-00044be3ff44/roslaunch-curlnano-18518.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://curlnano:41067/

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/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.000349065850399
 * /mavros/imu/frame_id: base_link
 * /mavros/imu/linear_acceleration_stdev: 0.0003
 * /mavros/imu/magnetic_stdev: 0.0
 * /mavros/imu/orientation_stdev: 1.0
 * /mavros/local_position/frame_id: map
 * /mavros/local_position/tf/child_frame_id: base_link
 * /mavros/local_position/tf/frame_id: map
 * /mavros/local_position/tf/send: False
 * /mavros/local_position/tf/send_fcu: False
 * /mavros/mission/pull_after_gcs: True
 * /mavros/mocap/use_pose: True
 * /mavros/mocap/use_tf: False
 * /mavros/odometry/estimator_type: 3
 * /mavros/odometry/frame_tf/desired_frame: ned
 * /mavros/plugin_blacklist: ['actuator_contro...
 * /mavros/plugin_whitelist: []
 * /mavros/px4flow/frame_id: px4flow
 * /mavros/px4flow/ranger_fov: 0.118682389136
 * /mavros/px4flow/ranger_max_range: 5.0
 * /mavros/px4flow/ranger_min_range: 0.3
 * /mavros/safety_area/p1/x: 1.0
 * /mavros/safety_area/p1/y: 1.0
 * /mavros/safety_area/p1/z: 1.0
 * /mavros/safety_area/p2/x: -1.0
 * /mavros/safety_area/p2/y: -1.0
 * /mavros/safety_area/p2/z: -1.0
 * /mavros/setpoint_accel/send_force: False
 * /mavros/setpoint_attitude/reverse_thrust: False
 * /mavros/setpoint_attitude/tf/child_frame_id: target_attitude
 * /mavros/setpoint_attitude/tf/frame_id: map
 * /mavros/setpoint_attitude/tf/listen: False
 * /mavros/setpoint_attitude/tf/rate_limit: 50.0
 * /mavros/setpoint_attitude/use_quaternion: False
 * /mavros/setpoint_position/mav_frame: LOCAL_NED
 * /mavros/setpoint_position/tf/child_frame_id: target_position
 * /mavros/setpoint_position/tf/frame_id: map
 * /mavros/setpoint_position/tf/listen: False
 * /mavros/setpoint_position/tf/rate_limit: 50.0
 * /mavros/setpoint_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.3

NODES
  /
    mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

process[mavros-1]: started with pid [18555]
[ INFO] [1563262603.368687446]: FCU URL: /dev/ttyACM0:57600
[ INFO] [1563262603.376566205]: serial0: device: /dev/ttyACM0 @ 57600 bps
[ INFO] [1563262603.377798098]: GCS bridge disabled
[ INFO] [1563262603.418578111]: Plugin 3dr_radio loaded
[ INFO] [1563262603.423294429]: Plugin 3dr_radio initialized
[ INFO] [1563262603.423390420]: Plugin actuator_control blacklisted
[ INFO] [1563262603.433758746]: Plugin adsb loaded
[ INFO] [1563262603.441277500]: Plugin adsb initialized
[ INFO] [1563262603.441375106]: Plugin altitude blacklisted
[ INFO] [1563262603.441730944]: Plugin cam_imu_sync loaded
[ INFO] [1563262603.443633888]: Plugin cam_imu_sync initialized
[ INFO] [1563262603.444118947]: Plugin command loaded
[ INFO] [1563262603.459776725]: Plugin command initialized
[ INFO] [1563262603.460173657]: Plugin companion_process_status loaded
[ INFO] [1563262603.466250307]: Plugin companion_process_status initialized
[ INFO] [1563262603.466340725]: Plugin debug_value blacklisted
[ INFO] [1563262603.466698074]: Plugin distance_sensor loaded
[ INFO] [1563262603.485765276]: Plugin distance_sensor initialized
[ INFO] [1563262603.486217105]: Plugin fake_gps loaded
[ INFO] [1563262603.513823804]: Plugin fake_gps initialized
[ INFO] [1563262603.513930733]: Plugin ftp blacklisted
[ INFO] [1563262603.514327770]: Plugin global_position loaded
[ INFO] [1563262603.549239678]: Plugin global_position initialized
[ INFO] [1563262603.549933542]: Plugin gps_rtk loaded
[ INFO] [1563262603.555789460]: Plugin gps_rtk initialized
[ INFO] [1563262603.555913837]: Plugin hil blacklisted
[ INFO] [1563262603.556737234]: Plugin home_position loaded
[ INFO] [1563262603.567349678]: Plugin home_position initialized
[ INFO] [1563262603.567840414]: Plugin imu loaded
[ INFO] [1563262603.587780128]: Plugin imu initialized
[ INFO] [1563262603.588224510]: Plugin local_position loaded
[ INFO] [1563262603.603072900]: Plugin local_position initialized
[ INFO] [1563262603.603475510]: Plugin log_transfer loaded
[ INFO] [1563262603.611938757]: Plugin log_transfer initialized
[ INFO] [1563262603.612388555]: Plugin manual_control loaded
[ INFO] [1563262603.619481417]: Plugin manual_control initialized
[ INFO] [1563262603.619864808]: Plugin mocap_pose_estimate loaded
[ INFO] [1563262603.628208887]: Plugin mocap_pose_estimate initialized
[ INFO] [1563262603.628596653]: Plugin obstacle_distance loaded
[ INFO] [1563262603.633762873]: Plugin obstacle_distance initialized
[ INFO] [1563262603.634131837]: Plugin odom loaded
[ INFO] [1563262603.646062321]: Plugin odom initialized
[ INFO] [1563262603.646604099]: Plugin param loaded
[ INFO] [1563262603.655173181]: Plugin param initialized
[ INFO] [1563262603.655284016]: Plugin px4flow blacklisted
[ INFO] [1563262603.655623760]: Plugin rangefinder loaded
[ INFO] [1563262603.657537225]: Plugin rangefinder initialized
[ INFO] [1563262603.658037962]: Plugin rc_io loaded
[ INFO] [1563262603.666613762]: Plugin rc_io initialized
[ INFO] [1563262603.666740378]: Plugin safety_area blacklisted
[ INFO] [1563262603.667382836]: Plugin setpoint_accel loaded
[ INFO] [1563262603.674533563]: Plugin setpoint_accel initialized
[ INFO] [1563262603.675861395]: Plugin setpoint_attitude loaded
[ INFO] [1563262603.699471526]: Plugin setpoint_attitude initialized
[ INFO] [1563262603.699970336]: Plugin setpoint_position loaded
[ INFO] [1563262603.729038983]: Plugin setpoint_position initialized
[ INFO] [1563262603.729495291]: Plugin setpoint_raw loaded
[ INFO] [1563262603.750272986]: Plugin setpoint_raw initialized
[ INFO] [1563262603.750700492]: Plugin setpoint_velocity loaded
[ INFO] [1563262603.769008776]: Plugin setpoint_velocity initialized
[ INFO] [1563262603.769825507]: Plugin sys_status loaded
[ INFO] [1563262603.797172150]: Plugin sys_status initialized
[ INFO] [1563262603.797678460]: Plugin sys_time loaded
[ INFO] [1563262603.809701497]: TM: Timesync mode: MAVLINK
[ INFO] [1563262603.812951596]: Plugin sys_time initialized
[ INFO] [1563262603.813332539]: Plugin trajectory loaded
[ INFO] [1563262603.825230314]: Plugin trajectory initialized
[ INFO] [1563262603.825675008]: Plugin vfr_hud loaded
[ INFO] [1563262603.827878894]: Plugin vfr_hud initialized
[ INFO] [1563262603.827967802]: Plugin vibration blacklisted
[ INFO] [1563262603.828320463]: Plugin vision_pose_estimate loaded
[ INFO] [1563262603.845376021]: Plugin vision_pose_estimate initialized
[ INFO] [1563262603.845500814]: Plugin vision_speed_estimate blacklisted
[ INFO] [1563262603.845913841]: Plugin waypoint loaded
[ INFO] [1563262603.858538606]: Plugin waypoint initialized
[ INFO] [1563262603.858671941]: Plugin wheel_odometry blacklisted
[ INFO] [1563262603.859053509]: Plugin wind_estimation loaded
[ INFO] [1563262603.861145570]: Plugin wind_estimation initialized
[ INFO] [1563262603.861371303]: Built-in SIMD instructions: ARM NEON
[ INFO] [1563262603.861447137]: Built-in MAVLink package version: 2019.4.4
[ INFO] [1563262603.861526513]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1563262603.861593285]: MAVROS started. MY ID 1.240, TARGET ID 1.1



### Diagnostics

place here result of:
rostopic echo -n1 /diagnostics
``
header:
seq: 5467
stamp:
secs: 1563261616
nsecs: 741383132
frame_id: ''
status:

level: 1
name: "mavros: FCU connection"
message: "not connected"
hardware_id: "/dev/ttyACM0:57600"
values: 
  - 
    key: "Received packets:"
    value: "23637"
  - 
    key: "Dropped packets:"
    value: "0"
  - 
    key: "Buffer overruns:"
    value: "0"
  - 
    key: "Parse errors:"
    value: "0"
  - 
    key: "Rx sequence number:"
    value: "183"
  - 
    key: "Tx sequence number:"
    value: "13"
  - 
    key: "Rx total bytes:"
    value: "4047987"
  - 
    key: "Tx total bytes:"
    value: "2339451"
  - 
    key: "Rx speed:"
    value: "0.000000"
  - 
    key: "Tx speed:"
    value: "500.000000"
  • level: 0
    name: "mavros: GPS"
    message: "3D fix"
    hardware_id: "/dev/ttyACM0:57600"
    values:

    key: "Satellites visible"
    value: "8"
    
    • key: "Fix type"
      value: "3"
    • key: "EPH (m)"
      value: "1.11"
    • key: "EPV (m)"
      value: "1.61"
  • level: 2
    name: "mavros: Heartbeat"
    message: "No events recorded."
    hardware_id: "/dev/ttyACM0:57600"
    values:

    key: "Heartbeats since startup"
    value: "6802"
    
    • key: "Frequency (Hz)"
      value: "0.000000"
    • key: "Vehicle type"
      value: "Quadrotor"
    • key: "Autopilot type"
      value: "ArduPilot"
    • key: "Mode"
      value: "STABILIZE"
    • key: "System status"
      value: "Standby"
  • level: 0
    name: "mavros: System"
    message: "Normal"
    hardware_id: "/dev/ttyACM0:57600"
    values:

    key: "Sensor present"
    value: "0x0360FD2F"
    
    • key: "Sensor enabled"
      value: "0x00601D2F"
    • key: "Sensor helth"
      value: "0x0160FD2F"
    • key: "3D gyro"
      value: "Ok"
    • key: "3D accelerometer"
      value: "Ok"
    • key: "3D magnetometer"
      value: "Ok"
    • key: "absolute pressure"
      value: "Ok"
    • key: "GPS"
      value: "Ok"
    • key: "laser based position"
      value: "Ok"
    • key: "3D angular rate control"
      value: "Ok"
    • key: "attitude stabilization"
      value: "Ok"
    • key: "yaw position"
      value: "Ok"
    • key: "AHRS subsystem health"
      value: "Ok"
    • key: "Terrain subsystem health"
      value: "Ok"
    • key: "CPU Load (%)"
      value: "49.7"
    • key: "Drop rate (%)"
      value: "0.0"
    • key: "Errors comm"
      value: "0"
    • key: "Errors count mavconn library. #1"
      value: "0"
    • key: "Errors count Pub/sub for Mavlink.msg #2"
      value: "0"
    • key: "Errors count Plugin loading functionality. #3"
      value: "0"
    • key: "Errors count Diagnostic mesages. #4"
      value: "0"
  • level: 1
    name: "mavros: Battery"
    message: "Low voltage"
    hardware_id: "/dev/ttyACM0:57600"
    values:

    key: "Voltage"
    value: "0.00"
    
    • key: "Current"
      value: "-0.0"
    • key: "Remaining"
      value: "-1.0"
  • level: 2
    name: "mavros: Time Sync"
    message: "No events recorded."
    hardware_id: "/dev/ttyACM0:57600"
    values:

    key: "Timesyncs since startup"
    value: "68062"
    
    • key: "Frequency (Hz)"
      value: "0.000000"
    • key: "Last RTT (ms)"
      value: "10041.594736"
    • key: "Mean RTT (ms)"
      value: "8.660799"
    • key: "Last remote time (s)"
      value: "6877.624956000"
    • key: "Estimated time offset (s)"
      value: "1563254383.694509029"
      `

Check ID

rosrun mavros checkid

no value

@elgarbe
Copy link
Contributor

elgarbe commented Sep 5, 2019

you have not connection at all, after roslaunch mavros apm.launch you have to see several messages (like you posted here) but there are several messages after the last one you paste, those messages are show when hertbeat is present.
Check ttyACM0 (I have to use ttyS0 on raspberry pi 3b+) and the serial speed.
It is useful to check serial data with minicom.

[ INFO] [1567709950.104092505]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1567709951.088085632]: CON: Got HEARTBEAT, connected. FCU: ArduPilotMega / ArduCopter
[ INFO] [1567709952.107684468]: VER: 1.1: Capabilities         0x0000000000001bcf
[ INFO] [1567709952.107942750]: VER: 1.1: Flight software:     030507ff (b11c6af3b535f9741bcae90b)
[ INFO] [1567709952.108162802]: VER: 1.1: Middleware software: 00000000 (b535f9741bcae90b)
[ INFO] [1567709952.108348375]: VER: 1.1: OS software:         00000000 (1bcae90b)
[ INFO] [1567709952.108544729]: VER: 1.1: Board hardware:      00000000
[ INFO] [1567709952.108719261]: VER: 1.1: VID/PID:             0000:0000
[ INFO] [1567709952.108905927]: VER: 1.1: UID:                 0000000000000000
[ WARN] [1567709952.110164053]: CMD: Unexpected command 520, result 0
[ERROR] [1567709957.085779829]: FCU: PreArm: Check mag field
[ERROR] [1567709957.086813371]: FCU: PreArm: Need 3D Fix
[ERROR] [1567709957.087640194]: FCU: PreArm: Throttle below Failsafe
[ INFO] [1567709961.090199040]: HP: requesting home position
[ INFO] [1567709961.095706184]: FCU: APM:Copter V3.5.7 (b11c6af3)
[ INFO] [1567709961.097510620]: FCU: PX4: b535f974 NuttX: 1bcae90b
[ INFO] [1567709961.101307368]: FCU: Frame: HEXA
[ INFO] [1567709961.102324899]: FCU: PX4v2 00540035 3436510A 32393637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants