This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-TDA4VM: Unable to see video from camera when executing ./app_edgeai.py ../configs/rpiV2_cam_example.yaml

Part Number: SK-TDA4VM
Other Parts Discussed in Thread: TDA4VM

Hello,

As explained in a previous post

We are currently starting to work with the TDA4VM starter kit J721EXSKG01EVM. 

Since we have to make some modifications on the sensor.c files, we are following the Development flow stated here: https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-sk-tda4vm/latest/exports/docs/development_flow.html#pub-edgeai-sdk-development-flow

We are able to go through each step of the process (Skipping "Getting PSDK LINUX" and "Building the LINUX SDK from source" since we only want to modify sensor.c files on RTOS).

We are properly flashing the SDcard and properly executing the Development flow steps up until "Target side steps".

Right now we are properly executing ./init_script.sh, and we are able to detect that our camera is connected to the board:

./init_script.sh: line 152: /usr/local/lib/python3.8/dist-packages/dlr/counter/ccm_config.json: No such file or directory
CSI Camera 0 detected
device = /dev/video2
name = imx219 8-0010
format = [fmt:SRGGB8_1X8/1920x1080]
subdev_id = 2
isp_required = yes

But when we try to execute ./app_edgeai.py ../configs/rpiV2_cam_example.yaml, we get the following errors:

