Jan_Klager
(Jan Kläger)
January 26, 2022, 12:29am
1
Hey
I wanted to set the VISO_TYPE on my 4.1.2 Arducopter (FC: Kakute F7). But the problem is that i don’t see this parameter in the full parameter list. Does somebody know why?
Thanks for helping me.
The default KakuteF7 firmware does not include Visual Odometry, due to flash memory limitations - see Firmware Limitations on AutoPilot Hardware — Rover documentation .
You will need to use the custom firmware generator (https://custom.ardupilot.org/ ) and ensure that AHRS->Visual Odometry is selected.
2 Likes
Jan_Klager
(Jan Kläger)
January 26, 2022, 10:49am
3
Thank you! That worked. Now I have the problem, that the connected ZED Camera sends the position but the drone in the MissionPlanner Map doesnt move.
I’ve set the following parameters:
set AHRS_EKF_TYPE to 3 (means use EKF3)
set EK2_ENABLE to 0 (disable EKF2)
set EK3_ENABLE to 1 (enable EKF3)
set GPS_TYPE to 0 (disable the GPS)
set VISO_TYPE to 1 (enable visual odometry)
set EK3_SRC1_POSXY to 6
set EK3_SRC1_POSZ to 1
set EK3_SRC1_VELXY to 6
set EK3_SRC1_VELZ to 6
set EK3_SRC1_YAW to 6
EK3_SRC2 and EK3_SRC3 are configured the same way
Although I disalbed the GPS_TYPE it still displays “GPS: No GPS”. Had I forgot a parameter?
Jan_Klager
(Jan Kläger)
January 26, 2022, 11:40am
4
This are the messages I’m sending from my custom code which is connected to the zed camera. When I stop sending these the fc show the error “Bad Vision Position”.
ppoirier
(ppoirier)
January 26, 2022, 11:51am
5
Do you see the vehicle on map?
If not, can you try setting Home using mouse right button and set EKF Home on Mission Planner
Jan_Klager
(Jan Kläger)
January 26, 2022, 12:04pm
6
I set the EKF Home on Mission Planner but then the drone is not moving on the map even we are moving the drone with the camera. But the GLOBAL_VISION_POSITION_ESTIMATE values change.
ppoirier
(ppoirier)
January 26, 2022, 12:23pm
7
Looks like you have something wrong in your message definition or on camera to body to world transform.
Jan_Klager
(Jan Kläger)
January 26, 2022, 12:25pm
8
What do you mean with “on camera to body to world transform”? Or what would be the right message definition?
ppoirier
(ppoirier)
January 26, 2022, 12:28pm
9
I cannot talk for VISO_TYPE 1 but for type 2 (T265), @LuckyBird has made a detailed explanation on Frame coordinates:
[image]
Introduction
In this part of the ongoing labs , we will demonstrate how to make a MAVLink bridge between the Intel Realsense T265 and ArduPilot in Python, without the use of ROS . The choice of Python is strictly optional, and you can use any other wrappers supported by librealsense .
Although this blog (non ROS-based) shares the same structure as part 2 (ROS-based), the content of the two are vastly different:
Prerequisite
System overview
ArduPilot parameters
Python packages installatio…
1 Like
Jan_Klager
(Jan Kläger)
January 26, 2022, 12:32pm
10
Do you know if the VISION_POSITION_DELTA is required to send?
Jan_Klager
(Jan Kläger)
January 26, 2022, 12:47pm
11
I saw that in the example the camera is on the same vehicle. Could that be the problem, becouase in our system the camera is a different vehicle?
ppoirier
(ppoirier)
January 26, 2022, 12:53pm
12
It is for T265 , here is the WIP from @rmackay9
opened 01:54AM - 27 Mar 20 UTC
Enhancement
Copter
Rover
Here are a few things we could do to improve integration with the T265 discovere… d during my testing ([blog](https://discuss.ardupilot.org/t/easier-setup-for-intel-realsense-t265/53991))
- [ ] align t265 position and yaw if EKF source is GPS ([PR](https://github.com/ArduPilot/ardupilot/pull/18380))
- [ ] fix bug with initial yaw aligned to ahrs even if t265 is source of yaw
- [ ] fixup EKF glitch protection to catch impossible speed and/or position changes like those found in the log linked in this PR: https://github.com/ArduPilot/ardupilot/pull/15491. The glitch protection should use both position and velocity (if available) and then not fuse either if a glitch is detected. We should then remove the glitch protection from Thien's script
- [ ] determine ideal position, velocity and error values to send to the EKF and update what the scripts send and also the VISO_POS/VEL/YAW_M_NSE parameter defaults
- [ ] Re-align camera to autopilot frame if EKF yaw reset happens?
- [ ] vision-position-delta message handling of orientation is probably backwards ([code is here](https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_VisualOdom/AP_VisualOdom_Backend.cpp#L51))
- [ ] vision-position-delta message handling is not incorporating EKF update rate. We should add a line like, "timeStamp_ms -= localFilterTimeStep_ms/2;" similar to how it is done in NavEKF3_core::writeExtNavData.
- [ ] add a pre-arm check that vision-position-estimate's "reset_counter" field is non-zero (after thien's scripts are modified to always send a non-zero value). This check will ensure the system is using Mavlink2 which is a requirement for position resets to work
- [ ] add a pre-arm check that T265's confidence is "High"
- [ ] "GPS Glitch" / "GPS Glitch cleared" message appearing after ekf-origin is set (at least in SITL using EKF2)
- [ ] check if APSync's real-time-clock is working (may need this hardware: https://chicagodist.com/products/rasclock-rtc-for-raspberry-pi)
- [ ] add support for multiple T265 cameras ([brought up in this discussion](https://discuss.ardupilot.org/t/multi-tracking-camera-support/73611))
Complete:
- [x] SITL should be enhanced to be able to send vision-position-delta messages ([issue](https://github.com/ArduPilot/ardupilot/issues/14326))
- [x] allow filtering out vision-position-estimate, vision-speed-estimate messages so they are not passed to GCS (two solutions may be required depending if telemetry system is connected to the autopilot or to the companion computer) (PR https://github.com/ArduPilot/ardupilot/pull/14742)
- [x] release new APSync image for RPI4 that includes all latest script enhancements and update librealsense version to v2.35.1 (https://github.com/ArduPilot/companion/blob/master/Common/Ubuntu/librealsense/install_librealsense.sh#L16)
- [x] add NaN checks for vision-position-estimate, vision-speed-estimate and vision-position-delta ([PR](https://github.com/ArduPilot/ardupilot/pull/14605))
- [x] add VISO_POS_M_NSE and VISO_YAW_M_NSE parameters to apply minimums to noise params sent to EKF
- [x] Integrate camera's reported accuracy into the EKF
- [x] allow higher rate of external nav messages (14hz is current max, raise to 40hz or 50hz)
- [x] add support for VISION_SPEED_ESTIMATE and/or ODOMETRY ([PR1](https://github.com/ArduPilot/ardupilot/pull/14368), [PR2](https://github.com/ArduPilot/ardupilot/pull/14404))
- [x] add SITL support for sending VISION_SPEED_ESTIMATE (see PR2 above)
- [x] Add glitch protection for external nav position like we have for GPSs ([PR](https://github.com/ArduPilot/ardupilot/pull/14354))
- [x] Add VISO_LAG parameter and use in EKF2/EKF3 ([PR](https://github.com/ArduPilot/ardupilot/pull/14324))
- [x] Add SIM_VICON_YAWERR for yaw glitch testing ([PR](https://github.com/ArduPilot/ardupilot/pull/14357))
- [x] fix EKF2 yaw initialisation ([PR from chobitsfan](https://github.com/ArduPilot/ardupilot/pull/12039))
- [x] Improve incorrect yaw handling ([issue](https://github.com/ArduPilot/ardupilot/issues/14356), [PR](https://github.com/ArduPilot/ardupilot/pull/14361))
- [x] Fix EKF3 pre-arm check if external nav used as yaw source ([issue](https://github.com/ArduPilot/ardupilot/issues/14288))
- [x] Measure lag between camera and autopilot IMU and ensure EKF is using the correct lag. Appears to be 15ms based on log analysis.
- [x] Move handling of the mavlink message to AP_VisualOdom ([issue](https://github.com/ArduPilot/ardupilot/issues/8061))
- [x] Calibration to rotate the camera's frame (for attitude and position) into the AHRS/EFK's frame. This includes rotating the camera frame to match the AHRS/EKF compass.
- [x] Pre-arm check to ensure the camera's reported attitude is close to the AHRS attitude
- [x] Handle camera reported resets of attitude or position. We apparently have some fields in the mavlink messages now ([link](https://github.com/ArduPilot/mavlink/blob/master/message_definitions/v1.0/common.xml#L4050)). This EKF bug https://github.com/ArduPilot/ardupilot/issues/14046 prevents us from handling the camera's position resets.
-------------
[Here is the corresponding to-do list for Thien's T265 scripts](https://github.com/thien94/vision_to_mavros/issues/15)
Jan_Klager
(Jan Kläger)
January 26, 2022, 1:14pm
13
Unfortunatly not. We tried to change the vehicle id (1) and the comp id (0) but it didn’t solved the problem.