Using moveBy function without GPS
Opened this issue · 6 comments
Hi, I want to ask if I can use the function moveBy without enabling flying with GPS? because I'm restricted to indoor experiments and I want to move the drone in certain distances and angles, so it seems that moveBy function fits my needs very well.
Yes, you can move the drone to a relative position and rotate heading by a given angle
The frame is horizontal and relative to the current drone orientation:
X is front
Y is right
Z is down
The movement settings of the device are those set for the autonomous flight.
drone.moveBy( dX, dY, dZ, dPsi)
dX (float): Wanted displacement along the front axis [m]
dY (float): Wanted displacement along the right axis [m]
dZ (float): Wanted displacement along the down axis [m]
dPsi (float): Wanted rotation of heading [rad]
Result:
The drone will move of the given offsets.
Then, event MoveByEnd is triggered.
If you send a second command MoveBy, the drone will trigger a MoveByEnd with the offsets it managed to do before this command and the value of error set to interrupted.
Supported by:
Bebop
Bebop 2
Recommendation:
Calibrate the drone before the flight. It can make shorter movements.
Please review:
http://forum.developer.parrot.com/t/bebop-2-indoor-autonomous-flight/4463
@al3Co I see, I tried it out but my drone didn't move, probably because my drone current firmware is old (1.98.10), and in the developers forum they say that the moveBy function is supported from firmware 3x.
@CE93Geek You have to update the firmware to run this option. Otherwise the drone just will be hovering. If you want to create path planning without GPS, this is a good way and a good reason to update.
Hello, Today I have tried your z_moveBy.py script on a drone with firmware 3.33, I have updated the commands.py and bebop.py classes in my original Katreina library to include the functionalities of moveBy. However my drone at first didn't move, it only hovered, so then I wanted to check if the hover() function after moveBy() interrupted the moveBy() function so I removed the hover and put sleep(2) and passed the drone dX parameter(1) to move 1 meter forward, and that did worked and I started to play around with it. But see that the moveBy should be synchronized with the sleep function to make sure the command took enough time to execute. I understand now that the event MoveByEnd helps to now if the function moveBy finished or not, but I'm not sure is it already added to this respiratory and ready to use? could you please elaborate more about this event and if you could give me an example how to use it.
Thank you so much!
Hey,
I am working on it, I need to do physical tests and as you will know is not easy with the regulations.
As soon as I have results, I'll let you know.
Regards
Update:
Working on:
https://github.com/Parrot-Developers/arsdk-xml/blob/master/xml/ardrone3.xml#L964