Rover versus Tello Drone

20 views
Skip to first unread message

Jody Crothers

unread,
Jun 11, 2023, 6:34:45 AM6/11/23
to TI-Innovator
Hi All,
my next activity.

Who can move from point A to point B the fastest, the Rover or the Tello Drone?

My predictions
1m the Rover
2m the rover
3m the rover
4m and further The Drone

Assumptions
The programs are both written in Python
The programs are run at the same time.
There are no obstacles in the way
The distances are in a straight line.

Extensions
 Le Mans Start 
Teams move to equipment. Write the program then execute straight away. Speed coding.

Would love your input and ideas.



Jody Crothers


Head of Learning Area (Mathematics)

Ridge View Secondary College

Western Australia

www.jodstar.com

John Hanna

unread,
Jun 11, 2023, 6:49:37 AM6/11/23
to ti-inn...@googlegroups.com

Compare to human travel: should I drive or fly?

--
You received this message because you are subscribed to the Google Groups "TI-Innovator for Education" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ti-innovator...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ti-innovator/SL2P216MB1048F314239A4BAF232DDE8EB857A%40SL2P216MB1048.KORP216.PROD.OUTLOOK.COM.

Jody Crothers

unread,
Jun 11, 2023, 7:42:27 AM6/11/23
to ti-inn...@googlegroups.com
Love it , great scenario



Sent from my Galaxy

HMH

unread,
Jun 11, 2023, 10:12:01 AM6/11/23
to TI-Innovator for Education
Agreed, this is a great idea, including the drive vs. fly discussion!
 
Here are a two additional challenges/ideas coming to mind:

1. Try to code both, the Rover and the Tello in one piece of Python code. Hint: use try...except to detect a BBC microbit or the Rover /w Innovator Hub. Return an error if neither one is connected. See the power of object oriented coding in Python (the rv and tello are just two different objects, with methods (like .forward) having the same syntax. But - caution: rv uses the decimeter (10cm) unit by default, while tello uses cm. )
2. Compare the precision of the Rover vs. Tello when it comes to hitting the distance target. Mark the start and finish spots. Introduce and clarify the differences between precision and repeatability. (Hint: Precision is a measure for an experiment hitting the exact target spot. Repeatability is a measure for hitting the same result when repeating the experiment, though it may not be precise). Which one, Tello or Rover,  is more precise on a short distance track, on a long distance track? What may be the external influencing factors?
 
Have fun!
Hans-Martin

John Hanna

unread,
Jun 11, 2023, 10:39:31 AM6/11/23
to ti-inn...@googlegroups.com

 

Python lesson…  correct me if I’m wrong but:

         import ti_rover as rv

is a Python convention to make the ti_rover functions like forward(n) accessible using a special syntax: rv.forward(n) as opposed to

        import ti_rover

which would require the function to be called using ti_rover.forward(n)

This is known as aliasing.

You could also write

     from ti_rover import *

and use the functions like:

     forward(n) without any prefix at all.

 

OTOH,

from tello import * actually defines a Tello class and creates a tello object behind the scenes. (I think perhaps tello=Tello()). That’s in addition to all the checking under the hood to connect to the micro:bit and drone.

 

compare to: from turtle import *; t=Turtle() which exposes the creation of the turtle object right in the user’s code. I like this better.

 

Still studying Python,

    John Hanna

hm.h...@gmail.com

unread,
Jun 11, 2023, 4:55:25 PM6/11/23
to ti-inn...@googlegroups.com

John,

First of all, agreed, I like the turtle way of creating the object right in the user’s code the most, too. The ‘checking under the hood’ is likely to happen in the ‘__init__()’ part of the class, when an object is assigned. The turtle way of coding also allows creation of multiple turtle objects at the user level. This is different to tello or ti_rover, where only one object instance is supported.

But, although it doesn’t seem that obvious as with tello, there’s a lot of ‘under the hood’ going on in the ti_rover module as well, I believe. E.g., it detects the presence of the Hub and checks if the rover is powered, it is supposed to reset the gyro and encoder values prior to first use of a Rover function, etc..

Due to the implementation that’s visible to us users, rv does not look or feel like an object. But it is one, like almost everything in Python 😊.

Cheers,

Hans-Martin

--
You received this message because you are subscribed to a topic in the Google Groups "TI-Innovator for Education" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ti-innovator/PWzZR0NOFYo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ti-innovator...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ti-innovator/002501d99c72%2486d6d010%2494847030%24%40optonline.net.

Jody Crothers

unread,
Jun 11, 2023, 6:55:03 PM6/11/23
to ti-inn...@googlegroups.com
Wow 
Both and error detection. That is past my current limited python knowledge, so I will call upon some expertise of this group if I try that one with my students.

Thanks for the additions everyone



Sent from my Galaxy



-------- Original message --------
From: HMH <hm.h...@gmail.com>
Date: 11/6/23 10:12 pm (GMT+08:00)
To: TI-Innovator for Education <ti-inn...@googlegroups.com>
Subject: Re: Rover versus Tello Drone

John Hanna

unread,
Jun 11, 2023, 8:02:46 PM6/11/23
to ti-inn...@googlegroups.com

Here's a project that does a lot of error trapping using try…except.

See Koch_CX_CE_DT.py

Runs on CX, CE, or desktop software and checks to see if Innovator is present for sound.

turtle Koch Snowflake.tns
Message has been deleted

HMH

unread,
Jun 12, 2023, 4:47:36 PM6/12/23
to TI-Innovator for Education
Hello Jody,
 
here's an example about how you code serve Rover and Tello with one piece of code. 

Sorry, took the wrong file initially, there was a int(dist) omitted. This one (version v1) should work fine.
 
Enjoy,
Hans-Martin
move_rv_or_drone_v1.tns
Reply all
Reply to author
Forward
0 new messages