# RB5 drone goes to a different height than I input

Source: https://forum.modalai.com/topic/3280/rb5-drone-goes-to-a-different-height-than-i-input
Category: Development Drones (https://forum.modalai.com/category/44/development-drones)
Tags: rb5
Posted: 2024-04-01 20:52:37 UTC by Advait Pandit
Replies: 11 · Views: 2093

## Advait Pandit · 2024-04-01 20:52:37 UTC

When I give a takeoff command to RB5 drone using QGC and set a particular height (in meters), it does not go to the set height but always ends up going to what I am assuming is the default height. This causes major issues as I my lab is underground and the drone has hit the top of the the safety net and dropped a couple of times. Can you please advise me on this. 

Thank you!

Advait P

## Reply by Eric Katzfey (ModalAI staff) · 2024-04-02 15:11:08 UTC

@Advait-Pandit I'm guessing that this could be more of a PX4 issue than an RB5 issue so I would recommend also posting this on the PX4 forum to see if you can get some feedback there. Also, I would recommend trying your scenario using HITL testing first to make sure everything works as expected. If it works fine in HITL but not during an actual flight then perhaps there is an RB5 issue. https://docs.modalai.com/voxl2-PX4-hitl/

## Reply by Advait Pandit · 2024-04-02 17:10:41 UTC (in reply to Eric Katzfey)

@Eric-Katzfey 

Thank you Eric, I will also post this on the PX4 forum. Would you suggest putting the mavsdk script directly onto the drone to avoid errors/latency issues due to a udp/tcp connection? Is there a way to execute a script on the drone without connecting it with a usb cable. Thanks!

Kind regards,

Advait P

## Reply by Eric Katzfey (ModalAI staff) · 2024-04-03 15:03:52 UTC (in reply to Advait Pandit)

@Advait-Pandit You can certainly run mavsdk directly on the drone.

## Reply by Advait Pandit · 2024-04-03 17:46:00 UTC (in reply to Eric Katzfey)

@Eric-Katzfey 

Great, so how can I remotely trigger this script on the drone? I successfully pushed the script using 'adb push' onto the drone's file system but this obviously required a usb connection. Given that the drone needs to run a good distance away, I would need a way to 'adb shell' onto the drone without a usb cable, how could I do that?

Thanks,

Advait P

## Reply by tom (ModalAI staff) · 2024-04-03 19:04:10 UTC (in reply to Advait Pandit)

@Advait-Pandit If you have a network connection i.e. WiFi you can `ssh` onto the drone

## Reply by Eric Katzfey (ModalAI staff) · 2024-04-03 20:35:07 UTC (in reply to Advait Pandit)

@Advait-Pandit I would very strongly recommend testing all this with HITL first. Then try it on a real flight when it is working as expected.

## Reply by Advait Pandit · 2024-04-03 21:30:21 UTC (in reply to tom)

@tom 

Thank you, I was able to ssh onto the drone via wifi. There is an issue with packages when trying to work with python scripts. I can't download python packages using pip even after creating a virtual environment. I get the error: -bash: pip: command not found

Kind regards,

Advait P

## Reply by tom (ModalAI staff) · 2024-04-03 21:32:19 UTC (in reply to Advait Pandit)

@Advait-Pandit I think we only use `pip3`. I can't speak on venvs

## Reply by Eric Katzfey (ModalAI staff) · 2024-04-04 15:36:52 UTC (in reply to Advait Pandit)

@Advait-Pandit It's much easier to use mavsdk inside a docker container where you can configure the proper environment.

## Reply by Eric Katzfey (ModalAI staff) · 2024-04-04 15:37:53 UTC (in reply to Advait Pandit)

@Advait-Pandit Here is some documentation: https://docs.modalai.com/mavsdk/

## Reply by Advait Pandit · 2024-04-04 22:38:57 UTC (in reply to Eric Katzfey)

@Eric-Katzfey

Thank you for the advise, I will take a look!
