Xilinx / KRS

The Kria Robotics Stack (KRS) is a ROS 2 superset for industry, an integrated set of robot libraries and utilities to accelerate the development, maintenance and commercialization of industrial-grade robotic solutions while using adaptive computing.
https://Xilinx.github.io/KRS/
Other
46 stars 18 forks source link

Problem when building SD card targeting kv260 (Example 0 of the doc) #13

Closed GZanni-mkl closed 2 years ago

GZanni-mkl commented 2 years ago

Hi @vmayoral , I successfully go through the steps of installation and then tried to build the example 0 in the doc (https://xilinx.github.io/KRS/sphinx/build/html/docs/examples/0_ros2_publisher.html). I had an error with mixin option while build the ros package targeting kv260: colcon: error: Mixin 'kv260' is not available for 'build'

I left below the log of the commands executed in the shell.

Screenshot from 2021-10-05 22-24-43

Taking a look at the video left as tutorial in the doc it seems also that my generated firmware folder is correct (or at least as the same structure and folders). Do you have any suggestion?

Thank you in advance

vmayoral commented 2 years ago

@GZanni-mkl, did you source the workspace you just built? I don’t see it in the screenshot.

Also, did you install colcon-mixins? The architecture relies on mixins to introduce new build targets.

You also need to source it as an overlay. If still does not show the target, debug the mixins with “colcon mixins show” (syntax might be slightly different, since I didn’t check this)

El El mar, 5 oct 2021 a las 22:33, GZanni-mkl @.***> escribió:

Hi @vmayoral https://github.com/vmayoral , I successfully go through the steps of installation and then tried to build the example 0 in the doc ( https://xilinx.github.io/KRS/sphinx/build/html/docs/examples/0_ros2_publisher.html ). I had an error with mixin option while build the ros package targeting kv260: colcon: error: Mixin 'kv260' is not available for 'build'

I left below the log of the commands executed in the shell.

[image: Screenshot from 2021-10-05 22-24-43] https://user-images.githubusercontent.com/82411341/136098173-897876d8-f106-48ed-bec2-af62d43ec648.png

Taking a look at the video left as tutorial in the doc it seems also that my generated firmware folder is correct (or at least as the same structure and folders). Do you have any suggestion?

Thank you in advance

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Xilinx/KRS/issues/13, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKPYDSNUMEVAXOGI7U5X7TUFNOJTANCNFSM5FMSE6EA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

GZanni-mkl commented 2 years ago

Hi @vmayoral , sorry I posted the wrong screenshoot, as I have done some trail and errors. I have installed the dependencies copying this command from the doc "sudo apt-get -y install curl build-essential libssl-dev git wget \ ocl-icd-* opencl-headers python3-vcstool \ python3-colcon-common-extensions python3-colcon-mixin \ kpartx u-boot-tools"

And it terminates without any error, just a warning when selecting an opencl version.

I have sourced the scripts before the first posting and it gave me the same error.

I have tried your command "colcon mixins show" but the command failed, as I have in the colcon options "mixin", I do not know whether it was a tapping mistake or it must be called mixins and not mixin. The command "colcon mixin show" ran, but without any output. In the acceleration list I have enlighted the kv260, as the doc explains. May I ask if there is another way for debugging? Thank you in advance for your fast answers

vmayoral commented 2 years ago

No worries @GZanni-mkl, let's continue iterating. My guess is that there's something wrong with your development machine. By now, we have collected enough evidence from different groups confirming success with the instructions, so I'm biased to believe that things work for alpha:

Let's nevertheless try navigating your problem. Can you please list the following:

Also, can you clean up your KRS workspace and start over, again? After instruction 6 of the installation (source install/setup.bash), can you then do the following:

colcon mixin list
colcon mixin show

Please do use Markdown format to write down your outputs in a readable manner.

If still not giving you enough hints about what's wrong, can you paste for me in a gist the content of du -a acceleration/firmware from the root of your KRS workspace?

Edit: du -a acceleration/firmware, not du -a firmware


Regarding previous points:

I have tried your command "colcon mixins show" but the command failed, as I have in the colcon options "mixin", I do not know whether it was a tapping mistake or it must be called mixins and not mixin. The command "colcon mixin show" ran, but without any output. In the acceleration list I have enlighted the kv260, as the doc explains.

No, that's my bad. As I said above, I didn't test it and answered quickly to get you some feedback:

“colcon mixins show” (syntax might be slightly different, since I didn’t check this)

In a new machine, with a few mixins installed, I get the following:

```bash root@attacker:/home/alias# colcon mixin show build: - asan-gcc cmake-args: ['-DCMAKE_C_FLAGS=-fsanitize=address', '-DCMAKE_CXX_FLAGS=-fsanitize=address'] - build-testing-off cmake-args: ['-DBUILD_TESTING=OFF'] - build-testing-on cmake-args: ['-DBUILD_TESTING=ON'] - ccache cmake-args: ['-DCMAKE_C_COMPILER_LAUNCHER=ccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache'] - clang-libcxx cmake-args: ['-DCMAKE_C_COMPILER=clang', '-DCMAKE_CXX_COMPILER=clang++', "-DCMAKE_CXX_FLAGS='-stdlib=libc++ -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS'", '-DFORCE_BUILD_VENDOR_PKG=ON', '--no-warn-unused-cli'] - compile-commands cmake-args: ['-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '--no-warn-unused-cli'] - coverage-gcc cmake-args: ["-DCMAKE_C_FLAGS='--coverage'", "-DCMAKE_CXX_FLAGS='--coverage'"] - coverage-pytest ament-cmake-args: ['-DAMENT_CMAKE_PYTEST_WITH_COVERAGE=ON'] - debug cmake-args: ['-DCMAKE_BUILD_TYPE=Debug'] - min-size-rel cmake-args: ['-DCMAKE_BUILD_TYPE=MinSizeRel'] - rel-with-deb-info cmake-args: ['-DCMAKE_BUILD_TYPE=RelWithDebInfo'] - release cmake-args: ['-DCMAKE_BUILD_TYPE=Release'] - tsan cmake-args: ["-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'", "-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"] test: - coverage-pytest pytest-args: ['--cov-report=term'] pytest-with-coverage: True - linters-only ctest-args: ['-L', 'linter'] pytest-args: ['-m', 'linter'] - linters-skip ctest-args: ['-LE', 'linter'] pytest-args: ['-m', 'not linter'] ```
vmayoral commented 2 years ago

@GZanni-mkl what's the status of this? Have you succeeded?

GZanni-mkl commented 2 years ago

Hi @vmayoral ,

I have solved the issue. The problem was my setup, and it was related (probably) to the fact that I have downloaded in the same directories different versions of the repos from the one needed (this thing was related to this issue: https://github.com/Xilinx/KRS/issues/10). After removing the parent directory of the ws and then re-create it everything went ok. As long as the repo has been updated to solve the issue, the problem doesen't persists anymore, so I close the issue.

Just two advices if I may, the command given to unmount/mount the image:

pv <your-path-to>/krs_ws/acceleration/firmware/select/sd_card.img | sudo dd of=/dev/rdisk2 bs=4m  # dd the image

was not present in my native ubuntu installation (pv) so I reccommend to put it on the dependencies to install (in the step how to install KRS). Second is that the second part of the command should be written as:

pv <your-path-to>/krs_ws/acceleration/firmware/select/sd_card.img | sudo dd of=/dev/rdisk2 bs=4M  # dd the image

with capital M, otherwise the system does not recognize the alignment.

Thank you for your support @vmayoral .

vmayoral commented 2 years ago

Thanks for the feedback @GZanni-mkl, addressed at https://github.com/Xilinx/KRS/pull/15.