Forward-thinking: Jessie or Stretch? Python 2 or Python 3?

The more technical aspects of Spirit, and carry-over discussion from Kickstarter updates.
User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Forward-thinking: Jessie or Stretch? Python 2 or Python 3?

Postby esba1ley » Sun Feb 11, 2018 11:08 pm

Kevin et. al.:

The cards that came with our Spirit Rovers had Raspbian Jessie installed... The first thing I did was flash my card with Raspbian Stretch from 11-29-17 from "the mothership" at https://www.raspberrypi.org/downloads/raspbian/.

Similarly, as I"m going through your python and writing my own, I'm making sure that we can future-proof our code by including the line:

Code: Select all

from __future__ import print_function, division


Since those are the two commonly-used things that will hork up scripts in the future when Python3 is the only thing on the planet and Python 2 is deprecated in 2020. I strongly recommend that we gear all of our scripts to be Python3 compatible NOW to save us headaches later.

For things like this, shouldn't we gear our work looking towards the future, using the current Raspbian release, Python 3, etc.?

Thoughts?

-Erik
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460

Bastian
Posts: 21
Joined: Sun Oct 22, 2017 5:30 pm

Re: Forward-thinking: Jessie or Stretch? Python 2 or Python 3?

Postby Bastian » Mon Feb 12, 2018 1:04 pm

I upgraded Raspian to Stretch and compiled openCV 3.3. against 2.7 bindings (more libraries/packages available).
I think that's future proof enough for a while ;0)

User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Re: Forward-thinking: Jessie or Stretch? Python 2 or Python 3?

Postby esba1ley » Mon Feb 12, 2018 5:51 pm

I compiled OpenCV 3.4 against both Python2.7 and Python3.0 bindings simultaneously. That's even more future-proof... and just as easy to do.
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460

gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm

Re: Forward-thinking: Jessie or Stretch? Python 2 or Python 3?

Postby gpvillamil » Mon Feb 12, 2018 6:03 pm

Did you document this on your blog? I'm keen to do this too.

Also - have you tried Kevin's Python code without a virtualenv? I'm in the process of setting that up, and would like to avoid the virtualenv if at all possible.

esba1ley wrote:I compiled OpenCV 3.4 against both Python2.7 and Python3.0 bindings simultaneously. That's even more future-proof... and just as easy to do.

marckarasek
Posts: 22
Joined: Sun Jan 14, 2018 1:59 pm

Re: Forward-thinking: Jessie or Stretch? Python 2 or Python 3?

Postby marckarasek » Sun Feb 25, 2018 2:05 pm

I propose C and kernel drivers and actual applications.

Python is good and all but it does not get you the speed and flexibility of having kernel level code.

User avatar
esba1ley
Posts: 58
Joined: Sun Jan 01, 2017 2:15 am
Location: Pasadena, CA
Contact:

Re: Forward-thinking: Jessie or Stretch? Python 2 or Python 3?

Postby esba1ley » Sun Mar 11, 2018 4:27 am

I agree with your ratinoale for C marckarasek... but C isn't for everyone. I thought kevin's intent was for an education platform for younger coders, for which I think python is the right start, they can then branch into C if they need the performance.

kevin? This is your baby...
----------
Erik S. Bailey
Entry, Descent, and Landing Aerospace Engineer
Maker, and Musician
SpiritRover Kickstarter Backer #460

marckarasek
Posts: 22
Joined: Sun Jan 14, 2018 1:59 pm

Re: Forward-thinking: Jessie or Stretch? Python 2 or Python 3?

Postby marckarasek » Mon Mar 12, 2018 1:14 pm

Python as the outside interface into the rover would be great, a way to program the rover over ethernet or BLE to tell it to do things. (Move forward, take a picture, video, etc..). Maybe even a graphical interface for real young coders (kinda like turtle).

We could even have an interface in the 'spirit' of the way they drive the real rovers on Mars. They program a set of instructions and send them to the Rover.

I would like to get to the point of having a custom SD card image with kernel drivers, things configured to make this possible.

For younger coders just assembling the rover will/could be a challenge unto itself. Plus setting up ssh, getting a shell prompt (what is a cmdline?) and using git or ftp to get the code to run.


Who is online

Users browsing this forum: No registered users and 2 guests