BREAKING NEWS

06 November 2015

Mapillary on Raspberry Pi

Since recently I have become fan community mapillary and his project, I've seen people use their smartphone, GoPro and some other type of cameras to map your city, that's why I made ​​this project to map my city with a Raspberry Pi based on the draft Picamera of Adafruit , Sounds great right? This project was made ​​during the BuildNight Brown Dog Gadgets in The Inventor's House . Let's begin !!


Material needed







To replicate this project need
  • Raspberry Pi B

Step 2: Installation of PiTFT

The first thing to configure is the TFT screen that's a good tutorial on adafruit that need not be repeated
Adafruit PiTFT - 2.8 "Touchscreen Display for Raspberry Pi
After that we install the following
sudo apt-get install python-pip
<br> sudo pip install == 0.8 picamera
sudo pip install python-dateutil

Step 3: Install GPS

Picture of Installation of GPS
Now we must first install the following for our application and GPS to work properly, the serial port 'dev / ttyAMA0' is not available by default in the Raspberry Pi and you have to unlock it. For this will open the '/boot/cmdline.txt' file and change:
dwc_otg.lpm_enable = 0 = console = ttyAMA0,115200 kgdboc ttyAMA0,115200 console = tty1 root = / dev / ext4 mmcblk0p2 rootfstype = elevator = deadline rootwait
by
dwc_otg.lpm_enable = 0 console = tty1 root = / dev / ext4 mmcblk0p2 rootfstype = elevator = deadline rootwait
Then we open the file '/ etc / inittab' last line put a '#'. Change:
T0: 23: respawn: / sbin / getty -L ttyAMA0 115200 vt100
by
# T0: 23: respawn: / sbin / getty -L ttyAMA0 115200 vt100
For these changes to take effect restart the Raspberry Pi, once we restarted and ready to use the serial port, install Now run the following command to install the necessary
sudo apt-get install gpsd gpsd-clients python-gps
sudo gpsd / dev / -F ttyUSB0 /var/run/gpsd.sock
To confirm that our GPS is working properly can run the following command
sudo cat / dev / ttyAMA0
And finally we need
pip install exifread
This step is based on the good tutorial: http://fpaez.com/tracker-gps-con-raspberry-pi/

Step 4: mapillary Tools

Picture of mapillary Tools
api.mapillary.com v1 or uploadhashes.png
To upload your photos to mapillary must first download the tools that we provide for python: D
git clone https://github.com/mapillary/mapillary_tools
You downloaded one you see our Upload Scripts must enter with our own mapillary loggeados in the next page for our two hashes and achieve authentication to upload pictures from our Raspberry Pi, keep the data for the next step.
To view all scripts functionality can visit the blog mapillary

 Installing Picamera





Now we clone the repository follows from our Raspberry Pi
git clone https://github.com/sabas1080/RaspberryPi_Mapillary
or we can also download the zip
wget https://github.com/sabas1080/RaspberryPi_Mapillary/archive/master.zip
and now decompress
unzip master.zip
We have all ready entered our folder
cd RaspberryPi_Mapillary
cam.py edit on file with the command
sudo nano cam.py
And we changed the following values ​​so obtained in the previous step
#Mapillary Environment variables 

os.environ ["MAPILLARY_SIGNATURE_HASH"] = "your signature hash"

os.environ ["MAPILLARY_PERMISSION_HASH"] = "your permission hash"

os.environ ["MAPILLARY_USERNAME"] = "your user name in mapillary"
Once we changed that we press CTRL + X and save the changes, we have everything ready, finally run
sudo python cam.py
NOTE: A possible error when running do not find the folder icons or tools mapillary only change the direction of our own folder in the file cam.py

 Ready to Map !










For this step and you should be working with your Raspberry Pi mapillary (if you have any problems leave your question in the comments)
In our settings menu is a section called mapillary with three icons
  • GPS Mode Displays GPS status -
    • Color Green - Working
    • Yellow - Not Detected
    • Red - Stopped
  • Camera Mode - Displays job status of the House
    • Normal camera or Manual
    • Continuous automatic camera takes pictures (BUG: not working properly)
  • Upload mapillary - Execute photo uploads mapillary server
    • Automatically arranges the photos by date, location and uploaded to the server (BUG: No distinguishes between photos and rises above or recently taken)
I leave some photos taken from my Raspberry in the Barrio de Guadalupe is where hackerpsace The Inventor's House during my tests
If you want to make the Raspberry Pi camera mode automatically starts can edit the /etc/rc.local file as shown in the last image.
As you can tell the photos taken are of good quality, the application still has a bug on the part of continuous or automatic camera but I hope one interested in the project can help improve that part, I hope you like and join the community .
Inventors greetings !!

Share this:

Post a Comment

 
Back To Top
Distributed By Blogger Templates | Designed By OddThemes