We will design a basic implementation using the KR260 hardware platform interfaced with DC motor with encoder, servo motor, and webcam-integrated deep learning-based object detection for an AI Vision-Integrated Autonomous Movable Robotics System.
Among the various available approaches for implementation, we will proceed with Vivado-based hardware design, and Petalinux-based hardware image File generation, and Boot the Kria Platform with this image file.
The basic Vivado Based Hardware Design is as shown below.
Based on our requirements of interfacing with DC motor with encoder and Servo Motor, we sort-listed PMOD CON3 and PMOD HB1 connectors and modified the Vivado-associated hardware design accordingly.
Petalinux based Hardware Image File generation
We install the related necessary dependency libraries needed for the installation of Petalinux and run the downloaded the specific version of Petalinux file to install it in a specific directory
sudo apt-get install tofrodos iproute gawk gcc git-core make net-tools ncurses-dev libncurses5-dev tftpd* zlib1g-dev flex bison lib32z1 lib32ncurses5 lib32bz2-1.0 ia32gcc1 lib32stdc++6 libselinux1
chmod 755 ./petalinux-v<petalinux-version>-final-installer.run
mkdir -p /home/<user>/petalinux/<petalinux-version>
./petalinux-v<petalinux-version>-final-installer.run --dir /home/<user>/petalinux/<petalinux-version>
After that we create a petalinux project with the downloaded Kria K26 Starter Kits Board Support Package bsp file and config it according to our vivado created hardware file(*.xsa). Finally doing petalinux-build and petalinux-package will result in a wic file which is our required bootable sd card image file
cd ./Kria_KR260/
petalinux-create --type project -s ../Downloads/xilinx-kr260-starterkit-v2022.1-05140151.bsp --name linux_osnx-build
cd ./linux_os/
petalinux-config --get-hw-description ../../kria_base_peripheral_support_added.xsa
petalinux-build
petalinux-config -c kernel
petalinux-config -c rootfs
petaliunx-build
petalinux-build --sdk
petalinux-package --boot --u-boot --force
petalinux-package --wic --images-dir images/linux/ --bootfiles "ramdisk.cpio.gz.u-boot,boot.scr,Image,system.dtb,system-zynqmp-sck-kr-g-revB.dtb" --disk-name "sda"
SD Card
Using Balena Etcher the petalinux created sd card image file is flashed on a SD card
The final Robotic system is like the one below which is controlled by the terminal line commands.
The Robotic system also has an interface with a Logitech Brio Webcam for basic object detection, which is also tested via the given example demo files but is not visible here due to the limited size of the prototype.
Comments