Python Programming Info

I gave my grandson a GoPiGo3 for Christmas 2018, so it is relatively new. It is running Dexter OS.

I know that all the programming that has been done on the GoPiGo3 by him has been done with BLOXLEY. At his home he has a desktop Raspberry Pi system, an iPad, and a Windows 10 laptop. I want to introduce him to the Python programming language in many contexts, not just with the GoPiGo3. He also has a Tello drone, which is Python programmable, although I don’t know the level of support for that product, but I am assuming the the Python programming support for the GoPiGo3 is much more robust.

I know that probably most users of the GoPiGo3 use Scratch or Blockly, so I do not see carefully written documentation on how usage of the GoPiGo3 with Python is carried out. I have several probably simple questions.

  1. What are the supported computers for programming the GoPiGo in Python, i.e., can I use Windows, iPad, or a Raspberry Pi desktop running Raspbian Pixel?

  2. Does the Python programming reside on the GoPiGo3 and does it requires something like ssh to run the Python IDE on the GoPiGo3 via a browser.

  3. If requires requires ssh for Python, does that mean that one cannot run a Python IDE on the remote Win10 laptop. or the iPad, or the desktop Raspbian pixel, and then transfer the code to the GoPiGo3 for execution? The reason I ask this question is that there are several IDEs that are better than IDLE. I’d like to standardize the Python IDE for my grandson’s learning of Python. I also would like to prefer the Windows 10 laptop for its portability and OS for my grandson’s learning of Python.

I hope these questions are not too simplistic for the gurus out there who will answer them.

1 Like

I also have a Tello drone that I program with python. I have other robots and am interested in the gopigo.

I would like to add to your questions:

  • with the university version of gopigo, is there blocky and python code for all the included sensors and the camera
  • could I use python sockets to communicate between gopigos

note: here in Canada, the nearest gopigo distributor is 5000 km away from me.

1 Like

@srogers

Welcome in!

You are correct about one thing, the support here is stellar, even for a crufty ole’ soul like myself.

We’re in the same boat in that I have two granddaughters that I want to interest - or at least expose them to - things other than smartphones and Roblox.

Assuming you’re using Dexter O/S, (the stock out-of-the-box issue with the 'bot), the answer is “anything you want that has the ability to create a WiFi connection and has a relatively recent web browser”.

I’ve personally used both a Win-7 laptop and an Android tablet to communicate with my own GoPiGo. In Dexter O/S, all the software written is saved on the 'bot itself, so it doesn’t matter what you use to connect.

As for me - one of the “crotchety old geezers” here - there are a few of us - I’m still getting my feet wet in the wonderful, wild and woolly world of Robotics - and I’m spending most of my time in bloxter. I do that so that I don’t have to concentrate as much on the picky details of programming while I’m learning the picky details of making a robot “talk sense”, so to speak.

As an aside: Despite what all the marketing hype says - Dexter or anyone else’s for that matter - learning robotics is not easy.

Of course, “easy” is a relative term.

Compared to writing code in raw Broadcom processor assembler? Sure!

Compared to building one from a thousand-and-one pieces of kit, wiring it up, finding something to use as a controller, and then praying it doesn’t go up in smoke first thing? Absolutely!

Put a GoPiGo together, press a few keys on your computer, and it dances jigs and sings the Elbonian National Anthem? Ahh, maybe not.


In any event, you’ve come to the right place. Everyone here is as pleasant as a summer night sitting next to a pretty girl. Questions are handled, (usually), by wonderfully competent experts direct from Dexter - that is, when the rest of us don’t butt in! They’re remarkably patient - if they can handle MY angst when things don’t go right, they’re in-line for sainthood!

In all seriousness, I can’t tell you for certain what your options are until you find out what O/S you’re using. If you’re using a web page to talk to it, it’s probably Dexter O/S and the version is in the upper-right-hand corner. (if memory serves)

In any event, have fun, don’t take it too seriously, and - when possible - post pictures of your 'bot. Both @cyclicalobsessive and I have running posts about what our respective bots are doing.

BTW, his bot’s named “Carl”, and he’ll show you pictures faster than you can say “granddaughter!”

Mine is The Bug-Mobile, also known as “Charlie” after the hapless Charlie the Tuna.

Like I said before, Welcome in!

Jim “JR”

@robotics
P.S. Here in Moscow Russia, the nearest distributor is even further away! (laughing!) The support is just as close as ever though.

1 Like

I am interested in your Python setup for Tello. Do you use Windows or something else. What IDE do you use for Python and Tello.

I’ll add my welcome @srogers and @robotics and add my interest in this topic. As @jimrh mentioned, the GoPiGo3 / DexterIndustries directly support three OS configurations - Cinch, DexterOS, and RaspianForRobots, and on each OS there are multiple programming options.

To find a Python guru working with the GoPiGo3 is an as yet unfulfilled dream for me. I run RaspianForRobots on my GoPiGo3, and develop my code in three modes:

  1. “offline” on my Mac
    a) using the nano text editor in a terminal window, or
    b) Emacs (just editing and syntax highlighting)
    c) TextEdit (terrible but convenient sometimes)
    d) in PyCharm (still just editing; I did set up the DI Sensor libraries in this environment)

  2. “remote” from my Mac
    a) in multiple ssh terminal windows - edit with nano in one, run code in another, kill from another
    b) using Remote Desktop to bring up the RaspianForRobots “Desktop” environment
    This mainly when working with the video camera output.
    (other folks use this method for developing with the pygame libraries)

  3. “Simulated”: Early on, I built a limited simulated GoPiGo library that allowed me to run early drafts on my Mac, and then download them to the bot for elaboration. (This was primarily so I could code on my lunch hour at work. Now retired, I don’t use this flow anymore.)

