I really have to say that I am more then tempted to just remove the venv completely and install everything outside the venv in the home directory… I wasted almost two weeks trying to get the gopigo going so far
I used the Setup_GoPiGo3_Over_PiOS_Legacy.txt and tried every step.
Everything worked flawlessly till Test GoPiGo3 Software Installation
(venv) pi@gopigo:~ $ cd Dexter/GoPiGo3/Software/Python/Examples
(venv) pi@gopigo:~/Dexter/GoPiGo3/Software/Python/Examples $ ./Read_Info.py
GoPiGo3 firmware needs to be version 0.3.x but is currently version 1.0.0
Alright, so… I decided venv’s will always hate me and this feeling is very mutual. If I test ./Read_Info.py outside the venv everything works fine. I hate myself . All libraries work outside the venv. Soo… venv is dead to me. Thank you all very much! I am pretty sure I will be back soon with the next error
I think right now I shouldn’t mess with the venv and be happy, that (as it seems) everything is working so far. Not quite sure about opencv, but I will test that in the next days. Now I want to make progress and if I can assess that I have enough time for everything. Them I will set the SD up clean again. Again thanks to all of you for helping and suggesting great tips! I really appreciate it
Ohhhh… that’s you! Of course, I already saw that one here. Did you test your lane detection with curves?
Do you have any idea how to get the gopigo to drive accordingly?
Except that you’re on a schedule. . . You could spend several weeks doing nothing but reading his and @KeithW’s posts from day-1 until today and it would richly repay you.
Me? I watch their stuff like a hawk. A lot of it I don’t understand yet, but the opportunity to sit at the feet of someone of his and @KeithW’s caliber and just learn is an honor in itself.
No - it is too simplistic for curves. Its purpose was to compare single thread against multi-threaded OpenCV line recognition performance.
Did you watch the PiWars Orionrobots video? That is a typical, simple, implementation of dealing with curves.
Did you see this one (Ackerman steering but sensing and control are similar)?
I think there are basically two schools of thought on lane following (I have not researched):
train a NN on the whole pipeline (reco, steer, repeat)
Use object detection as input to a control algorithm
a) this can be edges, this can be lines, this can be color regions etc.
b) control algorithm can be simple (turn to an angle) to complex (PID steering to a moving target angle)
You mention this is for a bachelor level class, and the challenge is simply to implement something, not to extend the science. I want to remind you that a well written report of the successful aspects and failure aspects is always a valid fallback if you decide to start writing with enough time to write it up instead of bashing your head against the failures all the way to the deadline.
Yes i saw the PiWars Orionrobots video and it was very interesting. Nothing I have seen before to be honest The Ackerman steering is new to me. But I will look into it.
Yeah, I think so too. These two options are pretty much it. I tend towards the second option with edge detection and an algorithm that controls the lane keeping in any way. I am not sure if I could even try a NN with my raspberry pi 3b+
It is for my bachelors degree, yes. I have a little less then two more months till submission. Absolutely true. My problem right now is that I have so many sources and github pages saved up and I need to sort and probably filter them in a way. So yes, I have two jobs in the next two months. Get the gopigo to do his job of lane detection, lane keeping and optional obstacle avoidance based on the raspberry pi cam v2 feed. And to write a good scientific report on that part
As I was testing my camera. I noticed that opencv gets me errors quite often. After trying to fix this error:
[ WARN:0@0.778] global /home/pi/opencv/modules/videoio/src/cap_gstreamer.cpp (2076) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Failed to allocate required memory.
[ WARN:0@0.779] global /home/pi/opencv/modules/videoio/src/cap_gstreamer.cpp (1053) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0@0.779] global /home/pi/opencv/modules/videoio/src/cap_gstreamer.cpp (616) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
I tried to fix that one but not i get this error:
ImportError: numpy.core.multiarray failed to import
So somehow I have a numpy problem… How do I know which version of opencv is compatible with a version of numpy ?
Also it seems that cv2.VideoCapture(0) doesn’t work with raspberry pi cam v2… I have to say… i am pretty tempted to get a new installation of Buster on the sd card… I fear this installs and potential error fixes in the venv might have broken something here…
On a positiv note… I tried the gopigo movement and it works great… very fun to see that little boy drive through the living room
I saw in one search hit that OpenCV (version unknown) is still using numpy 1.19 , and in another Python3.6 uses numpy 1.19 but obviously that does not answer your specifics.
I’ve been out of the OpenCV loop for a bit, but I do remember there were too many different ways to access the PiCameras to get a feel for which to use when.
but I don’t recall any of my working programs going direct using cv2.VideoCapture(0).
Also there are ways to use the Raspberry Pi GPU to perform algorithms in between video frames - I remember using this for motion detect / motion vector analysis without OpenCV that was very fast.
I will try that later… I swapped the SD cards and installing opencv right now… just in case One more question for the day… Since the firmware error is “fixed”, are their any rules in this forum, that I shouldn’t ask about different stuff in this thread? I mean… it’s probably better to open up a “new project” thread about all the current errors and progress, right?