Difference between revisions of "R-Car/Boards/ADAS-View-Solution-Kit"

From eLinux.org
Jump to: navigation, search
(Legacy BSP)
 
(8 intermediate revisions by the same user not shown)
Line 21: Line 21:
 
Please follow these instruction to build BSP http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Building_the_BSP_for_Renesas_ADAS_boards:
 
Please follow these instruction to build BSP http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Building_the_BSP_for_Renesas_ADAS_boards:
  
At step 8 use h3ulcb target name
+
At step 8 use h3ulcb target name <br/>
 
At step 16 use images for View ADAS Starter Kit board.
 
At step 16 use images for View ADAS Starter Kit board.
  
Line 30: Line 30:
  
 
=== Flashing firmware ===
 
=== Flashing firmware ===
In case you have absolutely new R-Car H3 or M3 board, you need to update firmware.  
+
Please follow these instruction to flashing firmware http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Flashing_firmware (optional step)
Please refer to page [[R-Car/Boards/H3SK |R-Car H3SK]] or [[R-Car/Boards/M3SK |R-Car M3SK]] for the instructions
 
on flashing firmware.
 
  
 
=== U-Boot Environment ===
 
=== U-Boot Environment ===
For using view board you need to use *-view.dtb file. The example of setting U-Boot environment for booting from SD card:
+
 
 +
Please follow these instruction to  boot from SD card http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Configure_U-Boot_to_boot_from_SD_card <br/>
 +
For View board you must use one of the following dtb files:  
 
<pre>
 
<pre>
# In U-Boot prompt
+
Image-es1-r8a7795-h3ulcb-view.dtb
setenv bootargs 'root=/dev/mmcblk1p1 rootwait consoleblank=0 log_buf_len=1M'
+
Image-r8a7795-h3ulcb-view.dtb
setenv bootcmd 'ext4load mmc 0 48080000 /boot/Image; ext4load mmc 0 48000000 /boot/r8a7795-h3ulcb-view.dtb; booti 48080000 - 48000000'
 
saveenv
 
 
</pre>
 
</pre>
  
 
=== ADAS test applications ===
 
=== ADAS test applications ===
==== SurroundView GPU version ====
+
Please follow these instruction to build and use ADAS tests http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#ADAS_test_applications
<ol>
 
<li>
 
Clone and build sv-utest application (see the README.md file as well):
 
<pre>
 
git clone https://github.com/CogentEmbedded/sv-utest.git
 
cd sv-utest
 
. <SDK_INSTALL_PATH>/environment-setup-aarch64-poky-linux
 
mkdir build
 
cd build
 
cmake -DSV_TARGET_PLATFORM=GEN3 ../
 
make
 
</pre>
 
</li>
 
<li>
 
Copy the resulted binaries on rootfs. As example, for SD card:
 
<pre>
 
mkdir <mountpoint>/home/root/sv
 
sudo cp sv-utest/bin/sv-utest <mountpoint>/usr/bin/
 
sudo cp sv-utest/libs/gen3/libsv.so <mountpoint>/usr/lib/
 
