mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Mon Feb 15, 2016 4:54 pm

Not without some modification.

the update scripts have been customized to handle updates to existing components, not add new ones.

running this script in /home/pi :
sudo ./a-update.sh
will fetch all the newest stuff, but the other update scripts need to be modified to implement the addition of the new features as they become available.

I will see about updating the other scripts to automate the rest of the steps (you could for instance manually copy things from the directory that the a-update.sh script is downloading to to the /home/pi directory and you would be able to make the new features work).

I just don't have the time to do that right at this moment.

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Thu Feb 18, 2016 3:07 am

Quick votes for case redesign?

I got the new battery. No matter what, I have to increase the depth of the case by 2.5-3mm bringing the total depth up to about 40 mm.

I have two choices for the other dimension. I either make the case wider, or I make it longer.

The width one is not necessarily bad because the power button sticks out, and I think I can fit the battery below the extending power button on that side. This is good because it can help prevent the power switch from accidentally being triggered. This is bad because it makes the unit wider than many cell phones. This is the way I'm leaning.

However,

The length is shorter than most phones. Even phones from a few years ago. So in terms of trying to resemble cell phone dimensions, It would be closer if I increased length. If I increase length you will have to move the battery out of the way to access the SD card. This is good in some ways and bad in others; it will help protect the SD card/slot from damage in many cases. It's bad in that getting sd cards in would probably require tweezers, whereas, I can get them in and out with the tip of a key right now.

Thoughts?

I may build both variations just to try them out. With the new design and a batter battery in place, I will do testing with the low battery shutdown procedure.

For people with older devices than mid feb 2016, I will place an option in the settings menu to turn off low battery shutdown.
I hate to be doing this to people, as I've just sent a few out, but it will be easy to modify. Most people won't have an updated image with the code on, but if they ever upgrade the software this would be something to be aware of.


Unrelated to batteries, I am getting the gyro/accel/magneto sensor integrated on an updated PCB design. Probably within a week. I will then try to write an app that lets a blind person set a heading by aiming the device and clicking the knob in. Then the app will guide them in a straight line along the heading.

Also on my plate is to revamp the update scripts/procedure, and build it into the menus. As this will be my first go at it, I will probably bury it in the settings menu, and focus on having it just update using the master git branch. Once this is working reliably, I will see about making a development branch so that we can do updates on new and unstable features while leaving actual users (and I hope to increase that number dramatically this year!) in a safe and tested land.

User avatar
seeingwithsound
Posts: 165
Joined: Sun Aug 28, 2011 6:07 am
Contact: Website

Re: Sight for the Blind for <100$

Thu Feb 18, 2016 7:06 am

Hi Mike,

Concerning increased width or height you may also wish to pay attention to minimizing the dangling of the device when worn on the chest. You could experiment with velcro and various sizes of cardboard tagged to the device to see what works best in this respect. My guess would be that wider is better than longer, because you don't want the device to rotate around the "axis" of the cord, but I could be wrong.
mikey11 wrote:So in terms of trying to resemble cell phone dimensions, It would be closer if I increased length.
The device does not resemble a smartphone anyway, while The vOICe for Android runs on smartphones held in landscape orientation, not portrait, and the same applies to smartphones used as HMDs with Google Cardboard devices like the Homido.

Peter

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Sat Feb 20, 2016 5:29 am

Peter,

I agree that the dimensions are not of a cellphone ( I just want to keep it as small as possible), and I also agree with not wanting rotation about the axis where it hangs. In the next version I will be extending the width by the minimum possible (still TBD). I am also considering converting from a single attachment point to three points. This will allow for the central hanging neck lanyards, or two point attachment straps. The straps would have much lower chance or rotating, and may be cheaper in mass production.

aside from case considerations:

The good news is that I have assembled the electronics of the next version today. I haven't had enough time to test everything yet, but I have been able to get the inertial measurement unit to function via the I2C. I've gotten all functions to work using example code from a number of sources. To make the straight line following application, I will have to meld these (they have permissive licences), unfortunately, this has required a number of other dependencies to be installed, so we will have to do the image based update when the time comes.

