Unstable drone after takeoff crashes

Hey,
So I have a few problems with the copter in Gazebo simulations.

  1. Sometimes (once in 3 times maybe) I arm the drone and takeoff. After reaching the given height the drone continues moving upwards, starts oscillating violently and then crashes. I was not able to find any fix for this. Is this a bug?
  2. For the few times my copter is stable, it keeps oscillating +/- 2m on either side unless I give it some commands (like setpoint_velocity/cmd_vel). But the oscillations always exist.
  3. When using the setpoint_raw/attitude topic, I am able to acheive stable path for my drone in SITL. However in Gazebo the same values cause it to crash.

Is there any way of overcoming these issues?

Thanks

Hello,

Can you upload your logs file ? In which mode are you flying (GUIDED ?) ?
I guess you are using ROS, is it possible to see your “main code” for the navigation, if you are using one ?
Are you using Lidar or barometer for the navigation ?

I suggest you to add in your title name the word “Gazebo”, to be more specific about your topic :slight_smile:

Yes I am flying in guided mode, I dont use a lidar or barometer
Here are the logs

started roslaunch server http://rishab-HP-Notebook:46761/

SUMMARY
========

CLEAR PARAMETERS
 * /mavros/

PARAMETERS
 * /mavros/cmd/use_comp_id_system_control: False
 * /mavros/conn/heartbeat_mav_type: ONBOARD_CONTROLLER
 * /mavros/conn/heartbeat_rate: 1.0
 * /mavros/conn/system_time_rate: 1.0
 * /mavros/conn/timeout: 10.0
 * /mavros/conn/timesync_rate: 10.0
 * /mavros/distance_sensor/rangefinder_pub/field_of_view: 0.0
 * /mavros/distance_sensor/rangefinder_pub/frame_id: lidar
 * /mavros/distance_sensor/rangefinder_pub/id: 0
 * /mavros/distance_sensor/rangefinder_pub/send_tf: False
 * /mavros/distance_sensor/rangefinder_pub/sensor_position/x: 0.0
 * /mavros/distance_sensor/rangefinder_pub/sensor_position/y: 0.0
 * /mavros/distance_sensor/rangefinder_pub/sensor_position/z: -0.1
 * /mavros/distance_sensor/rangefinder_sub/id: 1
 * /mavros/distance_sensor/rangefinder_sub/orientation: PITCH_270
 * /mavros/distance_sensor/rangefinder_sub/subscriber: True
 * /mavros/fake_gps/eph: 2.0
 * /mavros/fake_gps/epv: 2.0
 * /mavros/fake_gps/fix_type: 3
 * /mavros/fake_gps/geo_origin/alt: 408.0
 * /mavros/fake_gps/geo_origin/lat: 47.3667
 * /mavros/fake_gps/geo_origin/lon: 8.55
 * /mavros/fake_gps/gps_rate: 5.0
 * /mavros/fake_gps/mocap_transform: True
 * /mavros/fake_gps/satellites_visible: 5
 * /mavros/fake_gps/tf/child_frame_id: fix
 * /mavros/fake_gps/tf/frame_id: map
 * /mavros/fake_gps/tf/listen: False
 * /mavros/fake_gps/tf/rate_limit: 10.0
 * /mavros/fake_gps/tf/send: False
 * /mavros/fake_gps/use_mocap: True
 * /mavros/fake_gps/use_vision: False
 * /mavros/fcu_protocol: v2.0
 * /mavros/fcu_url: udp://:14550@
 * /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: kinetic
 * /rosversion: 1.12.14

NODES
  /
    mavros (mavros/mavros_node)

ROS_MASTER_URI=http://localhost:11311

process[mavros-1]: started with pid [15003]
[ INFO] [1560858322.615260329, 37.155000000]: FCU URL: udp://:14550@
[ INFO] [1560858322.620990359, 37.157500000]: udp0: Bind address: 0.0.0.0:14550
[ INFO] [1560858322.621709292, 37.157500000]: GCS bridge disabled
[ INFO] [1560858322.721312723, 37.167500000]: Plugin 3dr_radio loaded
[ INFO] [1560858322.737518296, 37.167500000]: Plugin 3dr_radio initialized
[ INFO] [1560858322.737725115, 37.167500000]: Plugin actuator_control blacklisted
[ INFO] [1560858322.759731935, 37.170000000]: Plugin adsb loaded
[ INFO] [1560858322.782277847, 37.177500000]: Plugin adsb initialized
[ INFO] [1560858322.782468799, 37.177500000]: Plugin altitude blacklisted
[ INFO] [1560858322.782944608, 37.177500000]: Plugin cam_imu_sync loaded
[ INFO] [1560858322.786836377, 37.177500000]: Plugin cam_imu_sync initialized
[ INFO] [1560858322.787098197, 37.177500000]: Plugin command loaded
[ INFO] [1560858322.834706758, 37.182500000]: Plugin command initialized
[ INFO] [1560858322.835549690, 37.182500000]: Plugin companion_process_status loaded
[ INFO] [1560858322.860675266, 37.187500000]: Plugin companion_process_status initialized
[ INFO] [1560858322.861607058, 37.187500000]: Plugin debug_value blacklisted
[ INFO] [1560858322.862833970, 37.187500000]: Plugin distance_sensor loaded
[ INFO] [1560858322.967236173, 37.212500000]: Plugin distance_sensor initialized
[ INFO] [1560858322.967644570, 37.212500000]: Plugin fake_gps loaded
[ INFO] [1560858323.088161672, 37.262500000]: Plugin fake_gps initialized
[ INFO] [1560858323.088263070, 37.262500000]: Plugin ftp blacklisted
[ INFO] [1560858323.088533587, 37.262500000]: Plugin global_position loaded
[ INFO] [1560858323.225276561, 37.310000000]: Plugin global_position initialized
[ INFO] [1560858323.225466422, 37.310000000]: Plugin gps_rtk loaded
[ INFO] [1560858323.232564831, 37.315000000]: Plugin gps_rtk initialized
[ INFO] [1560858323.232764933, 37.315000000]: Plugin hil blacklisted
[ INFO] [1560858323.233039755, 37.315000000]: Plugin home_position loaded
[ INFO] [1560858323.259942370, 37.325000000]: Plugin home_position initialized
[ INFO] [1560858323.260272819, 37.325000000]: Plugin imu loaded
[ INFO] [1560858323.322010439, 37.352500000]: Plugin imu initialized
[ INFO] [1560858323.323548409, 37.352500000]: Plugin local_position loaded
[ INFO] [1560858323.386496539, 37.367500000]: Plugin local_position initialized
[ INFO] [1560858323.386705993, 37.367500000]: Plugin log_transfer loaded
[ INFO] [1560858323.400838418, 37.372500000]: Plugin log_transfer initialized
[ INFO] [1560858323.401073594, 37.372500000]: Plugin manual_control loaded
[ INFO] [1560858323.437786216, 37.382500000]: Plugin manual_control initialized
[ INFO] [1560858323.438288096, 37.382500000]: Plugin mocap_pose_estimate loaded
[ INFO] [1560858323.464409137, 37.390000000]: Plugin mocap_pose_estimate initialized
[ INFO] [1560858323.464592051, 37.390000000]: Plugin obstacle_distance loaded
[ INFO] [1560858323.485361328, 37.402500000]: Plugin obstacle_distance initialized
[ INFO] [1560858323.485751524, 37.402500000]: Plugin odom loaded
[ INFO] [1560858323.531394900, 37.420000000]: Plugin odom initialized
[ INFO] [1560858323.532027961, 37.420000000]: Plugin param loaded
[ INFO] [1560858323.553312602, 37.422500000]: Plugin param initialized
[ INFO] [1560858323.553648775, 37.422500000]: Plugin px4flow blacklisted
[ INFO] [1560858323.554590761, 37.422500000]: Plugin rangefinder loaded
[ INFO] [1560858323.561907171, 37.425000000]: Plugin rangefinder initialized
[ INFO] [1560858323.562580843, 37.425000000]: Plugin rc_io loaded
[ INFO] [1560858323.596289430, 37.435000000]: Plugin rc_io initialized
[ INFO] [1560858323.596357155, 37.435000000]: Plugin safety_area blacklisted
[ INFO] [1560858323.596612748, 37.435000000]: Plugin setpoint_accel loaded
[ INFO] [1560858323.627426922, 37.445000000]: Plugin setpoint_accel initialized
[ INFO] [1560858323.628001175, 37.445000000]: Plugin setpoint_attitude loaded
[ INFO] [1560858323.681294754, 37.467500000]: Plugin setpoint_attitude initialized
[ INFO] [1560858323.681540088, 37.467500000]: Plugin setpoint_position loaded
[ INFO] [1560858323.796585598, 37.500000000]: Plugin setpoint_position initialized
[ INFO] [1560858323.796948000, 37.500000000]: Plugin setpoint_raw loaded
[ INFO] [1560858323.844652441, 37.515000000]: Plugin setpoint_raw initialized
[ INFO] [1560858323.844925038, 37.515000000]: Plugin setpoint_velocity loaded
[ INFO] [1560858323.903027404, 37.527500000]: Plugin setpoint_velocity initialized
[ INFO] [1560858323.903354085, 37.527500000]: Plugin sys_status loaded
[ INFO] [1560858323.988981918, 37.570000000]: Plugin sys_status initialized
[ INFO] [1560858323.989896366, 37.570000000]: Plugin sys_time loaded
[ INFO] [1560858324.055552962, 37.590000000]: TM: Timesync mode: MAVLINK
[ INFO] [1560858324.059656103, 37.592500000]: Plugin sys_time initialized
[ INFO] [1560858324.059871451, 37.592500000]: Plugin trajectory loaded
[ INFO] [1560858324.095773407, 37.607500000]: Plugin trajectory initialized
[ INFO] [1560858324.096533112, 37.607500000]: Plugin vfr_hud loaded
[ INFO] [1560858324.101520349, 37.607500000]: Plugin vfr_hud initialized
[ INFO] [1560858324.101702994, 37.607500000]: Plugin vibration blacklisted
[ INFO] [1560858324.101947991, 37.607500000]: Plugin vision_pose_estimate loaded
[ INFO] [1560858324.203096013, 37.650000000]: Plugin vision_pose_estimate initialized
[ INFO] [1560858324.203181612, 37.650000000]: Plugin vision_speed_estimate blacklisted
[ INFO] [1560858324.203409443, 37.650000000]: Plugin waypoint loaded
[ INFO] [1560858324.230554229, 37.657500000]: Plugin waypoint initialized
[ INFO] [1560858324.230866030, 37.657500000]: Plugin wheel_odometry blacklisted
[ INFO] [1560858324.231136960, 37.657500000]: Plugin wind_estimation loaded
[ INFO] [1560858324.234138608, 37.657500000]: Plugin wind_estimation initialized
[ INFO] [1560858324.234655478, 37.657500000]: Built-in SIMD instructions: SSE, SSE2
[ INFO] [1560858324.234702498, 37.657500000]: Built-in MAVLink package version: 2019.4.4
[ INFO] [1560858324.234736025, 37.657500000]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1560858324.234778475, 37.657500000]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1560858333.839181971, 41.025000000]: udp0: Remote address: 127.0.0.1:55397
[ INFO] [1560858333.840660490, 41.027500000]: CON: Got HEARTBEAT, connected. FCU: ArduPilot
[ INFO] [1560858334.883587011, 41.362500000]: FCU: ArduCopter V3.7.0-dev (f21e4d83)
[ INFO] [1560858334.883763608, 41.362500000]: FCU: 21be32fa82fa4f5796098745c848d41a
[ INFO] [1560858334.883840097, 41.362500000]: FCU: Frame: QUAD
[ INFO] [1560858335.212200396, 41.480000000]: FCU: Barometer 1 calibration complete
[ WARN] [1560858335.615457038, 41.607500000]: PR: Param INS_ACC_ID (65535/1149): <value><i4>2753028</i4></value> different index: 218/1149
[ WARN] [1560858335.616510559, 41.610000000]: PR: Param INS_ACC2_ID (65535/1149): <value><i4>2753036</i4></value> different index: 219/1149
[ WARN] [1560858336.034200329, 41.727500000]: PR: Param GND_ABS_PRESS (65535/1149): <value><double>94503.9375</double></value> different index: 563/1149
[ WARN] [1560858336.790432128, 42.010000000]: TM : RTT too high for timesync: 117.50 ms.
[ INFO] [1560858336.923883128, 42.035000000]: VER: 1.1: Capabilities         0x0000000000003bcf
[ INFO] [1560858336.923975751, 42.035000000]: VER: 1.1: Flight software:     03070000 ( f21e4d8)
[ INFO] [1560858336.924032200, 42.035000000]: VER: 1.1: Middleware software: 00000000 (        )
[ INFO] [1560858336.924101641, 42.035000000]: VER: 1.1: OS software:         00000000 (        )
[ INFO] [1560858336.924155692, 42.035000000]: VER: 1.1: Board hardware:      00000000
[ INFO] [1560858336.924208571, 42.035000000]: VER: 1.1: VID/PID:             0000:0000
[ INFO] [1560858336.924259242, 42.035000000]: VER: 1.1: UID:                 0000000000000000
[ WARN] [1560858336.926753308, 42.037500000]: CMD: Unexpected command 520, result 0
[ INFO] [1560858337.718896245, 42.292500000]: RC_CHANNELS message detected!
[ INFO] [1560858337.720031909, 42.292500000]: IMU: Raw IMU message used.
[ WARN] [1560858337.726053044, 42.295000000]: GP: No GPS fix
[ INFO] [1560858337.926559181, 42.342500000]: FCU: GPS 1: detected as u-blox at 115200 baud
[ INFO] [1560858343.501512392, 44.197500000]: FCU: EKF2 IMU0 initial yaw alignment complete
[ INFO] [1560858343.507169594, 44.197500000]: FCU: EKF2 IMU1 initial yaw alignment complete
[ INFO] [1560858349.324784659, 46.132500000]: FCU: EKF2 IMU1 tilt alignment complete
[ INFO] [1560858351.751710575, 46.922500000]: FCU: EKF2 IMU0 tilt alignment complete
[ INFO] [1560858363.195307778, 51.027500000]: HP: requesting home position
[ INFO] [1560858363.310211637, 51.027500000]: FCU: ArduCopter V3.7.0-dev (f21e4d83)
[ INFO] [1560858363.314034487, 51.027500000]: FCU: 21be32fa82fa4f5796098745c848d41a
[ INFO] [1560858363.316851601, 51.027500000]: FCU: Frame: QUAD
[ INFO] [1560858365.694571793, 51.827500000]: PR: parameters list received
[ WARN] [1560858366.051296481, 51.927500000]: TM : RTT too high for timesync: 335.00 ms.
[ INFO] [1560858369.889080699, 53.375000000]: FCU: EKF2 IMU0 Origin set to GPS
[ INFO] [1560858369.893041676, 53.375000000]: FCU: EKF2 IMU1 Origin set to GPS
[ INFO] [1560858376.576548700, 56.027500000]: WP: mission received

