Fail to setup T265 for arducopter

I am trying to setup T265 with ROS.
I followed the documentation ROS and VIO tracking camera for non-GPS Navigation — Dev documentation
According to the document, I ran “rostopic hz /mavros/vision_pose/pose”, it reports 30~ Hz.
But I can’t find VISION_POSITION_ESTIMATE in MissionPlanner.

Mavros should be connected. I can actually connect MissionPlanner to my onboard computer via UDP.
T265 seems fine, as I can see odom displayed correctly in rviz.

What else should I check or do?
Any information appreciated.

Or is there any other way I can make sure is mavros connected?

When running the all-in-one ros launch file (mavros,t265,tf-to-mavros), I got the following err output (stdout filtered out):

[ WARN] [1660927508.823922649]: Device 943222110999 is connected using a 2.1 port. Reduced performance is expected.
[ WARN] [1660927509.576984490]: Param '/camera/tracking_module/frames_queue_size' has value 256 that is not in range [0, 32]. Removing this parameter from d
ynamic reconfigure options.
[ WARN] [1660927509.713888054]:
[ WARN] [1660927510.283742112]: IMU: linear acceleration on RAW_IMU known on APM only.
[ WARN] [1660927510.285558124]: IMU: ~imu/data_raw stores unscaled raw acceleration report.
[ WARN] [1660927510.286197060]: TM: Wrong FCU time.
[ WARN] [1660927510.288341253]: GP: No GPS fix
[ WARN] [1660927511.313374773]: CMD: Unexpected command 520, result 0
[ERROR] [1660927513.777722074]: FCU: PreArm: AHRS: EK3 sources require VisualOdom
[ERROR] [1660927513.778152902]: FCU: PreArm: Radio failsafe on
[ERROR] [1660927513.778365510]: FCU: PreArm: VisOdom: not healthy
[ WARN] [1660927540.418025403]: GP: No GPS fix
[ERROR] [1660927543.777385523]: FCU: PreArm: AHRS: EK3 sources require VisualOdom
[ERROR] [1660927543.778148070]: FCU: PreArm: Radio failsafe on
[ERROR] [1660927543.778549861]: FCU: PreArm: VisOdom: not healthy

I am using a KakuteH7MiniV2, using apm.launch to start mavros. Will that be a problem?


My flight controller is KakuteH7Mini and It is connected to the onboard computer via USB 2.
Mission planner is connected via UDP.

Are you using EKF2 or EKF3? If the latter, what do you have your EK3_SRCx_POSXY and POSZ set as? The tutorial is a little outdated and EKF3 is currently the best way of getting visual odometry working. You’re getting a bunch of MAVROS outputs so your connection between the companion computer and autopilot is set up correctly.

image
ExternalNav

There is no VISION_POSITION_ESTIMATE visible in MissionPlanner Mavlink Inspector. Will that be a problem?

I re-followed the documentation, but changed the settings on the fcu according to the non-ros version of documentation.
Also, I was using direct ttyACM0 in mavros. This time, I installed mavlink-router and use tcp in mavros. I got the following result:


VISION_POSITION_ESTIMATE is now exists. But I still got the same error above.

Update.
I got more vision realted topics, by using t265_to_mavlink.py, which connect to the fcu via mavlink-router.

python t265_to_mavlink.py --connect 127.0.0.1:11000

image

And if I use EKF2, there is no error messages. I take up the drone and move around, but I see no movements on MissionPlanner. (There are rotations, but I suspect these information are from gyro)

If I user EKF3 and followed the instructions below, I got PreArm: VisOdom: not healthy and PreArm: AHRS: EK3 sources require VisualOdom.

For ArduPilot-4.1 (and later):

If you wish to use the camera’s heading:

If you wish to use the autopilot’s compass for heading:

  • COMPASS_USE = 1 (the default)
  • EK3_SRC1_YAW = 1 (Compass)
  • RC7_OPTION = 80 (Viso Align) to allow the pilot to re-align the camera’s yaw with the AHRS/EKF yaw before flight with auxiliary switch 7. Re-aligning yaw before takeoff is a good idea or loss of position control (aka “toilet bowling”) may occur.


Strange. I see VISION_POSITION_ESTIMATE, but VISION POSITION is red.
If I do VISO_TYPE=2, then VISION POSITION is Enabled(Green), Present(Green), Bad(Red).

If you graph the x y and z signals, does it correspond to the correct movements ?

When I hold the drone and raise it up, Z goes subzero and decrease --.
Moving Forward makes X increase ++
Moving Right makes Y increase ++
That seems correct.

Yes, that corresponds to NED coordinates
So with 4.2 and Vision activated and EK3 set to external nav, it should work
Technically, you set the Home EKF position with a right click on Mission Planner Map to get the vehicle appearing and if you "malk’ the drone I should move accordingly on the map

Thanks a lot for your attention.
I set all those parameters again and reboot the controller. Then it works.
Maybe I just got some parameter wrong.

Anyway, awsome project and this really helped me out.

1 Like

Now I sometime got PreArm: GPS and AHRS differ by 1.3e+07m.
I am not actually using a GPS, and not even have a GPS receiver connected.
An reboot will clear this. Should I do something to fix this, or just reboot when this appear?

EDIT:
I noticed that this happen after I turn-on the drone , once I set EKF origin.
This problem is now preventing me from taking off in Loiter or Guided.

I suspect you have not disable GPS in AHRS and EK3 parameters

I searched for “GPS” in MissionPlanner, and didn’t find any protential not disabled GPS parameters.
Also, I rebooted my flight controller a couple of times after confirming the parameters. That didn’t help.
Did I miss something?

20220823_GPSProblem.param (19.0 KB)

I dont see anything wrong, just make sure all the initial setup is complete and maybe replace some of the ek3 source parameters just to check if it has impact
EK3_SRC1_POSXY,6
EK3_SRC1_POSZ,1 == baro
EK3_SRC1_VELXY,0 == none
EK3_SRC1_VELZ,0 == none
EK3_SRC1_YAW,1 == compass

I changed those parameters, except for EK3_SRC_YAW, because I currently don’t have a working compass. That warning is still there.
I noticed AHRS2 got lat=lng=0, while GLOBAL_POSITION_INT has the value I set using the set_home script. Is that the problem? If so, what parameter should I change to fix that?

There is a localisation being set within the python script , just make sure it is disable, and be certain you set EKF home using the right mouse

1 Like

I checked that. Reboot everything, zoom in and out in the map, make sure there is no copter icon on the map. Then I rightclicked on the map and set EKF origin. The copter icon then appear on the map.
Still zero lat&lng in AHRS2.
I see this similar issue, but it is fixed long times ago.

EDIT:
Now I set the origin at 0,0 as a workaround.(EDIT2: AHRS2 will be 0,0 forever, even after come movements.) But I got another problem: High GPS HDOP.
Now I suspect I actually can not completely disable GPS.
I am actually using ArduCopter 4.3 from latest folder on firmware.ardupilot.org. I have a KakuteH7MiniV2 and only latest firmware seem to have a build for it. Will that much recent version be a problem?

In MissionPlanner, GPS HDOP and GPS HDOP2 are both 0. I guess this alarm might be a bug?
I will send an issue on github about this.

Oh , I did not asked because you indicated copter 4.2 in the thread.
You can use latest official release for tests.
Sometimes it happens that a it is set incorrectly -after many many changes - in this case we wipe the memory by loading a plane firmware and reload the copter binary