Elisa and Omnivision Module V2: Difference between pages

From GCtronic wiki
(Difference between pages)
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
Line 1: Line 1:
{| style="color:black; background-color:#ffffcc;" cellspacing="0" border="1"
=Overview=
|
<span class="plainlinks">[https://www.gctronic.com/doc/images/omnivision-v2-epuck-3.jpg <img width=200 src="https://www.gctronic.com/doc/images/omnivision-v2-epuck-3-small.jpg">]</span>
<font style="color:red"> '''The Elisa robot is no more produced. It's subsituted by Elisa-3, its more powerful successor!''' </font>
<span class="plainlinks">[https://www.gctronic.com/doc/images/omnivision-v2-epuck-2.jpg <img width=200 src="https://www.gctronic.com/doc/images/omnivision-v2-epuck-2-small.jpg">]</span>
|}
<span class="plainlinks">[https://www.gctronic.com/doc/images/omnivision-v2-epuck-4.jpg <img width=200 src="https://www.gctronic.com/doc/images/omnivision-v2-epuck-4-small.jpg">]</span> <br/>
The omnivision module is upgraded with a microcontroller directly mounted on the extension that is responsible of handling the 3 RGB leds; the power of the leds can be set through I2C.<br/>
The camera mounted on the extension is an USB 2.0 camera with a maximum resolution of 1280x1024 and a potential framerate of 30 fps. Omnivision module may contain different image sensors depending on shipment date, in particular:
* the Targus Micro Webcam
* the Trust SpotLight Pro
The robot frontal camera below can still be used independently since this camera is connected either to the USB OTG or to the USB HOST of the e-puck gumstix extension.


The field of view is up to about 7 degrees over the horizon for the Trust SpotLight Pro, as shown in the following figure:<br/>
<span class="plainlinks">[https://www.gctronic.com/doc/images/omnivision-trust-fieldview.jpg <img width=400 src="https://www.gctronic.com/doc/images/omnivision-trust-fieldview.jpg">]</span><br/>
The same apply for the Targus camera as shown in the following figure:<br/>
<span class="plainlinks">[https://www.gctronic.com/doc/images/omnivision-targus-fieldview.jpg <img width=400 src="https://www.gctronic.com/doc/images/omnivision-targus-fieldview.jpg">]</span>


==Camera specification==
{| cellspacing="0" border="1"
|Name
|<b>Targus Micro Webcam AVC05EU</b>
|<b>Trust SpotLight Pro</b>
|-
|Supported resolutions
|1280x1024, 640x480, 352x288, 176x144, 160x120
|1280x1024, 640x480, 352x288, 176x144, 160x120
<!-- |-
|Viewing angle, horizontal
|66.5 °
| -
-->
|-
|Maximum frame rate
|30 fps
|30 fps
|-
<!--
|Sensor type
|CMOS
|
-->
<!--
|-
|Camera focusing range
|0.3 m - infinite
| -
-->
<!--
|-
|Consumption
| about 150 mA (active)
|
-->
<!--
|Chipset
|
| Microdia
-->
|}


=Overview=
=Getting started=
Elisa it's a small size robot with 5 cm of diamater, capable of moving also vertically thanks to its magnetic wheels. It includes:
* pic microcontroller ([https://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en536114 PIC24FJ64GA104])
* RGB led
* IRs emitters
* accelerometer
* RF radio for communication
* IR receiver
* DC motors
* diffuser


<span class="plainlinks">[https://www.gctronic.com/doc/images/Elisa_and_charger_text.jpg <img width=400 src="https://www.gctronic.com/doc/images/Elisa_and_charger_text.jpg">]</span> <br/>
==1. Software==
As with the gumstix extension, a specific firmware must be charged on the e-puck when working with this extension, it can be downloaded from section [https://www.gctronic.com/doc/index.php/E-Puck#Standard_firmware E-Puck#Standard_firmware]. Remember to put the selector in position 10.<br/>
The system on the micro sd is the same used for the gumstix extension alone, refer to section [https://www.gctronic.com/doc/index.php/Overo_Extension#File_system_image https://www.gctronic.com/doc/index.php/Overo_Extension#File_system_image] for more informations.


The robot is equipped with two batteries for a duration of up to 4 hours, about 2 hours at normal usage (motors run continuously, IRs and RGB leds turned on).
==2. Terminal configuration==
Execute a terminal program (e.g. minicom) and configure the connection with 115200-8N1. The serial device path should be typically something like "/dev/ttyUSB0". Make sure that the flow control parameter of minicom called "Hardware" is set to "No".
Once the boot is terminated login with user=root and password=root.


=Getting started=
==3. WiFi==
==1. Install the radio base-station driver==
The nano WiFi dongle shipped with the extension board is an Edimax EW-7811Un, based on a Realtek chipset (RTL8192cu).
The base-station requires a driver in order to be correctly recognized, the driver is contained in the [https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-Studio nRFgo-Studio] utility; once the utility is installed the radio will be automatically recognized.
The device isn't recognized automatically at boot, so you need to follow these steps in order to enable and use it:
# turn on the robot and login with user=root, password=root
# if the WiFi dongle is connected to the USB OTG you need to activate typing ''./scripts/gumstix-common/usbenable otg''
# type ''insmod 8192cu.ko'' (the kernel module is located in /home/root); the wifi dongle should be recognized and a wlanX device created
# type ''ifconfig wlanX up'' (where X is a number) to turn on the device; now the wifi can be configured and used normally


==2. Software==
=RGB leds=
The Elisa robot has to be charged with either the official released firmware or with a custom firmware; pay attention that the custom firmware must configure the radio in the same way as the official firmware otherwise the communication with the base-station will not work. For more information and source code refer to the [https://www.gctronic.com/doc/index.php/Elisa#Elisa Elisa software section].
The RGB leds can be controlled from the ''gumstix-side'' through the I2C (400 KHz). The I2C address is 0x61 and to change the leds state all the values for each led need to be sent as follow: R1, G1, B1, R2, G2, B2, R3, G3, B3. <br/>
Once logged in it's possible to execute a demo to pilote all the 3 RGB leds through I2C:
* type ''./demos/omnivision-v2/omnivision-i2c R1 G1 B1 R2 G2 B2 R3 G3 B3'' where the Rx,Gx,Bx are the values you would like to set (ranging from 0 to 255)
You can download the source code from the following link [https://projects.gctronic.com/omnicam/omnivision-i2c-clean.c omnivision-i2c-clean.c].<br/>
It was noticed that when the leds are turned on they can somehow create some reflex in the resulting image; in order to avoid this effect a simple solution would be to put a small piece of black tape on top of them.


==3. Demo==
Refer to the section [https://www.gctronic.com/doc/index.php/Overo_Extension#3.3V_and_5V_source https://www.gctronic.com/doc/index.php/Overo_Extension#3.3V_and_5V_source] for more information about the RGB usage.
Once the radio is connected to the pc through usb and the robot is turned on, it's possible to execute a [https://projects.gctronic.com/elisa/pc-side.zip demo]; this demo continuously sends new RGB and motors values to the robots. If all is working well the robot should turn on all the three RGB leds, or one of them depending on the robot address, in increasing level of intensitiy. For more information and source code refer to [https://www.gctronic.com/doc/index.php/Elisa#PC_side PC-side software section].


=Communication=
=Camera=
The radio base-station is connected to the PC through USB and transfers data to and from the robot wirelessly. In the same way the radio chip ([https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01P nRF24L01+]) mounted on the robot communicates through SPI with the microcontroller and transfers data to and from the PC wirelessly. <br/>
If the camera is connected to the USB OTG port you need to issue the following command to enable it (from ''/home/root/scripts/gumstix-common/'' directory):
<span class="plainlinks">[https://www.gctronic.com/doc/images/Elisa-communication.jpg <img width=400 src="https://www.gctronic.com/doc/images/Elisa-communication.jpg">]</span> <br/>
<pre>
./usbenable otg
</pre>
After this command a new device (''/dev/video1'') should be created automatically. <br/>
If the camera is connected to the USB HOST port then the camera is recognized automatically and the device ''/dev/video1'' should be already available.<br/>


==Packet format - PC to robot==
==Image streaming==
The 7 bytes payload packet format is shown below:
You can test and see the camera image using mjpeg-streamer; this tool is already configured with a web server in the system image so you can follow these steps:
{| border="1"
# configure the network in order to be able to communicate between the gumstix and the computer
|Command
# issue the following commands:
|Red led
<pre>
|Blue led
export LD_LIBRARY_PATH=/usr/local/mjpg-streamer/:$LD_LIBRARY_PATH
|Green led
/usr/local/mjpg-streamer/mjpg_streamer -i "input_uvc.so -y -d /dev/video1" -o "output_http.so -p 8090 -w /usr/local/mjpg-streamer/www"
|IR + Flags
</pre>
|Right motor
# open a browser in the computer and insert the address ''https://gumstix-ip:8090'' where ''gumstix-ip'' is the network address assigned to the gumstix
|Left motor
You can use also your phone to access the webserver.
|}
The following figure shows an example of a 640x480 image received through the broswer: <br/>
<span class="plainlinks">[https://www.gctronic.com/img2/omnivision-v2-image640x480.jpg <img width=200 src="https://www.gctronic.com/img2/omnivision-v2-image640x480-small.jpg">]</span> <br/>
For the post-processing of the image refers to the section [https://www.gctronic.com/doc/index.php/Omnivision_Module#Image_unwrapping https://www.gctronic.com/doc/index.php/Omnivision_Module#Image_unwrapping].<br/>


* Command: 0x27 = change state; 0x28 = goto bootloader (base-station)
==Image grabbing==
* Red, Blue, Green leds: values from 0 (OFF) to 100 (ON max power)
===Video 4 linux===
* IR + flags:
The [https://www.gctronic.com/doc/index.php/Overo_Extension#Images_grabbing_.28camera_driver.29 ''v4l2grab'' application] can be used to grab an image from the camera with the following command:
** first two bits are dedicated to the IRs:
<pre>
*** 0x00 => all IRs off
./v4l2grab -d /dev/video1 -o image.jpg -f 1 -W 352 -H 288
*** 0x01 => back IR on
</pre>
*** 0x02 => front IRs on
*** 0x03 => all IRs on
** third bit is reserved for enabling/disablng IR remote control (0=>diabled, 1=>enabled)
** fourth bit is reserved for sleep (1 => go to sleep for 1 minute)
* Right, Left motors: speed (in percentage); MSBit indicate direction: 1=forward, 0=backward; values from 0 to 100
Once the robot receives a new packet it returns its battery level to the base-station (one byte ack payload). <br/>
Both the packet format and the content of the feedback returned by the robot can be easily modified in the software.
 
<!--
===Optimized protocol===
- due to USB delay (master polling every ms)
- packet contains command for 4 robots simoultaneously
- ack returned must be up to 16 bytes (max 64 bytes for the usb buffer); the same number of bytes returned by the robot as ack payload has to be read then by the pc!!
- la base-station ritorna "2" quando l'ack non è stato ricevuto;
-->


=Software=
<!--<font style="color:red"> The current driver (UVC) of the system image supports only resolution up to 640x480.</font>-->
<font style="color:red"> Currently the maximum resolution is 352x288 from the OTG port, we're working to solve this limitation. From the USB HOST there is no known limitation.</font>


==Elisa==
===OpenCV===
The project is built with Microchip MPLAB IDE; the code to configure the radio is in "nrf.c" <br/>
An example demo was implemented to show how to interact with OpenCV and the Omnvision extension. In this demo a color blob is tracked; the target color range need to be passed as argument (HSV color space), the parameters in sequence are: <code>Hmin Hmax Smin Smax Vmin Vmax debugFlag</code> (values between 0 and 255, debugFlag = 0 or 1). The robot is rotated in place to track the detected blob.
The project source can be downloaded from [https://projects.gctronic.com/elisa/elisa-firmware.zip Elisa firmware]. <br/>
You can download the source code from the following link [https://projects.gctronic.com/omnicam/blob-tracking-opencv-rev10.zip blob-tracking-opencv.zip].<br/>
Selector position:
In order to build the code follow these steps:
* 0: no controller activated (free running)
# install the toolchain: <code>sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi</code>
* 2: speed controller activated
# build using the makefile included in the zip file: <code>make</code>
Before running the application you need to update some libraries on the gumstix system following these steps (this need to be done only once):
# configure the network in order to have internet access
# update the package manager repo: <code>echo 'src/gz base https://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/base/' > /etc/opkg/base-feed.conf</code>
# add <code>arch armv7a-vfp-neon 45</code> to the file <code>/etc/opkg/arch.conf</code>
# <code>opkg update</code>
# <code>opkg install libc6</code>
# <code>opkg install libstdc++6</code>
# optionally you can also remove some warnings related to the update by running the following script [https://projects.gctronic.com/omnicam/remove-warnings.sh remove-warnings.sh]
Once the system is updated, you can copy the executable <code>omniOpenCVblobDetection</code> on the gumstix system and run it. Basically with the HSV range you define a target color, then once the application is started you can move the target around the robot and the robot should try to orient towards it.


==Base-station==
==Settings==
The project is built with [https://www.keil.com/uvision/ Keil uVision] for 8051 processor and then you'll need another tool for flashing a custom firmware to the radio base-station, that is the [https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-Studio nRFgo-Studio]. The source can be downloaded from [https://projects.gctronic.com/elisa/base-station.zip base-station firmware]. <br/>
You can modify the camera parameters to better suit your needs, here are the steps to install the <code>v4l2-ctl</code> utility for doing that:
In order to build the project you need the [https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-SDK nRFgo SDK]; once installed, you should find the SDK environment under ''C:\Nordic Semiconductor\nRFgo SDK 2.2.0.270''. <br/>
# configure internet access
The ''ptx'' example you can find in the directory ''C:\Nordic Semiconductor\nRFgo SDK 2.2.0.270\source_code\projects\nrfgo_sdk\enhanced_shockburst_examples'' was taken as the starting point for the base-station firmware. To build the projcet you need to put the firmware project directory within the ''C:\Nordic Semiconductor\nRFgo SDK 2.2.0.270\source_code\projects\nrfgo_sdk\enhanced_shockburst_examples'' directory to satisfy the references and then you can simply open the uVision project file ''enhanced_shockburst_ptx_nrf24lu1p.uvproj'' you find under ''\base-station\Keil\nRF24lu1p''.
# make a copy of the current repo for the package source: <code>mv /etc/opkg/base-feed.conf /dest-dir</code>
# add the new repo: <code>echo 'src/gz base https://feeds.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base' > /etc/opkg/base-feed.conf</code>
# issue the command <code>opkg update</code>
# place the file [https://projects.gctronic.com/omnicam/v4l-utils_0.8.1-r0.6_armv7a.ipk v4l-utils_0.8.1-r0.6_armv7a.ipk] in the home directory and then issue: <code>opkg install v4l-utils_0.8.1-r0.6_armv7a.ipk</code>


===Bootloader===
Once you install the utility, you can have a list of all available camera parameters by issueing the command <code>v4l2-ctl -L</code>.<br/>
The base-station firmware contains a bootloader that can be used to update the functionalities of the module; in order to upload a new firmware follow these steps:
For example to change the saturation you issue the command: <code>v4l2-ctl --device=1 -c saturation=128</code>
# plug the base-station to the pc through the usb; it will be recognized as a ''WinUSB'' device
# download the application [https://projects.gctronic.com/elisa/goto-bootloader.zip goto-bootloader] and run it; once executed you should see a message saying that the bootloader is entered
# now start the nRFgo Studio utility; on the left side you should find the base-station module recognized as a bootloader device, select it; on the right side you should be able to select your firmware and click ''Program''; after a few seconds you should receive a message saying the upload was successfull
# once the upload is finished you need to unplug and plug again the usb cable (power-off and on) in order to enter your main program
<!-- esiste anche un bootloader linux pc-side => not tested-->.


==PC side==
=Charging=
===Windows===
The omnivsion module incorporates an additional battery that can be charged with the e-puck battery charger, but it needs cabling (provided together with the extension) as illustrated in the following figures: <br/>
The project is built with [https://www.codeblocks.org/ Code::Blocks (mingw)] and sends data to 100 robots address 3010 to 3110) printing statistical information at the end of the transmission; in this demo it's suppposed that the robots return only one byte as response/ack payload. <br/>
<span class="plainlinks">[https://www.gctronic.com/doc/images/omnivision-v2-epuck-charger.jpg <img width=200 src="https://www.gctronic.com/doc/images/omnivision-v2-epuck-charger-small.jpg">]</span>
The project requires [https://www.libusb.org/wiki/libusb-1.0 libusb-1.0] since it is used to communicate with the radio base-station: [https://libusb-winusb-wip.googlecode.com/files/libusb_2011.07.06.7z https://libusb-winusb-wip.googlecode.com/files/libusb_2011.07.06.7z]. <br/>
<span class="plainlinks">[https://www.gctronic.com/doc/images/omnivision-charger-soldering.jpg <img width=200 src="https://www.gctronic.com/doc/images/omnivision-charger-soldering-small.jpg">]</span>
The source can be downloaded from [https://projects.gctronic.com/elisa/pc-side.zip windows demo]. <br/>
Execution:
* install the driver contained in the [https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-Studio nRFgo Studio tool] if not already done; this let the base-station be recognized as a WinUSB device (bootloader), independently of whether the libusb library is installed or not
* once the driver is installed, the pre-compiled "exe" (under \bin\Debug dir) should run without problems
Compilation-windows:
*  within the libusb-1.0 package you'll find the header "libusb.h" (under /include/libusb-1.0/) and the library "libusb-1.0.a" (in this case under /MinGW32/static/ since we use MinGW) that should be copied or referenced in the compiler headers/libraries
* add the linker flag "-lusb-1.0" in the project in order to build successfully (the Code::Blocks project has already set it)


===Linux===
=Extension firmware=
The linux pc-side application "main_linux.c" send data to four robots and print the related battery level; in this demo it's suppposed that the robot returns only one byte as response/ack payload. <br/>
The firmware programmed in the microcontroller mounted on the extension is freely available from the following link [https://projects.gctronic.com/omnicam/omnivision-uc-firmware.zip omnivision-uc-firmware.zip]. The project is created with MPLAB IDE from Microchip.
The libusb-1.0 library required for compilation can be downloaded from [https://sourceforge.net/projects/libusb/ https://sourceforge.net/projects/libusb/]; alternatively you can simply type ''sudo apt-get install libusb-1.0'' depending on your system. <br/>
The souce code can be downloaded from [https://projects.gctronic.com/elisa/main_linux.c linux demo]. <br/>
Compilation: gcc -o main_linux main_linux.c -lusb-1.0 <br/>
Execution: sudo ./main_linux <br/>

Latest revision as of 11:49, 27 January 2023

Overview


The omnivision module is upgraded with a microcontroller directly mounted on the extension that is responsible of handling the 3 RGB leds; the power of the leds can be set through I2C.
The camera mounted on the extension is an USB 2.0 camera with a maximum resolution of 1280x1024 and a potential framerate of 30 fps. Omnivision module may contain different image sensors depending on shipment date, in particular:

  • the Targus Micro Webcam
  • the Trust SpotLight Pro

The robot frontal camera below can still be used independently since this camera is connected either to the USB OTG or to the USB HOST of the e-puck gumstix extension.

The field of view is up to about 7 degrees over the horizon for the Trust SpotLight Pro, as shown in the following figure:

The same apply for the Targus camera as shown in the following figure:

Camera specification

Name Targus Micro Webcam AVC05EU Trust SpotLight Pro
Supported resolutions 1280x1024, 640x480, 352x288, 176x144, 160x120 1280x1024, 640x480, 352x288, 176x144, 160x120
Maximum frame rate 30 fps 30 fps

Getting started

1. Software

As with the gumstix extension, a specific firmware must be charged on the e-puck when working with this extension, it can be downloaded from section E-Puck#Standard_firmware. Remember to put the selector in position 10.
The system on the micro sd is the same used for the gumstix extension alone, refer to section https://www.gctronic.com/doc/index.php/Overo_Extension#File_system_image for more informations.

2. Terminal configuration

Execute a terminal program (e.g. minicom) and configure the connection with 115200-8N1. The serial device path should be typically something like "/dev/ttyUSB0". Make sure that the flow control parameter of minicom called "Hardware" is set to "No". Once the boot is terminated login with user=root and password=root.

3. WiFi

The nano WiFi dongle shipped with the extension board is an Edimax EW-7811Un, based on a Realtek chipset (RTL8192cu). The device isn't recognized automatically at boot, so you need to follow these steps in order to enable and use it:

  1. turn on the robot and login with user=root, password=root
  2. if the WiFi dongle is connected to the USB OTG you need to activate typing ./scripts/gumstix-common/usbenable otg
  3. type insmod 8192cu.ko (the kernel module is located in /home/root); the wifi dongle should be recognized and a wlanX device created
  4. type ifconfig wlanX up (where X is a number) to turn on the device; now the wifi can be configured and used normally

RGB leds

The RGB leds can be controlled from the gumstix-side through the I2C (400 KHz). The I2C address is 0x61 and to change the leds state all the values for each led need to be sent as follow: R1, G1, B1, R2, G2, B2, R3, G3, B3.
Once logged in it's possible to execute a demo to pilote all the 3 RGB leds through I2C:

  • type ./demos/omnivision-v2/omnivision-i2c R1 G1 B1 R2 G2 B2 R3 G3 B3 where the Rx,Gx,Bx are the values you would like to set (ranging from 0 to 255)

You can download the source code from the following link omnivision-i2c-clean.c.
It was noticed that when the leds are turned on they can somehow create some reflex in the resulting image; in order to avoid this effect a simple solution would be to put a small piece of black tape on top of them.

Refer to the section https://www.gctronic.com/doc/index.php/Overo_Extension#3.3V_and_5V_source for more information about the RGB usage.

Camera

If the camera is connected to the USB OTG port you need to issue the following command to enable it (from /home/root/scripts/gumstix-common/ directory):

./usbenable otg

After this command a new device (/dev/video1) should be created automatically.
If the camera is connected to the USB HOST port then the camera is recognized automatically and the device /dev/video1 should be already available.

Image streaming

You can test and see the camera image using mjpeg-streamer; this tool is already configured with a web server in the system image so you can follow these steps:

  1. configure the network in order to be able to communicate between the gumstix and the computer
  2. issue the following commands:
export LD_LIBRARY_PATH=/usr/local/mjpg-streamer/:$LD_LIBRARY_PATH
/usr/local/mjpg-streamer/mjpg_streamer -i "input_uvc.so -y -d /dev/video1" -o "output_http.so -p 8090 -w /usr/local/mjpg-streamer/www"
  1. open a browser in the computer and insert the address https://gumstix-ip:8090 where gumstix-ip is the network address assigned to the gumstix

You can use also your phone to access the webserver. The following figure shows an example of a 640x480 image received through the broswer:

For the post-processing of the image refers to the section https://www.gctronic.com/doc/index.php/Omnivision_Module#Image_unwrapping.

Image grabbing

Video 4 linux

The v4l2grab application can be used to grab an image from the camera with the following command:

./v4l2grab -d /dev/video1 -o image.jpg -f 1 -W 352 -H 288

Currently the maximum resolution is 352x288 from the OTG port, we're working to solve this limitation. From the USB HOST there is no known limitation.

OpenCV

An example demo was implemented to show how to interact with OpenCV and the Omnvision extension. In this demo a color blob is tracked; the target color range need to be passed as argument (HSV color space), the parameters in sequence are: Hmin Hmax Smin Smax Vmin Vmax debugFlag (values between 0 and 255, debugFlag = 0 or 1). The robot is rotated in place to track the detected blob. You can download the source code from the following link blob-tracking-opencv.zip.
In order to build the code follow these steps:

  1. install the toolchain: sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
  2. build using the makefile included in the zip file: make

Before running the application you need to update some libraries on the gumstix system following these steps (this need to be done only once):

  1. configure the network in order to have internet access
  2. update the package manager repo: echo 'src/gz base https://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/base/' > /etc/opkg/base-feed.conf
  3. add arch armv7a-vfp-neon 45 to the file /etc/opkg/arch.conf
  4. opkg update
  5. opkg install libc6
  6. opkg install libstdc++6
  7. optionally you can also remove some warnings related to the update by running the following script remove-warnings.sh

Once the system is updated, you can copy the executable omniOpenCVblobDetection on the gumstix system and run it. Basically with the HSV range you define a target color, then once the application is started you can move the target around the robot and the robot should try to orient towards it.

Settings

You can modify the camera parameters to better suit your needs, here are the steps to install the v4l2-ctl utility for doing that:

  1. configure internet access
  2. make a copy of the current repo for the package source: mv /etc/opkg/base-feed.conf /dest-dir
  3. add the new repo: echo 'src/gz base https://feeds.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base' > /etc/opkg/base-feed.conf
  4. issue the command opkg update
  5. place the file v4l-utils_0.8.1-r0.6_armv7a.ipk in the home directory and then issue: opkg install v4l-utils_0.8.1-r0.6_armv7a.ipk

Once you install the utility, you can have a list of all available camera parameters by issueing the command v4l2-ctl -L.
For example to change the saturation you issue the command: v4l2-ctl --device=1 -c saturation=128

Charging

The omnivsion module incorporates an additional battery that can be charged with the e-puck battery charger, but it needs cabling (provided together with the extension) as illustrated in the following figures:

Extension firmware

The firmware programmed in the microcontroller mounted on the extension is freely available from the following link omnivision-uc-firmware.zip. The project is created with MPLAB IDE from Microchip.