I have attached the diagnostics as well

header: 
  seq: 149
  stamp: 
    secs: 189
    nsecs: 157500000
  frame_id: ''
status: 
  - 
    level: 0
    name: "mavros: FCU connection"
    message: "connected"
    hardware_id: "udp://:14550@"
    values: 
      - 
        key: "Received packets:"
        value: "19021"
      - 
        key: "Dropped packets:"
        value: "0"
      - 
        key: "Buffer overruns:"
        value: "0"
      - 
        key: "Parse errors:"
        value: "0"
      - 
        key: "Rx sequence number:"
        value: "76"
      - 
        key: "Tx sequence number:"
        value: "5"
      - 
        key: "Rx total bytes:"
        value: "627450"
      - 
        key: "Tx total bytes:"
        value: "43004"
      - 
        key: "Rx speed:"
        value: "1865.500000"
      - 
        key: "Tx speed:"
        value: "143.500000"
  - 
    level: 0
    name: "mavros: GPS"
    message: "3D fix"
    hardware_id: "udp://:14550@"
    values: 
      - 
        key: "Satellites visible"
        value: "10"
      - 
        key: "Fix type"
        value: "6"
      - 
        key: "EPH (m)"
        value: "1.21"
      - 
        key: "EPV (m)"
        value: "2.00"
  - 
    level: 0
    name: "mavros: Heartbeat"
    message: "Normal"
    hardware_id: "udp://:14550@"
    values: 
      - 
        key: "Heartbeats since startup"
        value: "152"
      - 
        key: "Frequency (Hz)"
        value: "1.047619"
      - 
        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: "udp://:14550@"
    values: 
      - 
        key: "Sensor present"
        value: "0x0361FCAF"
      - 
        key: "Sensor enabled"
        value: "0x02619CAF"
      - 
        key: "Sensor helth"
        value: "0x03719CAF"
      - 
        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: "computer vision position"
        value: "Ok"
      - 
        key: "3D angular rate control"
        value: "Ok"
      - 
        key: "attitude stabilization"
        value: "Ok"
      - 
        key: "yaw position"
        value: "Ok"
      - 
        key: "motor outputs / control"
        value: "Ok"
      - 
        key: "rc receiver"
        value: "Ok"
      - 
        key: "AHRS subsystem health"
        value: "Ok"
      - 
        key: "Terrain subsystem health"
        value: "Ok"
      - 
        key: "Battery"
        value: "Ok"
      - 
        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: 0
    name: "mavros: Battery"
    message: "Normal"
    hardware_id: "udp://:14550@"
    values: 
      - 
        key: "Voltage"
        value: "12.59"
      - 
        key: "Current"
        value: "0.0"
      - 
        key: "Remaining"
        value: "100.0"
  - 
    level: 0
    name: "mavros: Time Sync"
    message: "Normal"
    hardware_id: "udp://:14550@"
    values: 
      - 
        key: "Timesyncs since startup"
        value: "1481"
      - 
        key: "Frequency (Hz)"
        value: "10.000000"
      - 
        key: "Last RTT (ms)"
        value: "20.000000"
      - 
        key: "Mean RTT (ms)"
        value: "13.720459"
      - 
        key: "Last remote time (s)"
        value: "189.056998000"
      - 
        key: "Estimated time offset (s)"
        value: "0.051284979"