To keep the offline and remote environments in sync, I push to/pull from Github. This also offers some level of backup, although I do not declare branches while working on something and then merging down; I do everything on the master. (I don’t feel very comfortable with Git, but I it works enough for me.)

I don’t know anything about working in DexterOS or Cinch, but my impression is that RaspianForRobots is the most flexible and extensible environment for Python programming on the GoPiGo3.

PyCharm’s remote debug capability needs a PyCharm guru to setup, but I am sure it is possible.

srogers: I am using windows 10 and pycharm.
A simple socket program allows me to send commands to the tello.

If it was possible for the gopigo3 to send the commands to the tello, then I could build a trailer, for the gopigo to pull the tello and then launch it.

note: I have not purchased the gopigo, as I am awaiting answers to some questions.

Trying to answer a few things all at the same time.

You can use Python with DexterOS, it uses Jupyter Notebooks all pre-installed on DexterOS, so you only need a browser. Plenty of libraries are pre-installed.

If you go with Raspbian for Robots, you will lose Bloxter, but you can then connect your GPG to the Internet and use some cool APIs like having your robot run its own Twitter account. You will also be able to use any IDE that you want, as the IDE will be on your own platform. I use VS Code myself but other team members use other IDEs. It’s wide open.

Python documentation and examples are here: https://gopigo3.readthedocs.io/en/master/
(this is bundled with DexterOS also)

The GoPiGo is a Raspberry Pi, so a Linux computer. You can use sockets any which way you want.

PS: the qc in my name is for Quebec. :slight_smile:

cleoqc: Bonjour
I now live in BC but I still have a chalet near Mont Tremblant.
It seems that Robotshop is the only supplier of gopigo3 in Canada. Unfortunately, they do not have the “university” version in stock.

Where would I find a detailed description of what is in the university version, so I could purchase the components. Example what version of pi camera?

On the camera, is there Bloxter and python code for the camera?

Hey there,
chalet near Tremblant, huh? Lucky you! Gorgeous area!

Robotshop will ship all over Canada.

The description of the university kit is here:
https://www.dexterindustries.com/product/engineering-robot-kit/

If you want, you could get the Advanced Starter kit (all the robots are the same, only differences are the added sensors). The camera is the official Raspberry Pi camera. Camera support in Bloxter lets you take photos. In Python, you get access to the official PiCamera library which does stills, and videos.

According to Robotshop, they would have the Engineering kit in April
image

1 Like

Cleo
Thanks for that information.
So with a Windows laptop, we can do Python programming for the GoPiGo3 using a browser.

My grandson has been doing all this nice stuff in Bloxter, maybe on an iPad or on a Windows laptop. I’m going to get Jupiter Notebooks on my PC to see what it’s all about because Ive heard about it, but not used it. I guess I just need to know how to establish the PC bridge to GPG3 and Jupiter Notebooks from a Laptop.

@srogers,
if you’re using DexterOS, the only thing you need to do is change the Wifi connection on your laptop. Instead of connecting to the home Wifi, you connect to the GPG Wifi.

Of course you can go ahead and install Jupyter on your PC to explore but this step is not necessary. By connecting to DexterOS you will use the version that is on the robot, without having to install anything at all.

Cleo

Here’s our Intro video for Jupyter Notebook: https://www.youtube.com/watch?v=ZF-7ixxhahw

1 Like