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

ekf2 + vision error #12463

Closed
lgh5054 opened this issue Jul 11, 2019 · 4 comments
Closed

ekf2 + vision error #12463

lgh5054 opened this issue Jul 11, 2019 · 4 comments

Comments

@lgh5054
Copy link

lgh5054 commented Jul 11, 2019

Describe the bug

When viewing the mavros/local_position/pose value, Even if you stay still, you lose your position.

Is this a slam problem or a connection speed problem with the pixhawk and tx2 board?

At first, it shows the correct position value, but after a while, x y is fixed at zero

There are many of these questions, but all of them have not been solved.

I installed the firmware version of px4fmu_v2 1.8.0

Pixhawk2 + jetson tx2

And ekf2_aid_mask 8 (only vision fusion)
sys_companion (921600)
ekf2_eva_Noise 0.20
ekf2_evp_Noise 0.20
ekf2_ev_delay 50.0ms
ekf2_hgt_mode baro
I watched the paramedics

To Reproduce
Steps to reproduce the behavior:

  1. Slam running
  2. roslaunch mavros px4.launch

Expected behavior
Why is the x y value initialized to zero?

Log Files and Screenshots
https://logs.px4.io/plot_app?log=18d1669c-2906-405f-ad07-a0a8757d27ae
Screenshot from 2019-07-11 17-06-11
Screenshot from 2019-07-11 17-06-21
Screenshot from 2019-07-11 17-06-44
Screenshot from 2019-07-11 17-06-55
Screenshot from 2019-07-11 17-07-05
Screenshot from 2019-07-11 17-07-13
Screenshot from 2019-07-11 17-07-18
image

image

Add screenshots to help explain your problem.

Drone (please complete the following information):
SUMMARY

CLEAR PARAMETERS

  • /mavros/

PARAMETERS

  • /mavros/cmd/use_comp_id_system_control: False
  • /mavros/conn/heartbeat_rate: 5.0
  • /mavros/conn/system_time_rate: 1.0
  • /mavros/conn/timeout: 5.0
  • /mavros/conn/timesync_rate: 10.0
  • /mavros/distance_sensor/hrlv_ez4_pub/field_of_view: 0.0
  • /mavros/distance_sensor/hrlv_ez4_pub/frame_id: hrlv_ez4_sonar
  • /mavros/distance_sensor/hrlv_ez4_pub/id: 0
  • /mavros/distance_sensor/hrlv_ez4_pub/orientation: PITCH_270
  • /mavros/distance_sensor/hrlv_ez4_pub/send_tf: False
  • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/x: 0.0
  • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/y: 0.0
  • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/z: -0.1
  • /mavros/distance_sensor/laser_1_sub/id: 3
  • /mavros/distance_sensor/laser_1_sub/orientation: PITCH_270
  • /mavros/distance_sensor/laser_1_sub/subscriber: False
  • /mavros/distance_sensor/lidarlite_pub/field_of_view: 0.0
  • /mavros/distance_sensor/lidarlite_pub/frame_id: lidarlite_laser
  • /mavros/distance_sensor/lidarlite_pub/id: 1
  • /mavros/distance_sensor/lidarlite_pub/orientation: PITCH_270
  • /mavros/distance_sensor/lidarlite_pub/send_tf: False
  • /mavros/distance_sensor/lidarlite_pub/sensor_position/x: 0.0
  • /mavros/distance_sensor/lidarlite_pub/sensor_position/y: 0.0
  • /mavros/distance_sensor/lidarlite_pub/sensor_position/z: -0.1
  • /mavros/distance_sensor/sonar_1_sub/id: 2
  • /mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270
  • /mavros/distance_sensor/sonar_1_sub/subscriber: False
  • /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: False
  • /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: False
  • /mavros/fake_gps/use_vision: ture
  • /mavros/fcu_protocol: v2.0
  • /mavros/fcu_url: /dev/ttyTHS1:921600
  • /mavros/gcs_url: udp://:14551@192....
  • /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: False
  • /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: False
  • /mavros/mocap/use_tf: False
  • /mavros/odometry/in/child_frame_id: base_link
  • /mavros/odometry/in/frame_id: odom
  • /mavros/odometry/in/frame_tf/body_frame_orientation: flu
  • /mavros/odometry/in/frame_tf/local_frame: local_origin_ned
  • /mavros/odometry/out/frame_tf/body_frame_orientation: frd
  • /mavros/odometry/out/frame_tf/local_frame: vision_ned
  • /mavros/plugin_blacklist: ['safety_area', '...
  • /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: ture
  • /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: ture
  • /mavros/vision_pose/tf/rate_limit: 5.0
  • /mavros/vision_speed/listen_twist: False
  • /mavros/vision_speed/twist_cov: False
  • /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 [8433]
[ INFO] [1562833794.130340252]: FCU URL: /dev/ttyTHS1:921600
[ INFO] [1562833794.133698132]: serial0: device: /dev/ttyTHS1 @ 921600 bps
[ INFO] [1562833794.144271449]: GCS URL: udp://:14551@192.168.0.50:14551
[ INFO] [1562833794.144635757]: udp1: Bind address: 0.0.0.0:14551
[ INFO] [1562833794.144775733]: udp1: Remote address: 192.168.0.50:14551
[ INFO] [1562833794.194044201]: Plugin 3dr_radio loaded
[ INFO] [1562833794.207844768]: Plugin 3dr_radio initialized
[ INFO] [1562833794.208029994]: Plugin actuator_control loaded
[ INFO] [1562833794.223757195]: Plugin actuator_control initialized
[ INFO] [1562833794.232957540]: Plugin adsb loaded
[ INFO] [1562833794.248657699]: Plugin adsb initialized
[ INFO] [1562833794.249055833]: Plugin altitude loaded
[ INFO] [1562833794.254389886]: Plugin altitude initialized
[ INFO] [1562833794.254649261]: Plugin cam_imu_sync loaded
[ INFO] [1562833794.257795674]: Plugin cam_imu_sync initialized
[ INFO] [1562833794.258149453]: Plugin command loaded
[ INFO] [1562833794.285167642]: Plugin command initialized
[ INFO] [1562833794.285640244]: Plugin companion_process_status loaded
[ INFO] [1562833794.321122194]: Plugin companion_process_status initialized
[ INFO] [1562833794.321406690]: Plugin debug_value loaded
[ INFO] [1562833794.353694641]: Plugin debug_value initialized
[ INFO] [1562833794.353782134]: Plugin distance_sensor blacklisted
[ INFO] [1562833794.354165803]: Plugin fake_gps loaded
[ERROR] [1562833794.429272875]: No pose source!
[ INFO] [1562833794.429360464]: Plugin fake_gps initialized
[ INFO] [1562833794.429626591]: Plugin ftp loaded
[ INFO] [1562833794.463726161]: Plugin ftp initialized
[ INFO] [1562833794.464293872]: Plugin global_position loaded
[ INFO] [1562833794.567884782]: Plugin global_position initialized
[ INFO] [1562833794.568140700]: Plugin gps_rtk loaded
[ INFO] [1562833794.578616412]: Plugin gps_rtk initialized
[ INFO] [1562833794.578911468]: Plugin hil loaded
[ INFO] [1562833794.653666426]: Plugin hil initialized
[ INFO] [1562833794.654273979]: Plugin home_position loaded
[ INFO] [1562833794.672360477]: Plugin home_position initialized
[ INFO] [1562833794.673046723]: Plugin imu loaded
[ INFO] [1562833794.711945181]: Plugin imu initialized
[ INFO] [1562833794.712511708]: Plugin landing_target loaded
[ INFO] [1562833794.798226180]: Plugin landing_target initialized
[ INFO] [1562833794.798711294]: Plugin local_position loaded
[ INFO] [1562833794.841765021]: Plugin local_position initialized
[ INFO] [1562833794.842046412]: Plugin log_transfer loaded
[ INFO] [1562833794.852325697]: Plugin log_transfer initialized
[ INFO] [1562833794.852625330]: Plugin manual_control loaded
[ INFO] [1562833794.861879150]: Plugin manual_control initialized
[ INFO] [1562833794.862160478]: Plugin mocap_pose_estimate loaded
[ERROR] [1562833794.870789496]: Use one motion capture source.
[ INFO] [1562833794.870888190]: Plugin mocap_pose_estimate initialized
[ INFO] [1562833794.871129899]: Plugin obstacle_distance loaded
[ INFO] [1562833794.887355975]: Plugin obstacle_distance initialized
[ INFO] [1562833794.887645207]: Plugin odom loaded
[ INFO] [1562833794.929173185]: Plugin odom initialized
[ INFO] [1562833794.929706943]: Plugin param loaded
[ INFO] [1562833794.941342974]: Plugin param initialized
[ INFO] [1562833794.941716659]: Plugin px4flow loaded
[ INFO] [1562833794.977737839]: Plugin px4flow initialized
[ INFO] [1562833794.977893719]: Plugin rangefinder blacklisted
[ INFO] [1562833794.978283533]: Plugin rc_io loaded
[ INFO] [1562833795.006652740]: Plugin rc_io initialized
[ INFO] [1562833795.006773035]: Plugin safety_area blacklisted
[ INFO] [1562833795.007158016]: Plugin setpoint_accel loaded
[ INFO] [1562833795.026714420]: Plugin setpoint_accel initialized
[ INFO] [1562833795.027054631]: Plugin setpoint_attitude loaded
[ INFO] [1562833795.086418442]: Plugin setpoint_attitude initialized
[ INFO] [1562833795.086894276]: Plugin setpoint_position loaded
[ INFO] [1562833795.160059230]: Plugin setpoint_position initialized
[ INFO] [1562833795.160500054]: Plugin setpoint_raw loaded
[ INFO] [1562833795.212144848]: Plugin setpoint_raw initialized
[ INFO] [1562833795.212468354]: Plugin setpoint_velocity loaded
[ INFO] [1562833795.241865427]: Plugin setpoint_velocity initialized
[ INFO] [1562833795.242209990]: Plugin sys_status loaded
[ INFO] [1562833795.292462644]: Plugin sys_status initialized
[ INFO] [1562833795.292763780]: Plugin sys_time loaded
[ INFO] [1562833795.317644573]: TM: Timesync mode: MAVLINK
[ INFO] [1562833795.327828750]: Plugin sys_time initialized
[ INFO] [1562833795.328111101]: Plugin trajectory loaded
[ INFO] [1562833795.362818259]: Plugin trajectory initialized
[ INFO] [1562833795.363169830]: Plugin vfr_hud loaded
[ INFO] [1562833795.365557514]: Plugin vfr_hud initialized
[ INFO] [1562833795.365651951]: Plugin vibration blacklisted
[ INFO] [1562833795.365878492]: Plugin vision_pose_estimate loaded
[ INFO] [1562833795.414633270]: Plugin vision_pose_estimate initialized
[ INFO] [1562833795.414931655]: Plugin vision_speed_estimate loaded
[ INFO] [1562833795.433612139]: Plugin vision_speed_estimate initialized
[ INFO] [1562833795.433929340]: Plugin waypoint loaded
[ INFO] [1562833795.454146197]: Plugin waypoint initialized
[ INFO] [1562833795.454255195]: Plugin wheel_odometry blacklisted
[ INFO] [1562833795.454560683]: Plugin wind_estimation loaded
[ INFO] [1562833795.457222782]: Plugin wind_estimation initialized
[ INFO] [1562833795.457461995]: Built-in SIMD instructions: ARM NEON
[ INFO] [1562833795.457549872]: Built-in MAVLink package version: 2019.6.7
[ INFO] [1562833795.457621524]: Known MAVLink dialects: common ardupilotmega ASLUAV autoquad icarous matrixpilot paparazzi slugs standard uAvionix ualberta
[ INFO] [1562833795.457691416]: MAVROS started. MY ID 1.240, TARGET ID 1.1
[ INFO] [1562833795.465020203]: IMU: High resolution IMU detected!
[ INFO] [1562833795.467106622]: IMU: Attitude quaternion IMU detected!
[ERROR] [1562833795.474918156]: ODOM: Ex: The tf tree is invalid because it contains a loop.
Frame local_origin_ned exists with parent local_origin.
Frame fcu_frd exists with parent fcu.
Frame fcu exists with parent fcu_frd.
Frame mynteye_left_frame exists with parent mynteye_link.
Frame mynteye_right_frame exists with parent mynteye_left_frame.
Frame mynteye_left_rect_frame exists with parent mynteye_left_frame.
Frame mynteye_right_rect_frame exists with parent mynteye_right_frame.
Frame mynteye_disparity_frame exists with parent mynteye_left_frame.
Frame mynteye_disparity_norm_frame exists with parent mynteye_disparity_frame.
Frame mynteye_depth_frame exists with parent mynteye_left_frame.
Frame mynteye_points_frame exists with parent mynteye_left_frame.
Frame camera_imu_frame exists with parent mynteye_left_frame.

[ INFO] [1562833796.302940664]: CON: Got HEARTBEAT, connected. FCU: PX4 Autopilot
[ INFO] [1562833796.311897061]: IMU: High resolution IMU detected!
[ INFO] [1562833796.312096976]: IMU: Attitude quaternion IMU detected!
[ INFO] [1562833797.313536221]: VER: 1.1: Capabilities 0x000000000000e4ef
[ INFO] [1562833797.313649859]: VER: 1.1: Flight software: 01090000 (27ef1899c7000000)
[ INFO] [1562833797.313712550]: VER: 1.1: Middleware software: 01090000 (27ef1899c7000000)
[ INFO] [1562833797.313769450]: VER: 1.1: OS software: 071d00ff (a6f5881ea8513838)
[ INFO] [1562833797.313824173]: VER: 1.1: Board hardware: 00000011
[ INFO] [1562833797.314225603]: VER: 1.1: VID/PID: 26ac:0011
[ INFO] [1562833797.314370027]: VER: 1.1: UID: 3136510c34313630
[ WARN] [1562833797.315030735]: CMD: Unexpected command 520, result 0
[ INFO] [1562833806.303699379]: HP: requesting home position
[ INFO] [1562833811.309390156]: WP: mission received
[ INFO] [1562833816.304163296]: HP: requesting home position
[ INFO] [1562833826.304121341]: HP: requesting home position
[ INFO] [1562833836.303608103]: HP: requesting home position
[ INFO] [1562833846.304631021]: HP: requesting home position
[ INFO] [1562833856.304095432]: HP: requesting home position
[ INFO] [1562833866.303747057]: HP: requesting home position
[ INFO] [1562833876.303636068]: HP: requesting home position
[ INFO] [1562833886.303534918]: HP: requesting home position
[ INFO] [1562833896.304248784]: HP: requesting home position

Additional context
Add any other context about the problem here.

@lgh5054
Copy link
Author

lgh5054 commented Jul 11, 2019

@julianoes
Copy link
Contributor

@mhkabir :)

@JenaEmz
Copy link

JenaEmz commented Aug 20, 2019

I just figure that out.The solve is using vision position directly,don't fuse it with ekf2. My drone fly much stable now. I don't think they fuse vision by a proper way. You just need to use vision position in your out control loop

@gyronikeleg
Copy link

@JenaEmz Hello Jena, I am having a very similar issue. I saw that you were able to resolve it, but I dont understand your resolution. Can you expand upon that a bit?

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

No branches or pull requests

4 participants