On the bright side of course is that I didn't screw up the pcb revisions (which I didn't test, and hoped would work). This means you can get positional information over short time periods (a couple minutes, then errors become too large), and the battery is now more than double the capacity, and has a future growth capability in the exact same footprint for double the capacity again (which is based on my diving into Chinese battery manufacturers for about 6 hours).

so the upside is that in mass production, the battery life is likely to exceed 10 hours while running 2-3 applications constantly, and position and heading info can now be tapped.

My concern is that for positional information, the update rates required are very likely to preclude other functions from running. I will have to see how this pans out in reality once I've got some reasonable routines worked out.

User avatar
seeingwithsound
Posts: 165
Joined: Sun Aug 28, 2011 6:07 am
Contact: Website

Re: Sight for the Blind for <100$

Sat Feb 20, 2016 8:52 pm

mikey11 wrote:(which is based on my diving into Chinese battery manufacturers for about 6 hours).
I do not know if that also means that you plan to use Chinese batteries, but just be careful that there are many reports that cheap Chinese batteries often hold far less charge than specified https://www.youtube.com/watch?v=NFGSiIJ2FTI

Peter

PranavLal
Posts: 124
Joined: Fri Jun 28, 2013 4:49 pm

Re: Sight for the Blind for <100$

Thu Feb 25, 2016 12:41 am

Hi all,

The rotation about the axes is a major issue if one is running. Yes, I do stair climbing for exercise and keeping the device pointing forward is a challenge. The 3 strap idea should work.

Mobile phones are handy benchmarks to have. Try to avoid fablit form factors because they are too big. The straps should help here.
Pranav

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Thu Feb 25, 2016 2:10 am

I looked more into batteries. It seems like the best rating is 3400 mAh per cell, so ~33% better than the new spec of 2200 mAh (x2).

The best chinese prices and performance are lies.

As for the new sensors : I am learning about kalman filters and such. No idea on deliverable code. Eventually should have good straight line following.

Working case model complete for new config/battery. Only about 12mm wider, other dimensions the same.

Pardon terseness, bad conn/device.

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Fri Feb 26, 2016 10:31 pm

That is good news!

I'm quite enthused by the wireless capbilities. I'm imagining camera glasses that are wireless, and bluetooth headsets.

I couldn't be more pleased, it's definitely a step in a good direction.

johnf
Posts: 30
Joined: Fri Dec 23, 2011 10:35 pm

Re: Sight for the Blind for <100$

Fri Feb 26, 2016 10:47 pm