---

Thanks

There does seem to be a barometer, could this cause the error?

No, this is not an error. To my knowledge, there is by default a barometer. And it is a good thing to see this message.

And do you have the logs from the SITL ? It is a .log from the drone itself.
To get it, I use a GCS, which is interfacing directly with the simulated drone, and I download the log from it. Let me know if you don’t understand, I can show you how to do it.

Do you mean this?

SIM_VEHICLE: Start
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: Starting up at -35.363261,149.165230,584,353 (CMAC)
SIM_VEHICLE: WAF build
SIM_VEHICLE: Configure waf
SIM_VEHICLE: "/home/rishab/ardupilot/modules/waf/waf-light" "configure" "--board" "sitl"
Setting top to                           : /home/rishab/ardupilot 
Setting out to                           : /home/rishab/ardupilot/build 
Autoconfiguration                        : enabled 
GCOV code coverage analysis              : no 
Setting board to                         : sitl 
Using toolchain                          : native 
Checking for 'g++' (C++ compiler)        : /usr/bin/g++ 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for c flags '-MMD'              : yes 
Checking for cxx flags '-MMD'            : yes 
Checking for need to link with librt     : not necessary 
Checking for HAVE_CMATH_ISFINITE         : yes 
Checking for HAVE_CMATH_ISINF            : yes 
Checking for HAVE_CMATH_ISNAN            : yes 
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes 
Checking for NEED_CMATH_ISINF_STD_NAMESPACE    : yes 
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE    : yes 
Checking for header endian.h                   : yes 
Checking for header byteswap.h                 : yes 
Checking for HAVE_MEMRCHR                      : yes 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 2.7.12 
Checking for program 'python'                  : /usr/bin/python 
Checking for python version >= 2.7.0           : 2.7.12 
Source is git repository                       : yes 
Update submodules                              : yes 
Checking for program 'git'                     : /usr/bin/git 
Checking for program 'size'                    : /usr/bin/size 
Benchmarks                                     : disabled 
Unit tests                                     : enabled 
Scripting                                      : disabled 
Scripting runtime checks                       : enabled 
Checking for program 'rsync'                   : /usr/bin/rsync 
'configure' finished successfully (1.726s)
SIM_VEHICLE: Building
SIM_VEHICLE: "/home/rishab/ardupilot/modules/waf/waf-light" "build" "--target" "bin/arducopter"
Waf: Entering directory `/home/rishab/ardupilot/build/sitl'
Waf: Leaving directory `/home/rishab/ardupilot/build/sitl'