root@tda4vm-sk:/opt/edge_ai_apps/apps_python# ./app_edgeai.py ../configs/rpiV2_cam_example.yaml
Traceback (most recent call last):
File "./app_edgeai.py", line 71, in <module>
main(sys.argv)
File "./app_edgeai.py", line 45, in main
demo = EdgeAIDemo(config)
File "/opt/edge_ai_apps/apps_python/edge_ai_class.py", line 74, in __init__
model_obj = config_parser.Model(model_config)
File "/opt/edge_ai_apps/apps_python/config_parser.py", line 86, in __init__
with open(self.path + '/param.yaml', 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/model_zoo/ONR-OD-8050-ssd-lite-regNetX-800mf-fpn-bgr-mmdet-coco-512x512/param.yaml'
root@tda4vm-sk:/opt/edge_ai_apps/apps_python#

It seems that the script can't find some files, and we have noticed that, when executing "./setup_script.sh" we have network errors despite being properly connected through ethernet (We even see the IP on screen)

root@tda4vm-sk:/opt/edge_ai_apps# ./setup_script.sh
edgeai-tiovx-modules
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = edgeai-tiovx-modules
-- CMAKE_BUILD_TYPE = Release PROJECT_NAME = edgeai-tiovx-modules-test
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/edgeai-tiovx-modules/build
make[1]: Entering directory '/opt/edgeai-tiovx-modules/build'
make[2]: Entering directory '/opt/edgeai-tiovx-modules/build'
Scanning dependencies of target edgeai-tiovx-modules
make[2]: Leaving directory '/opt/edgeai-tiovx-modules/build'
make[2]: Entering directory '/opt/edgeai-tiovx-modules/build'
[ 7%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_color_convert_module.c.o
[ 7%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_dl_color_convert_module.c.o
[ 11%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_multi_scaler_module.c.o
[ 14%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_img_mosaic_module.c.o
[ 18%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_dl_pre_proc_module.c.o
[ 22%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_dl_color_blend_module.c.o
[ 25%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_sensor_module.c.o
[ 29%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_viss_module.c.o
[ 33%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_ldc_module.c.o
[ 37%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_pyramid_module.c.o
[ 40%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_dof_module.c.o
[ 44%] Building C object src/CMakeFiles/edgeai-tiovx-modules.dir/tiovx_dof_viz_module.c.o
[ 48%] Linking C shared library ../../bin/Release/libedgeai-tiovx-modules.so
make[2]: Leaving directory '/opt/edgeai-tiovx-modules/build'
[ 48%] Built target edgeai-tiovx-modules
make[2]: Entering directory '/opt/edgeai-tiovx-modules/build'
Scanning dependencies of target edgeai-tiovx-modules-test
make[2]: Leaving directory '/opt/edgeai-tiovx-modules/build'
make[2]: Entering directory '/opt/edgeai-tiovx-modules/build'
[ 55%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_dl_color_convert_module_test.c.o
[ 55%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_color_convert_module_test.c.o
[ 59%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_multi_scaler_module_test.c.o
[ 62%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_img_mosaic_module_test.c.o
[ 66%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_dl_pre_proc_module_test.c.o
[ 70%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_dl_color_blend_module_test.c.o
[ 74%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_viss_module_test.c.o
[ 77%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_ldc_module_test.c.o
[ 81%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_pyramid_module_test.c.o
[ 85%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_dof_module_test.c.o
[ 88%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_tiovx_dof_viz_module_test.c.o
[ 92%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/app_common.c.o
[ 96%] Building C object test/CMakeFiles/edgeai-tiovx-modules-test.dir/main.c.o
[100%] Linking C executable ../../bin/Release/edgeai-tiovx-modules-test
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: warning: libdlr.so, needed by /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `GetDLRInputSizeDim'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `DeleteDLRModel'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `RunDLRModel'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `DLRGetLastError'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `CreateDLRModel'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `GetDLROutput'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `GetDLROutputSizeDim'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `GetDLRInputShape'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `SetDLRInput'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `GetDLROutputShape'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `GetDLRNumOutputs'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `GetDLRInputName'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `GetDLROutputName'
/usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so: undefined reference to `GetDLRNumInputs'
collect2: error: ld returned 1 exit status
make[2]: *** [test/CMakeFiles/edgeai-tiovx-modules-test.dir/build.make:265: ../bin/Release/edgeai-tiovx-modules-test] Error 1
make[2]: Leaving directory '/opt/edgeai-tiovx-modules/build'
make[1]: *** [CMakeFiles/Makefile2:142: test/CMakeFiles/edgeai-tiovx-modules-test.dir/all] Error 2
make[1]: Leaving directory '/opt/edgeai-tiovx-modules/build'
make: *** [Makefile:130: all] Error 2
Setup FAILED! : Make sure you have active network connection

How can we solve those two issues in order to have video from the RPI camera?

Just as a note: we have already tested this camera and script, with the prebuilt image from the "Getting started" tutorial: "software-dl.ti.com/.../getting_started.html" but we are not able to do so when building the sdk files ourselves.

Thank you,

David

  • Hi David,

    For the first issue of:

    No such file or directory: '/opt/model_zoo/ONR-OD-8050-ssd-lite-regNetX-800mf-fpn-bgr-mmdet-coco-512x512

    This can be solved by running "./download_models.sh --recommended" which will download models used by the out of box demos.

    For the second issue of:

    /usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: warning: libdlr.so, needed by /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so, not found (try using -rpath or -rpath-link)

    Can you run "nm -D /usr/lib/libdlr.so | grep GetDLRInput" and post the output to check if libdlr.so exist in your system, and this will also check if libdlr.so has the symbols that libtivision_apps.so is trying to find.

    And could you run "ldconfig", and then post output from running "ldd /usr/lib/libtivision_apps.so" to see if ldconfig can locate libdlr.so library?

    Regards,

    Takuma

  • Hi Takuma,

    Following your instructions we have tried your suggestions, here are the results:

    For the first issue:

    David Costa said:

    No such file or directory: '/opt/model_zoo/ONR-OD-8050-ssd-lite-regNetX-800mf-fpn-bgr-mmdet-coco-512x512

    This can be solved by running "./download_models.sh --recommended" which will download models used by the out of box demos.

    When trying so:

    root@tda4vm-sk:/opt/edge_ai_apps/apps_python# ./app_edgeai.py ../configs/rpiV2_cam_example.yaml
    libtidl_onnxrt_EP loaded 0x5c21480
    Final number of subgraphs created are : 1, - Offloaded Nodes - 517, Total Nodes - 517
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=4) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
    84.759253 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
    84.764581 s: VX_ZONE_INIT:Enabled
    84.764603 s: VX_ZONE_ERROR:Enabled
    84.764608 s: VX_ZONE_WARNING:Enabled
    84.769189 s: VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
    84.769486 s: VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!!
    84.794390 s: VX_ZONE_ERROR:[ownContextSendCmd:815] Command ack message returned failure cmd_status: -1
    84.794415 s: VX_ZONE_ERROR:[ownContextSendCmd:851] tivxEventWait() failed.
    84.794435 s: VX_ZONE_ERROR:[ownNodeKernelInit:538] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
    84.794441 s: VX_ZONE_ERROR:[ownNodeKernelInit:539] Please be sure the target callbacks have been registered for this core
    84.794447 s: VX_ZONE_ERROR:[ownNodeKernelInit:540] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
    84.794455 s: VX_ZONE_ERROR:[ownGraphNodeKernelInit:583] kernel init for node 0, kernel com.ti.tidl ... failed !!!
    84.794465 s: VX_ZONE_ERROR:[vxVerifyGraph:2055] Node kernel init failed
    84.794471 s: VX_ZONE_ERROR:[vxVerifyGraph:2109] Graph verify failed
    TIDL_RT_OVX: ERROR: Verifying TIDL graph ... Failed !!!
    TIDL_RT_OVX: ERROR: Verify OpenVX graph failed
    [ERROR] no element "tiovxdlcolorconvert"
    [GST STR] appsrc format=GST_FORMAT_TIME block=true num-buffers=1 name=background_0 ! tiovxdlcolorconvert ! video/x-raw,format=NV12, width=1920, height=1080 ! filesink location=/tmp/background_0

    84.846166 s: VX_ZONE_INIT:[tivxHostDeInitLocal:100] De-Initialization Done for HOST !!!
    84.850539 s: VX_ZONE_INIT:[tivxDeInitLocal:193] De-Initialization Done !!!
    APP: Deinit ... !!!

    And we receive no video.

    For the second issue of:

    /usr/lib/gcc/aarch64-linux/9.2.1/../../../../aarch64-linux/bin/ld: warning: libdlr.so, needed by /usr/lib/gcc/aarch64-linux/9.2.1/../../../libtivision_apps.so, not found (try using -rpath or -rpath-link)

    Can you run "nm -D /usr/lib/libdlr.so | grep GetDLRInput" and post the output to check if libdlr.so exist in your system, and this will also check if libdlr.so has the symbols that libtivision_apps.so is trying to find.

    When trying so:

    root@tda4vm-sk:/opt/edge_ai_apps# nm -D /usr/lib/libdr.so | grep GetDLRInput
    nm: '/usr/lib/libdr.so': No such file

    So it seems like libdr.so does not exist in our system.

    Takuma said:

    And could you run "ldconfig", and then post output from running "ldd /usr/lib/libtivision_apps.so" to see if ldconfig can locate libdlr.so library?

    When trying so:

    root@tda4vm-sk:/opt/edge_ai_apps/apps_python# ldconfig
    ldconfig: /usr/lib/libtidl_tfl_delegate.so.map is not an ELF file - it has the wrong magic bytes at the start.

    ldconfig: /usr/lib/libtidl_onnxrt_EP.so.map is not an ELF file - it has the wrong magic bytes at the start.

    ldconfig: /usr/lib/libvx_tidl_rt.so.map is not an ELF file - it has the wrong magic bytes at the start.

    root@tda4vm-sk:/opt/edge_ai_apps/apps_python# ldd /usr/lib/libtivision_apps.so
    linux-vdso.so.1 (0x0000ffffb8ae0000)
    libEGL.so.1 => /usr/lib/libEGL.so.1 (0x0000ffffb64f0000)
    libGLESv2.so.2 => /usr/lib/libGLESv2.so.2 (0x0000ffffb64d0000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000ffffb62c0000)
    librt.so.1 => /lib/librt.so.1 (0x0000ffffb62a0000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x0000ffffb6270000)
    libti_rpmsg_char.so.0 => /usr/lib/libti_rpmsg_char.so.0 (0x0000ffffb6250000)
    libgbm.so.1 => /usr/lib/libgbm.so.1 (0x0000ffffb6230000)
    libdl.so.2 => /lib/libdl.so.2 (0x0000ffffb6210000)
    libdlr.so => not found
    libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0x0000ffffb61f0000)
    libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0x0000ffffb61c0000)
    libwayland-egl.so.1 => /usr/lib/libwayland-egl.so.1 (0x0000ffffb61a0000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000ffffb60f0000)
    libIL.so.1 => /usr/lib/libIL.so.1 (0x0000ffffb5fb0000)
    libILU.so.1 => /usr/lib/libILU.so.1 (0x0000ffffb5f80000)
    libm.so.6 => /lib/libm.so.6 (0x0000ffffb5ed0000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0000ffffb5ea0000)
    libc.so.6 => /lib/libc.so.6 (0x0000ffffb5d30000)
    libglapi.so.0 => /usr/lib/libglapi.so.0 (0x0000ffffb5cd0000)
    libexpat.so.1 => /usr/lib/libexpat.so.1 (0x0000ffffb5c90000)
    libdrm.so.2 => /usr/lib/libdrm.so.2 (0x0000ffffb5c60000)
    /lib/ld-linux-aarch64.so.1 (0x0000ffffb8af0000)
    libffi.so.7 => /usr/lib/libffi.so.7 (0x0000ffffb5c40000)
    libpng16.so.16 => /usr/lib/libpng16.so.16 (0x0000ffffb5bf0000)
    libz.so.1 => /lib/libz.so.1 (0x0000ffffb5bc0000)

    Best regards,

    David

  • Hi David,

    It looks like a library is missing in the underlying system. Could you copy in the following library into your system and run "ldd /usr/lib/libtivision_apps.so" again:

    libdlr.zip

    If ldd finds all the libraries, could you try re-running the setup script?

    Regards,

    Takuma