sudo cp -r sv-utest/resources/* <mountpoint>/home/root/sv/
 
</pre>
 
</li>
 
<li>
 
See the manual for instructions [https://github.com/CogentEmbedded/sv-utest/blob/master/docs/cogente_sv_manual_public.pdf R-Car Surround View manual] on how to run and use SurroundView application. In short:
 
<pre>
 
cd /home/root/sv
 
sv-utest -v /dev/video0,/dev/video1,/dev/video2,/dev/video3
 
</pre>
 
</li>
 
<li>
 
By default 1280x800 resolution is used for cameras, but you can change it with --camres option:
 
<pre>
 
sv-utest -v /dev/video0,/dev/video1,/dev/video2,/dev/video3 --camres 1280x1080
 
</pre>
 
</li>
 
</ol>
 
 
 
==== SurroundView IMR version ====
 
<ol>
 
<li>
 
Save mesh object file from the GPU SurroundView: after calibartion and sphere adjusting are done, press S, then "=" on the main 3d view to save mesh file.
 
Mesh object file name is "meshFull.obj" in the current working directory of SurroundView.
 
</li>
 
<li>
 
Clone and build imr-sv-utest application (see the README.md file as well):
 
<pre>
 
git clone https://github.com/CogentEmbedded/imr-sv-utest.git
 
cd imr-sv-utest
 
. <SDK_INSTALL_PATH>/environment-setup-aarch64-poky-linux
 
mkdir build
 
cd build
 
cmake -DIMR_TARGET_PLATFORM=GEN3 ../
 
make
 
</pre>
 
IMR SuroundView executable stored ../bin directory.
 
</li>
 
<li>
 
It's need to generate png files with car model images before running IMR SurroundView. Copy executable "gen" from "prebuilt/GEN3" directory
 
to the H3 board.
 
Example of generation png files with car (avalaible only for Gen3):
 
<pre>
 
./gen -w <width> -h <height> -c <color> -o <path to store> -s <positions> -m <car object> \
 
-l <car length> -S <shadow rectangle> -d <debug>
 
./gen -w 1920 -h 1080  -c 0x404040FF -o ./data/model -s 8:32:8 -m Car.obj -l 1.0  -S -0.2:-0.10:0.2:0.10
 
</pre>
 
</li>
 
<li>
 
Run the IMR SurroundView with the generated png files:
 
For 4-cameras environment:
 
<pre>
 
./imr-wl -f uyvy -v /dev/video0,/dev/video1,/dev/video2,/dev/video3 -w 1280 -h 800 -W 1920 -H 1080 \
 
-r /dev/video4,/dev/video5,/dev/video6,/dev/video7,/dev/video4,/dev/video5,/dev/video6,/dev/video7 -m ./data/model \
 
      -M meshFull.obj -X 1920 -Y 1080 -S -0.30:-0.10:0.30:0.10 -g 1.0 -s 8:32:8
 
</pre>
 
For 8-cameras environment:
 
<pre>
 
./imr-wl -f uyvy -v /dev/video0,/dev/video1,/dev/video2,/dev/video3 -w 1280 -h 800 -W 1920 -H 1080 \
 
-r /dev/video8,/dev/video9,/dev/video10,/dev/video11,/dev/video8,/dev/video9,/dev/video10,/dev/video11 -m ./data/model \
 
      -M meshFull.obj -X 1920 -Y 1080 -S -0.30:-0.10:0.30:0.10 -g 1.0 -s 8:32:8
 
</pre>
 
Run "./imr-wl -h" for options explanation.
 
</li>
 
</ol>
 
 
 
==== 8 Camera Demo (GPU + IMR version) ====
 
Demo application demonstrates surround view with pre-defined viewpoints on Renesas boards
 
with 4 additional cameras for mirror replacement purposes. First additional camera works
 
as driver monitor.
 
 
 
<ol>
 
<li>
 
Save mesh object file from the GPU SurroundView: after calibartion and sphere adjusting are done, press S, then "=" on the main 3d view to save mesh file.
 
Mesh object file name is "meshFull.obj" in the current working directory of SurroundView.
 
</li>
 
<li>
 
Clone and build 8-cam-imr-gpu-sv-utest application (see the README.md file as well):
 
<pre>
 
git clone https://github.com/CogentEmbedded/8-cam-imr-gpu-sv-utest.git
 
cd 8-cam-imr-gpu-sv-utest
 
. <SDK_INSTALL_PATH>/environment-setup-aarch64-poky-linux
 
mkdir build
 
cd build
 
cmake ../
 
make
 
</pre>
 
Demo executable "sc" stored ../bin directory.
 
</li>
 
<li>
 
It's need to generate png files with car model images before running IMR SurroundView. Copy executable "gen" from "prebuilt/" directory
 
to the H3 board.
 
Example of generation png files with car (avalaible only for Gen3):
 
<pre>
 
./gen -w <width> -h <height> -c <color> -o <path to store> -s <positions> -m <car object> \
 
-l <car length> -S <shadow rectangle> -d <debug>
 
./gen -w 1920 -h 1080  -c 0x404040FF -o ./data/model -s 8:32:8 -m Car.obj -l 1.0  -S -0.2:-0.10:0.2:0.10
 
</pre>
 
</li>
 
<li>
 
Copy resources files to directory where application will be runned from "resources/".
 
Copy libdrivermonitor.so and libsv.so from "lib/" directory to rootfs.
 
Copy "resources/adas-utest" directory to /usr/share on rootfs.
 
</li>
 
<li>
 
Run the application:
 
<pre>
 
./sc -W 1920 -H 1080 -m ./data/model -M meshFull.obj -X 1920 -Y 1080 -g 1.0 -b 0x000000 -c config.txt -S -0.20:-0.1:0.20:0.1 -s 8:32:8
 
</pre>
 
</li>
 
<li>
 
To control application with SpaceNav start SpaceNav daemon: spacenavd command.
 
There are 5 widgets on the main screen: main 3d SurroundView screen, DriverMonitor camera,
 
right, left and rear mirror replacement cameras.
 
  
To change focus on widget press right button on SpaceNav.
+
=== Legacy BSP ===
To change zoom and view on mirror replacement cameras rotate SpaceNav joystick, when widget is in focus.
+
Legacy BSP instruction can be found here [[R-Car/Boards/ADAS-View-Solution-Kit-legacy | ADAS View Solution Kit legacy]]
To hide Driver Monitor camera and mirror cameras press and hold left button on joystick, when widget is in focus.
 
To switch to IMR demo press left button on SpaceNav joystick, when main 3d SurroundView in focus.
 
To get back from IMR demo press left button again.
 
To rotate view in IMR demo use joystick or touchscreen.
 
 
 
</li>
 
 
 
</ol>
 
 
 
==== Camera low level tests ====
 
It is possible to run low level tests to validate LVDS cameras. <br>
 
The test application name is 'capture'. The 'capture' is provided in sources and build within yocto.
 
<ol>
 
<li>
 
The test examples are located on rootfs path:
 
<pre>
 
$ ls -1 /usr/share/tests/
 
test_lvds_2cameras_on_display1920x1080.sh
 
test_lvds_4cameras_on_display1920x1080.sh
 
test_lvds_8cameras_on_display1920x1080.sh
 
test_lvds_camera_0-3.sh
 
test_lvds_camera_0.sh
 
test_lvds_camera_4-7.sh
 
test_lvds_camera_4.sh
 
</pre>
 
</li>
 
</ol>
 
 
 
=== Build with Qt5 ===
 
<ol>
 
<li>
 
Clone meta-qt5 repository:
 
<pre>
 
git clone git://github.com/CogentEmbedded/meta-qt5.git meta-qt5 -b r-car-gen3
 
</pre>
 
</li>
 
<li>
 
Add cloned layer to $WORK/build/conf/bblayers.conf
 
<pre>
 
  ${TOPDIR}/../meta-qt5 \
 
</pre>
 
</li>
 
<li>
 
Enable build with Qt5 in $WORK/build/conf/local.conf
 
<pre>
 
DISTRO_FEATURES_append = " qt5 "
 
</pre>
 
</li>
 
<li>
 
Start build process of target image and Qt5 toolchain:
 
<pre>
 
bitbake core-image-weston
 
bitbake meta-toolchain-qt5
 
</pre>
 
</li>
 
<li>
 
The Qt5 toolchain will be avalaible here:
 
<pre>
 
./tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-qt5-aarch64-toolchain-2.0.2.sh
 
</pre>
 
</li>
 

Latest revision as of 00:00, 14 September 2017

Introduction

This is the official Wiki for Renesas R-Car ADAS View Solution Kit.


Refer to R-Car Starter Kit Pro page
Refer to R-Car Starter Kit Premier page

Where to buy

TBD

ADAS View Solution Kit Documentation

TBD

System with LVDS cameras

TBD

Quick Start

Build BSP images

Please follow these instruction to build BSP http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Building_the_BSP_for_Renesas_ADAS_boards:

At step 8 use h3ulcb target name
At step 16 use images for View ADAS Starter Kit board.

NOTE: you can refer to http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Build_scripts_examples section and use scripts as is.

Build SDK

Please follow these instruction to build SDK http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Build_SDK

Flashing firmware

Please follow these instruction to flashing firmware http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Flashing_firmware (optional step)

U-Boot Environment

Please follow these instruction to boot from SD card http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#Configure_U-Boot_to_boot_from_SD_card
For View board you must use one of the following dtb files:

Image-es1-r8a7795-h3ulcb-view.dtb
Image-r8a7795-h3ulcb-view.dtb

ADAS test applications

Please follow these instruction to build and use ADAS tests http://elinux.org/R-Car/Boards/Yocto-Gen3-ADAS#ADAS_test_applications

Legacy BSP

Legacy BSP instruction can be found here ADAS View Solution Kit legacy