BUILD SUMMARY
Build directory: /home/rishab/ardupilot/build/sitl
Target          Text     Data  BSS    Total  
---------------------------------------------
bin/arducopter  1873165  2446  66016  1941627

Build commands will be stored in build/sitl/compile_commands.json
'build' finished successfully (5.399s)
SIM_VEHICLE: Using defaults from (/home/rishab/ardupilot/Tools/autotest/default_params/copter.parm,/home/rishab/ardupilot/Tools/autotest/default_params/gazebo-iris.parm)
SIM_VEHICLE: Run ArduCopter
SIM_VEHICLE: "/home/rishab/ardupilot/Tools/autotest/run_in_terminal_window.sh" "ArduCopter" "/home/rishab/ardupilot/build/sitl/bin/arducopter" "-S" "-I0" "--home" "-35.363261,149.165230,584,353" "--model" "gazebo-iris" "--speedup" "1" "--defaults" "/home/rishab/ardupilot/Tools/autotest/default_params/copter.parm,/home/rishab/ardupilot/Tools/autotest/default_params/gazebo-iris.parm"
SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: "mavproxy.py" "--master" "tcp:127.0.0.1:5760" "--sitl" "127.0.0.1:5501" "--out" "127.0.0.1:14550" "--out" "127.0.0.1:14551" "--mav10" "--console"
RiTW: Starting ArduCopter : /home/rishab/ardupilot/build/sitl/bin/arducopter -S -I0 --home -35.363261,149.165230,584,353 --model gazebo-iris --speedup 1 --defaults /home/rishab/ardupilot/Tools/autotest/default_params/copter.parm,/home/rishab/ardupilot/Tools/autotest/default_params/gazebo-iris.parm
Connect tcp:127.0.0.1:5760 source_system=255
Loaded module console
Log Directory: 
Telemetry log: mav.tlog
Waiting for heartbeat from tcp:127.0.0.1:5760
 MAV> STABILIZE> Received 1149 parameters
Saved 1149 parameters to mav.parm

Almost :slight_smile:
I recommand to download QGroundControl. When you execute it, it will recognize automatically your drone if your SITL and mavros are already running in the back.
Then, follow this : https://docs.qgroundcontrol.com/en/analyze_view/log_download.html
Download your last logs (*.logs) , and put it here.

Hey so Im not sure if this is what you want :smile:

We are getting close, do you have others ? I don’t recognize this kind of .log. Have you followed the tutorial that I have given ?

By the way, which model are you using in Gazebo ? Is it the Iris one ?
If all is working well with only the SITL, I suspect a problem in the definition of your model. Gazebo can easily misbehave if a parameter like the inertia is not well defined.

Is this what you were expecting?log_225_2019-6-18-20-46-27.bin (873.1 KB)

Im using iris in Gazebo 7.

1 Like

Yes perfect !
From a first quick read, the altitude seems ok. The GPS is working. Keep trying to see where it can comes from.
I will be on vacation, I come back on Thusday. If no one helped you since then, ask me again :wink:

Thanks, will work on it and come back on Thursday if it isnt resolved :slight_smile: