Close
0%
0%

Pi-ADAS

A raspberry-pi based platform for the capture of road data-set and the development of vision-based ADAS functions

Similar projects worth following
This a projet aims at developping a raspberry-pi based platform for the capture of road data-sets, the development of vision-based ADAS functions. The platform uses a raspberry-pi 3 together with the raspberry-pi camera (v1 or v2) in a 3D printed enclosure. The software is based on ROS to allow for the development of additional modules. There is no display attached to the platform but camera images or processing results can be streamed to a ROS master that will handle the display and additional functions (to be defined).
In its current state the platform is used to create ROS-bags at the press of a button for the evaluation of SLAM implementations.

Two version of enclosures were designed : One version uses a go-pro mount and the v1 camera with m12 lens mount, the other version is designed to be used with the official v2 camera and to be mounted closer to the car windshield.






The project uses a highly modified version of the existing pi camera ROS node. The node was modified to publish bot a RAW grayscale image and a JPEG encoded image. This allow to use the RAW image for local processing and to publish the JPEG image to a ROS node connected to the WIFI network of the raspberry-pi with very low cpu-usage (the JPEG encoding is managed by the PI3 image processing pipeline).

  • First road test

    piat.jonathan01/20/2017 at 10:19 0 comments

    I

    took the box for a road test and grabbed my first set of sequences. The setup to mount the camera was ugly, but i'll try to design windshield mount.

    The box was held "firmly" to the windshield using a tissue box, and the capture were triggered just by pressing the yellow button.

    On some video there is reflections on the windshield but all in all i'am quite happy with the result. The camera will be mounted higher in a near future.

  • Adding buttons and switches

    piat.jonathan01/11/2017 at 11:24 0 comments

    Now that i have the platform i needed a way to make it convenient to use while in the car. At first i tried using it with no physical niput but it required to :

    • have a laptop or phone connected to the device via wifi (the Pi acts as an access point)
    • connect via SSH and trigger the script to capture a sequence
    • drive ...
    • transfer the bag to a usb key and shutdown the Pi through ssh
    • when hoem and working on the Pi, switch the WIFI to host to have it to connect to my home router

    All these steps prevented me from really doing capture on road. I did it once with the laptop on the passenger seat and a road bump throwed the laptop down in the car. What i wanted to have is a setup similar to an action camera :

    • no display (because i don't need one and its bulky)
    • a switch to switch between AP and host for th Pi Wifi
    • one button to trigger capture
    • indicator to see if the capture is ongoing
    • no need to copy files to usb key by hand

    I ended up soldering a small stripboard PCB with one button, one led, a set of switches.

    The board is connected to the Pi with only two IOs (only one of the switches is used for now). One GPIO is connected to the push button and drives the LED, one GPIO is connected to one of the switches. I setup daemons on the raspberry pi to :

    • monitor changes on the switch and change the WIFI behavior accordingly
    • monitor falling edges on the button and trigger a 2min capture

    The script for the wifi is fairly simple as it only move configuration files around and reboot the pi3 wifi, but the button handling script does more. The button is configured to that it will ground the IO when pressed. The cathode of the LED is connected to the IO and the anode is connected to 5v through a 220ohm resistor. When pressed the button will light the LED, the script will detect the falling edge on the Pi input and switch the IO direction from input to output and with low level which will keep the led lit even if the button is released. After the that the script tries to mount a USB key connected to the PI, trigger the capture with bag file saved to the USB key. When the capture ends, the script umount the USB key, and get the IO back to its input state. As a consequence the led is lit while the capture is running and turns off when the user can remove the USB key. This means that to capture a sequence i just need to press a button, drive around and wait for the LED to turn off. Then i can tae the USB key and play the files on my laptop.

    The next step is to add functionalities with the other switches, such as : configure capture time, change resolution ...

    Next step is to design a 3D printed mounting to attach the camera to the windshield !

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates