# connecting Voxl cam and pixhawk cube

Source: https://forum.modalai.com/topic/1121/connecting-voxl-cam-and-pixhawk-cube
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2022-07-14 08:40:20 UTC by howard
Replies: 6 · Views: 1526

## howard · 2022-07-14 08:40:20 UTC

hey,
 I want to use voxl cam with a external flight controller like pixhawk cube via TELEM2 , I have configured EKF2 parameters (EKF2_AID_MASK=280 and EKF2_HGT_MODE=3) for VIO and have verified MAV_1_CONFIG and other things, I do get Odometry values .But when I switch to HITL , Odometry disappears and also ekf2 status return invalid local position. Do you think it is a firmware issue? what could be wrong?
Is it a good idea to connect external px4?
Thanks

## Reply by Eric Katzfey (ModalAI staff) · 2022-07-14 16:32:55 UTC

@keil In HITL you would want odometry to be coming from the simulation. What simulator are you using?

## Reply by howard · 2022-07-14 16:47:46 UTC (in reply to Eric Katzfey)

@Eric-Katzfey I am using gazebo

## Reply by Eric Katzfey (ModalAI staff) · 2022-07-14 16:53:15 UTC (in reply to howard)

@keil Okay, gazebo can support odometry. But you will need to configure it properly to do so.

## Reply by howard · 2022-07-14 17:12:52 UTC (in reply to Eric Katzfey)

@Eric-Katzfey okay can you please provide any reference for that ? Would be really helpful, meanwhile I will also try to search
Thank you

## Reply by Zachary Lowell · 2022-07-14 17:33:47 UTC

@keil odomotry should be out the box via gazebo. A minor edit needs to be changed inside PX4-Autopilot. Please do the following:

1. Move into the `PX4-Autopilot/Tools/sitl_gazebo/models/iris_vision` directory and edit the following file: `iris_vision.sdf`
2. Within this file change the following line: `<uri>model://iris</uri>` TO `<uri>model://iris_hitl</uri>`
3. Once this edit has been made, run the following:
`make px4_sitl_default gazebo_iris_vision`

That will build a gazebo environment with a hitl iris that leverages vision to run VIO - AKA this will return odometry data.

## Reply by howard · 2022-07-14 17:51:01 UTC (in reply to Zachary Lowell)

@Zachary-Lowell thanks a lot, will surely try