I look like I am smiling to read this about the *** but no, it`s just me grinding my teeth together..
The useability problems are melting away which is marvellous. After-Sight is going places.
However, am I not right in saying that the problems of cloning an SD Card image remain serious for many of us?
In particular, where the Internet is very poor service , users - maybe beginners or family helpers -have to rely upon copying for backup and repair.
Is there the possibility that an app could be generated to make this task granny-proof?
I have had nothing but trouble with W32Disk Imager and SD Formatter, using a W10 touchscreen laptop. I have followed every thread on this topic and I am becoming really discouraged by lack of coherence.

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Fri Feb 26, 2016 11:07 pm

Hi John,

I have put an update feature as one of the next items I work on.

It will be located in the text to speech menu system and should not require the SD card/imaging except in extreme cases.

These extreme cases would be things like:

physical disruption of the memory card, massive static shocks, or system crashes that render the shutdown routines inoperable.

It will be as simple as plugging the unit into an ethernet connection that has internet access, and pressing a button.


On the technical side of this, it will require that as developers add new features, there will be a script made that grows over time meant specifically to install dependencies that new code may require.

Selecting the 'update' option from the menu will do the following:
-run the dependency installer script
-run a script that does a pull of our custom code from the github repository, and then copies it from an inactive location to an active location.

The second step should also allow random problems that crop up due to bugs to be fixed by overwriting corruption caused by the bugs.

This type of update mechanism will be a low bandwidth, fast operation when compared with using filesystem images, and messing around with SD card writing software.

However to get to this point, we will have to distribute one last filesystem image and then proceed to be militant about properly maintaining the update mechanism in a state of high reliability. I am confident that we can achieve this. It requires that the contributors strictly adhere to the steps required to make the update function work correctly. At the current time, the only contributors on the repository are myself and Mikael (Mr. Indoj). With such a small group of contributors, this should be easy.

From the users side, it means that updates will be as simple as plugging into an ethernet port that has internet access, and pressing the update button, and likely waiting less than 45 seconds, followed by a reboot. As the update procedure completes steps, it will provide auditory feedback. For example: when it is about to request the download of dependencies it will say "downloading dependencies" and when this step finishes it will say "dependency download complete", or something quite similar.

By this fashion, we can keep the user informed as to how it is progressing. When the downloads and file replacements have taken place it will announce "rebooting to use updated software" or something similar.

Be assured, this is not all conjecture, I have been researching how to do this in a way that is sustainable and will be simple for the end user.

The reason why it hasn't been completed yet is simply the lack of my time to dedicate to it. I make time whenever I can, but I have a full time job and two kids to look after when I'm not working. I am aiming to have this feature completed before the end of March life permitting.

So Stay tuned, and be of good cheer. This problematic aspect is going to be solved!

User avatar
seeingwithsound
Posts: 165
Joined: Sun Aug 28, 2011 6:07 am
Contact: Website

Re: Sight for the Blind for <100$

Fri Feb 26, 2016 11:11 pm

johnf wrote:I have had nothing but trouble with W32Disk Imager and SD Formatter, using a W10 touchscreen laptop.
What trouble? I've been using SDFormatter and Win32DiskImager without issues on my Windows 8.1 and now Windows 10 laptop (no touchscreen) to flash updates of the After-Sight images. I do agree though that the updating process needs to become much easier for most end users.

Peter

User avatar
seeingwithsound
Posts: 165
Joined: Sun Aug 28, 2011 6:07 am
Contact: Website

Re: Sight for the Blind for <100$

Mon Feb 29, 2016 9:14 am

mikey11 wrote:That is good news!

I'm quite enthused by the wireless capbilities. I'm imagining camera glasses that are wireless, and bluetooth headsets.

I couldn't be more pleased, it's definitely a step in a good direction.
It appears that the Raspberry Pi 3 is already shipping!

http://www.pcworld.com/article/3038992/ ... wi-fi.html
http://www.engadget.com/2016/02/29/raspberry-pi-3/
https://www.raspberrypi.org/products/ra ... 3-model-b/

Peter

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Fri Mar 11, 2016 8:04 pm

I've got a set of supplies for five units coming, and I was able to locate a supplier for the RPIv3.

I'm going to be taking a trip to meet with members of the national blindness organizations in Canada sometime in April, and am excited to be able to give out the new hardware revision along with the upgrade of the RPiv3. This will 'future proof' the devices to a degree.

I'm pretty excited to make the next step to the v3. I don't imagine I will do much in the way of taking advantage of the wireless capabilities right away, (due to personal life time constraints), but I still have the goal of making an automatic updater function before March is out.

Considering that one of the most frequent feature demands has been getting bluetooth headphones operating, it will make a great test case for establishing the functionality of the automatic updater function, and make users happy. Required steps on the road to excellence.

I've also been reading about new 'backscatter' wifi technology that can interact with with one powerful emitter and consume 10,000 times less energy while achieving 11mbps. This means that we can expect wifi wireless video glasses in the very near future. This will result in a wirefree existence. It's a pleasant thought.

User avatar
seeingwithsound
Posts: 165
Joined: Sun Aug 28, 2011 6:07 am
Contact: Website

Re: Sight for the Blind for <100$

Fri Mar 11, 2016 8:18 pm

mikey11 wrote:I've got a set of supplies for five units coming, and I was able to locate a supplier for the RPIv3.

I'm going to be taking a trip to meet with members of the national blindness organizations in Canada sometime in April, and am excited to be able to give out the new hardware revision along with the upgrade of the RPiv3.
Great to hear of this progress! BTW, has the poor contrast issue been fixed, or will it be fixed before the new units are given out?

Peter

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Fri Mar 11, 2016 8:21 pm

It hasn't been fixed yet. Perhaps that can be the autoupdate test case. It is a smaller job than getting BT going anyhow.

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Sat Mar 19, 2016 12:38 am

I am currently rebuilding on the raspberry pi v 3. My first impressions are that default settings run hot and by necessity must be chewing through battery life.

I'm thinking about underclocking a little bit.

PranavLal
Posts: 124
Joined: Fri Jun 28, 2013 4:49 pm

Re: Sight for the Blind for <100$

Sat Mar 19, 2016 2:00 am

Hi Mikey11,

As long as the soundscapes refresh every second and the other functions run in realtime, we should be ok withunderclocking. I hope you will not have to alter the case design.

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Sat Mar 19, 2016 2:24 am

surprisingly it didn't actually take too long to get everything going.

What I did: copied the home folder from my raspberry pi v 2 into the home folder on the raspberry pi v 3 using a modified installation called minibian which is a minimized debian install. I don't know the final size yet, but minibian starts at about 275 mb. I'm expecting less than 4 gigs total.

for the sake of future rebuilding/building on other linux hardware, I had to install the following dependencies:

through apt-get (and some of these could have been done through pip)

python
git-core
nano
python-dev
python-rpi.gpio
espeak
make
gcc
wiringpi2-python
python-setuptools
openCV3
openCV
psmisc


Though pip:

numpy
serial
setproctitle

Through git:

wiringpi
py-gaugette
OpenBLAS

Of course many of these dependencies had other dependencies.

I had to chmod 755 a number of exe's as this didn't come with the copying.
I had to rebuild raspicam

and not so obviously, I had to copy the contents from /usr/local/lib to /usr/lib

That covers rebuilding from scratch essentially.

Now for the positives (and they ARE nice):

1. when teradeep cycles, there is only a very short pause between classifications now. It is much more natural and responsive to use.

2. the lag on raspivoice is still there, but is diminished. I'm not sure you can ever totally eliminate lag, but it's a step in the right direction.

Hopefully before the next few days are done I will have prepared an update script. I am going to need help testing it out. I will need one of the people with the pi v 2's that have been distributed. I am going to do my utmost to make sure that you don't 'need' the pi version 3 to keep getting useful updates.

I've been thinking and reading about updating systems. I'm planning on adding a update number, and incrementing this each time. This will be saved to the config file.

I will prepare a folder for each update with a collection of scripts in each folder to perform the update. by this method, a user can miss a few updates and then will be able to sequentially install them.

In any case, I expect to have the updating system at least in existence by the end of this month. Then the bugs to be worked out in the next month.

The contrast change to raspivoice will be the first test case. for the update. For this, I will implement a contrast value that provides the experience people are expecting, and will need some feedback for this. At the same time, I will make a contrast cycler from the raspivoice settings menu.

I am pleased with the upgrade to the pi V 3. The increased execution speed and general better performance is good. The existence of the WIFI and bluetooth open up huge areas for new software development. For instance the possibility Pranav mentioned for face detection by scraping a users facebook friends pictures... It would require some clever programming, but should not be impossible.

Another possibility mentioned was by john peacocke in PM's. A youtube processor for the vOICe. I listened to a recording done by Jacob Kruger of one of the more recent rocket landings, and watched the video. It was pretty cool, and it shows how this technology can share areas of knowledge not previously accessible.

with wifi, voice recognition while on reasonably fast networks is now possible. This will mean that some complex information can be spoken to use applications. imagine searching through youtube by speaking what you are searching for, and then having the vOICe serve up the video. (granted the vOICe is not perfect for every kind of video, but it can be fantastic for some types)

What I'm suggesting is that the new big battery combined with the rpi V 3 should mean that I can sit on this hardware revision for at least a year or two. This is getting in step with other wearable technologies development times. This also coincides with me expecting to get charitable status to fundraise and build a number of these units. So that also has me pretty enthused.

Things are looking up!

PranavLal
Posts: 124
Joined: Fri Jun 28, 2013 4:49 pm

Re: Sight for the Blind for <100$

Sat Mar 19, 2016 2:51 am

Hi Mikey11,

I am happy to test. Let me know what you need done.


Pranav

User avatar
seeingwithsound
Posts: 165
Joined: Sun Aug 28, 2011 6:07 am
Contact: Website

Re: Sight for the Blind for <100$

Sat Mar 19, 2016 9:49 am

mikey11 wrote:when teradeep cycles, there is only a very short pause between classifications now. It is much more natural and responsive to use.
Hi Mike,

Yes, these are all very positive developments. Thanks for sharing. Concerning underclocking: it may be that Teradeep now runs faster than it needs to? There is no point in having it recognize more than once per second or so, as it can only lead to overheating and reduced battery life. Just let Teradeep sleep for the remainder of a second in case it is now ready in a few tenths of a second. Then underclocking might not be necessary. However, I do not understand why Teradeep suddenly runs much faster on the RPi3. The RPi3 is up to some 50% faster than the RPi2 in general benchmarks, so Teradeep should then return a recognition result every 3 seconds or so instead of the earlier 5 seconds on the RPi2, but not much faster. It hints are some kind of bug, perhaps related to the RPi3 being 64-bit versus the RPi2 32-bit in case Teradeep code somewhere assumes 64-bit? However, neither Minibian nor Raspbian are 64-bit at the moment, so I'm not sure what to think of it.

Peter

User avatar
seeingwithsound
Posts: 165
Joined: Sun Aug 28, 2011 6:07 am
Contact: Website

Re: Sight for the Blind for <100$

Sat Mar 19, 2016 6:04 pm

mikey11 wrote:I will implement a contrast value that provides the experience people are expecting, and will need some feedback for this.
A good start is to add twice the difference between each pixel and the average of pixels over a camera frame, while guarding against values below 0 or above 255. I have updated the OpenCV sample code for The vOICe at http://www.seeingwithsound.com/im2sound ... ial_scenes with this basic contrast enhancement.

Peter

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Mon Mar 21, 2016 1:00 am

So, there have been a few hurdles over the past few days, and I think I'm coming around the bend on them a little bit.

Although everything appeared to be working, it became apparent this was not the case. The serial port on the raspberry pi v 3 was not functional. It seems like they did some strange thing where the baud rate moves around as the processor frequency dynamically changes; basically it was a software serial port. This led to problems. Luckily, I'm not the only one who likes using the serial port, and a workaround was made that remaps the hardware serial port to the typical behaviour of the rpi v 2/1.

The reason the foundation made this change is they gave the hardware serial port to the new bluetooth chip to use. While this will be great for serial over bluetooth, it breaks lots of projects out there.

It may be a caveat that we can't use the serial over bluetooth for a while until someone discovers a solution to the problem. This all transpired early in the month of March, so us getting the fix is right on schedule.

The problems with the power supply continue. I assumed my issue was the battery not being able to source the instantaneous demand. It turns out it is more related to the charging chip being used.

See here if you are bored: https://forums.adafruit.com/viewtopic.php?f=8&t=88137

Basically, the low battery light comes on way too early due to an AC signal that can span 150 mV. If I use the low battery indicator as a signal to shut down, it will mean very short battery life, and the battery will still have lots of charge. I have written software routines that deal with this as the light flashes on and off. I have a five minute timer that only continues if the light stays on. Then it forces a shut down. It still causes a shut down earlier than I would like, and there is still a lot of battery left before it gets to the critical lower voltage that lithium ion batteries should not be discharged past.

I assumed that the new battery pack did not have a protection circuit built in, but I cut the shell to one and it does. So the only reason to force a shutdown is to protect the file system.

I think the solution to this problem is for me to install a voltage measuring circuit that reports the battery voltage to the operating system. In this way I can monitor battery voltage and give an estimated % full/discharged.

I have decided to save this for if fundraising is successful. Until then, I am planning on the following: risking damage to the filesystem, but not worrying about the battery because the battery has its own protection circuit. I will notify the users every five minutes when the low battery signal has been on constantly for those five minutes and remind them to shutdown or plug in external power. It places the risk of damaging the filesystem in the hands of the users.

So, with these obstacles cleared for the moment, I am going to proceed with the update scripts, and adding them to the software driven menus on the settings menu.

For those who currently have a device, I will post a one time script here in the forum, and also on github. You will have to execute that script via ssh. After running that script via ssh, you should never need to use ssh again to upgrade or update software. The update function from the menu will handle this for the user automatically.

With that completed, I will start the experiment of updating users. who have various filesystem images, and different dependencies installed. No doubt it will be ugly, because I can't know exactly the configurations out there (I didn't keep track, it was too much work). However, I'm sure between two or three people any deficits will become clear. From the experience of rebuilding on the raspberry pi v 3. I believe this should be a manageable issue.

PranavLal
Posts: 124
Joined: Fri Jun 28, 2013 4:49 pm

Re: Sight for the Blind for <100$

Mon Mar 21, 2016 1:41 am

Hi Mikey11,

Make those notifications every 10 or 20 minutes. Every 5 minutes will become too annoying. Moreover, users will soon learn to ignore them so tell the user once and give an approximate time that the battery will last.
We can explain the technical limitations and state that if funding is successful, we will improve on this situation.

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Tue Mar 22, 2016 8:17 pm

I am making progress on the updater. In fact I would say I am about 50% complete.

Regarding the battery shutdown notice, I can increase it to ten minutes, but I have no way to estimate the life left in the battery. I expect different people to use different applications, and I am certain the consumption is higher with the vOICe and teradeep going than just face detection and distance sensing.

This is something that I will actually need to test drive with the pi v 3.

I am going to continue to use Mikael's update scripts he created, but just make them more complete to include new applications like the facial detection application. Each standalone application will get a script.

I am also going to add a dependency installer script. What I expect to happen with this is that when you try to install dependencies you already have, nothing gets downloaded. So we can keep reusing the dependency script until something changes with the dependencies to render the packages in the list obsolete. I'm actually quite keen to learn about creating my own package repository. I feel like this is actually the only way to be safe. It should be as simple as finding a hosting service, and creating a repository, then adding that address to the repository list on the After Sight hardware.

Of course I don't want people to have to depend on After Sight hosting the packages, but I also don't want to lose dependencies over time. This is already happening on raspbian for opencv2 apparently.

With all of this in place, each time an update occurs, the user will have a separate folder where a git pull is placed.

Once pulled, a script related to the update number the user is currently on will execute and will call the required update scripts for the dependency installer, the core files (python scripts in /home/pi), and then finally for the applications individually as required.

I will bug people for testing once it's ready.

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sight for the Blind for <100$

Sun Mar 27, 2016 2:28 am

So I have been quite busy getting the updating function to work. When I previously thought I was 50% complete, that was more like 10%.

I'm hoping Mikael can help me with this one:

Code: Select all

gcc -Wall -c -fopenmp -fPIC -D__NEON__ -mcpu=cortex-a7 -mfpu=neon -O3 test.c
gcc -Wall -c -fopenmp -fPIC -D__NEON__ -mcpu=cortex-a7 -mfpu=neon -O3 images.c
gcc -o test test.o images.o thnets.so -L./OpenBLAS-stripped -lopenblas -lm -lpng -ljpeg
g++ -O3 -Wall -c -fopenmp -fPIC -I../thnets -I/usr/include/freetype2 teradeep_opencv.cpp
teradeep_opencv.cpp: In function âint main(int, char**)â:
teradeep_opencv.cpp:230:9: warning: variable âfpsâ set but not used [-Wunused-but-set-variable]
   float fps = 1;
         ^
teradeep_opencv.cpp:145:14: warning: unused variable âwinnameâ [-Wunused-variable]
  const char *winname = "thnets opencv demo";
              ^
teradeep_opencv.cpp: At global scope:
teradeep_opencv.cpp:29:39: warning: âwin_widthâ defined but not used [-Wunused-variable]
 static int frame_width, frame_height, win_width, win_height;
                                       ^
teradeep_opencv.cpp:29:50: warning: âwin_heightâ defined but not used [-Wunused-variable]
 static int frame_width, frame_height, win_width, win_height;
                                                  ^
teradeep_opencv.cpp:105:12: warning: âint text(cv::Mat*, int, int, const char*, int, int)â defined but not used [-Wunused-function]
 static int text(Mat *frame, int x, int y, const char *text, int size, int color)
            ^
g++ -o teradeep_opencv teradeep_opencv.o -L/usr/local/lib -lopenblas -lm -lpthread -lfreetype -lopencv_highgui -lopencv_core -lopencv_imgproc -lGL -L/usr/local/lib -lthnets
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Makefile:23: recipe for target 'teradeep_opencv' failed
make: *** [teradeep_opencv] Error 1
What I've done is have the updating function do the following:

created an update number variable in the config file.
do a git pull
compare the current update number to the new number located in the freshly synced aftersight.cfg in /home/pi/After-Sight-Model-1

If the update has a newer number (and this is key. If you make an update, you must update aftersight.cfg and increment the update number) then it executes the following scripts:

installdeps.sh - install dependencies that it can, and then hold them so they don't get replaced with newer libraries. If something works, then we keep it. If we need to change it, the last step of updating is running a script that runs only once for that update. We can do it there. This is working well.

a-update_core.sh - update the core files (mostly python scripts, but also a few other files, all of which are in /home/pi), this includes the main menu system, facial detection, rangefinder code. This is working well.

a-update_voice.sh - update raspivoice (I had trouble with this on the rpi 3 because old dependencies have been updated. I had to do a lot of by hand installing/uninstalling/reinstalling libraries to get to the point where I can compile raspivoice reliably) older versions of the hardware should be fine because they should already have all the needed libraries installed. This works well now.

a-update_teradeep.sh - update teradeep - This is where the trouble got over my head. At the current time, I am highly tempted to comment this out from the updates until I have more time to delve into the problems. I embedded the error message above. I will admit it: cpp scares the living daylights out of me.

a-update_facedetect.sh - update facial detection directory. This is for if I advance from the 15 year old cascade method to something more modern.

one-time scripts function - not implemented yet. I am planning on making a folder for each update version that requires it. This will execute shell scripts once, and then never again. This would be for things like adding new features where you need to do something like create a folder structure and store new files. Or, possibly something like forcing the download of a new model file for teradeep. I am going to try my damnedest to get this working ASAP. As this is a nice way of making the device adaptable in the future.

So my proximal goals are to have everything but the teradeep update working. I can later fix the teradeep update problem with a custom one time executed script. This will give me something that we can test on the older devices, to try to keep them in sync as well.

As far as I know there is no reason why the rpi2 and rpi3 are not going to work well together from the software update perspective. Of course we will have to add some conditional code to determine if the device is one version or the other for some functions, but for the most part it should be fine.

Eventually, I hope everyone with an older device will get a newer one and we can leave the rpi2 in the past. Everything has an end of life.

I am expecting to have the above goals completed before midnight tomorrow. (A guy can hope anyways).

Return to “Assistive technology and accessibility”