So I have been beavering away for ages now trying to get a robot to follow a line. I have got a model B connected to a BrickPI controlling a lego robot.
It has been relatively straightforward to control the robot using a Nintendo WII controller.
A while ago I came across opencv and SimpleCV and thought it would be interesting to use the camera to detect masking tape and follow it. Then before Christmas MAGPI included an article on Pietar which recognised traffic symbols. So I have started to implement this code. Although I could get it to work statically, I could not get it to work dynamically because the video picture was not being streamed.
This has led me to look at loads of other approaches, the Dexter streaming robot, CoderBot to name but a few. I have also looked at Flask, in particular Ben Nuttals Bett-Bot proved useful to get some understanding. Then I came across a tutorial from Miguel Grinberg and I have started to use his approach.
In the meantime I have modified my original code to make more use of classes, and the CoderBot approach of using get instance to create only one copy of the class.
My original program based on Pietar now works, I can control the robot from the WII controller and it processes video. When I run everything from My Flask App I get an error
Lib 4l2: error setting pix format: device or resource busy
HIGHGUI ERROR: libv4l unable to IOCTL S_FMT
HIGHGUI ERROR: V4L:initial capture error unable to load initial memory buffers
*** glibc detected *** corrupted double linked list.
The reference to memory buffers made me wonder about memory split, but increasing to 64K has not made a difference.
Tim to investigate further, 128K did not change anything.
No comments:
Post a Comment