I've now ported all of the race code including the simulation stuff to Python3 (although it should work with Python2.7+ too).
I'd like to use this as my race platform so should I send you an SD card with my Raspbian build on? I've used the latest Jessie-Lite image with the only main difference from a standard install being that OpenCV needs to be compiled for Python3.
Then could I upload revisions to the formulapi code (e.g. modified Race.py) via SourceForge normally? Or would that too much hassle?
That sounds like the easiest way to do things.
Hopefully you have received your YetiLid, if so the best thing to do would be:
fpi-upload.sh
script before each roundEach round we will take the SD card and:
~/formulapi/logs
directory~/formulapi
directory with the uploaded zipThe instructions for setting up rc.local can be found in our Standard Formula Pi SD card image instructions under the Final notes section.
The address to mail the YetiLid back to is:
Freeburn Robotics Limited
Unit 15, Earith Business Park
Meadow Drove
Earith
Huntingdon
Cambridgeshire
PE28 3QF
Topshed, I'd like to do the same thing (use Python 3 rather than 2.7). Do you have a link to your port or any tips on how to do it?
Thanks!
I also abstracted the motor driver so you can use an Arduino and generic PWM motor driver. My port to Python 3 is here: https://github.com/zlite/FormulaPi3
Hi Zlite,
While we are happy that you want to share your Python 3 port, but we also want to make our standard code available to our race entrants only.
If you could share the changes you have made to the code instead that would still allow you to share the port without sharing our standard code as well in the process.
We are sorry if it was not clear that we did not want the standard code shared with everybody, hopefully this clears up any misunderstanding :)
I'm not sure how to just share the changes but not the underlying code. Is there any chance you could host this version of the ForumlaPi code for Python 3 yourself? The advantages of using Python 3 is that it allows the use of other libraries that are Python 3 specific, while also being able to use the latest OpenCV 3.2
No problem, we are happy to host your version :)
I have added a new project and imported the code from your GitHub here:
https://sourceforge.net/p/formulapi3/code
The user permissions are set the same as the standard copy, but I have added you as a developer so you should be able to make changes.
Holding the code together is an excellent plan, and ensures that the code stays in house for the ‘combatants.’ :)
The GitHub project needs to be removed before anyone starts to branch it. [hehe]
Geoff
Thanks for hosting my fork locally! (I've made my own GitHub repository private)
I should note that my port also abstracts the motor driver and allows the use of an Arduino to control the motors, so it doesn't run on the stock hardware. But I'll add a Python 3 compatible original ZeroBorg.py file for people using the original ZeroBorg board.
BTW, the main reason that I did this port is that I think that the Pi Zero just doesn't have enough processing power to do OpenCV properly, so I wanted to upgrade to a Pi3 and also the possibility of doing all the processing on a laptop with the video sent over wifi. I also wanted to experiment with using other sensors, such as sonar, which requires the Arduino as an I/O processor.
I'd suggest that the default hardware platform shifts to a Pi3 for starters. That would allow 4 threads, which in my experience significantly improves performance.
Having the Python 3 version of ZeroBorg.py is great, that way people can use your port as a base for their own code.
When I am back at work (sometime next week) I will send everyone out a message to let them know your port is available for everybody.
I will also add a brief explanation of the changes and what they will need to do.
There were a few reasons we went with the Pi Zero for this round of racing:
We did however write our code so it should work on the Pi 3, as well as older Raspberry Pis.
In fact our early test versions were based on an RC car and used:
Here is some footage of the RC car racing during development:
We are still intending to have a higher speed competition in the future.
This will have a Pi 3 instead of the Pi Zero as it will need to perform the processing faster to keep up with the track :)
Hello,
excuse me for replying to such an old post, but I was wondering if you (or anyone else) can help me to get access to the script I can use for the ZeroBorg in Python3. I've been looking around, but haven't been succesful so far. Also tried to create it from the python2 script available on GitHub, but without any luck so far. I hope anyone here can help me. Thanks in advance
Regards,
Jeanine
You can find the Python 3 version of ZeroBorg.py here: http://forum.piborg.org/comment/6256#comment-6256
Is the ForumulaPi code open source? If not, what licence is it published under? I can't find a licence file in the repository
We must have forgotten to add our license document to the code :)
It is actually our own license to fit how we intend our Formula Pi type events to be handled.
To summarise:
In this case "You" can be your entire Formula Pi team.
It is not quite an open source license in the normal sense.
This kind of license is normally referred to as shared source or source available instead.
I have added the license document to both repositories now, it is also attached below.
Out of curiosity, why not open source the code? Most of the other autonomous car code projects are now open source (Comma.ai, Udacity, OSCC, CPFL:Autoware, Carputer, PX4:Rover, APM:Rover, etc), and it's the best way to get participation and contributions to speed development.
I'd love to get local high school students started by using ForumulaPi with their own vehicles on local tracks, but given your current licence I don't think I can. Thus I'll have to switch to another code base and leave FormulaPi, which is unfortunate since I really like it!
There are two basic reasons we decided not to go with a conventional open source license for Formula Pi:
1. We want to encourage competition between teams
2. To ensure the code stays at a suitable level for everybody
By having a license like this it does not stop anyone from asking us if they could run their own event like Formula Pi. What it does do is stop people running events based on the Formula Pi code without our acknowledgement / involvement.
We have invested a large amount of time and effort into Formula Pi to get to this stage. It would be a real shame for us if someone decided to use all our hard work without involving us. We are happy to try and offer assistance to people who would like to run a Formula Pi based event.
As you have pointed out there are a lot of projects for self-driving cars and robots which are already available. We want to add a competitive element to what is available as a different means to encourage development of better and smarter code. We think that having a mixture of both competitive and cooperative development available that we can encourage everyone who is interested to help improve autonomous cars in their own way.
Keeping the code secret encourages the competing teams to keep their code secret as well. This makes it easier for people to come up with their own unique ideas, with the races deciding which work better and which do not. At the end of each series we then share the winners code with all the teams, this avoids the usual problem of some teams being left behind if they did not do as well as others in the last series.
On the other side of things we want to keep the standard code simple enough that people of any level feel they can get stuck in and try their luck. Often these projects seem very complex, putting those with less experience off as they feel they would not be able to do well. We have found that if the code available is presented to people as simple for getting started then they are more likely to have a go, often with good results.
What we have done is to try and make the code as easy to alter and understand at each level as possible. This does mean there are some parts of the code which are far from perfect, such as the overtaking logic :) The result is that we have teams of all ages and skill levels trying without feeling overwhelmed.
We think that events like Formula Pi and the open source development of self-driving cars and robots complement each other nicely. We encourage anyone who is interested in looking at or helping with autonomous code to take a look at them.
Great answer! I'm very interested in your offer ("We are happy to try and offer assistance to people who would like to run a Formula Pi based event"), so I'll start another thread to learn more about that.
Add new comment