-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Tello' object has no attribute 'EVENT_LOG_DATA' #72
Comments
I used EVENT_LOG instead of EVENT_LOG_DATA |
UPDATE: def log_data_handler(event, sender, data):
"""
Listener to log data from the drone.
"""
pos_x = -data.mvo.pos_x
pos_y = -data.mvo.pos_y
pos_z = -data.mvo.pos_z The data received is Bytes - hence cant access to its internals.. Any help there? Thanks, Gal |
Hello! I'm going to assume you use python 3? I also get a bytes string and I run python 3.6. Imma take a peep at the _internal folder and see what gives. |
Okay! So! Download the latest tellopy (develop-0.7.0 (default)) library from here, not pip. Then go back and use EVENT_LOG_DATA. The data is already parsed for you. TelloPy/tellopy/_internal/protocol.py Line 286 in a997d29
|
Hi, I am still confused on how to get the position information @gemSquared, can you explain further in what part we are getting the x,y,z positions? |
The EVENT_LOG_DATA event passes what seems to be a class. Here's what I did to get the data:
Here's where I get the data out, for example yaw (you might need this btw)
The format is: EVENT_LOG_DATA
|
What do you mean by "container"? |
I don't know what things are called when I code. I just learn meself, haha.
inside the function. |
Hi, thanks for the help. I ended up getting the data, but I move Tello and it seems like the data is not changing, is this normal? |
If x,y, and z are near zero, hold your tello up about 0.5 meters over a well lit surface. Those values come up when the Tello is flying. They also may not start at zero because the values drift without mvo correction, so set the "home position" when in the air. ALSO! When the tello loses sight of the ground (low light/flat texture) the mvo goes off and the values snap to zero again. Use the first byte of EVENT_LIGHT to get a low-light warning. If the byte equals 1, that means the mvo is about to/already cut off. Otherwise it'll be zero. P.S. you may want to get yaw from the imu quaternions ;) |
Hi @gemSquared, Do you know where do we set up the frequency we get the data from tello? |
Thank you! This error confused me for several days. @gemSquared |
It appears the tello just streams it in, hence why this library uses event handlers. Not 100% sure though. |
Hey hanyazou!
for some reason I get an error when trying to subscribe to:
in the handler itself:
I get the error:
'Tello' object has no attribute 'EVENT_LOG_DATA'
Any ideas why?
Thanks, Gal.
P.S
it's nice to go back and work with the tello again :)
it reminded me how awesome the TelloPy repo is!
The text was updated successfully, but these errors were encountered: