Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ultra96-v2: Add a new community support board #1

Closed
pimartos opened this issue Jun 8, 2021 · 83 comments
Closed

Ultra96-v2: Add a new community support board #1

pimartos opened this issue Jun 8, 2021 · 83 comments

Comments

@pimartos
Copy link

pimartos commented Jun 8, 2021

Hi,
I would like to add the ultra96-v2 board to the list of community supported boards because it's popular, so more people could contribute to the ROS 2 HAWG

regards,
Pedro

@vmayoral
Copy link
Member

vmayoral commented Jun 9, 2021

Thanks @pimartos, as pointed out at https://discourse.ros.org/t/announcing-the-hardware-acceleration-wg-meeting-1/20826/6?u=vmayoral, it should be fairly easy and consist basically on creating the firmware artifacts required for the new board and organizing them in a structured manner so that the hooks we've created for the ROS 2 meta build system and meta build tools pick the board automatically.

This way, it'll become transparent and seamless to anyone willing to re-use this or any other board (while we ensure a somewhat organized extensibility)

It'll take a few weeks but expect me to push to the community README instructions on how to include new boards.

@vmayoral vmayoral self-assigned this Jun 9, 2021
@pimartos
Copy link
Author

pimartos commented Jun 9, 2021

Hi,
Ok, thanks. May I help in some way? I have a Ultra96-V2 board so I can do some tests if you need.

regards,
Pedro

@vmayoral vmayoral changed the title Add a new community support board Ultra96-v2: Add a new community support board Jul 9, 2021
@vmayoral vmayoral changed the title Ultra96-v2: Add a new community support board Ultra96-v2: Add a new community support board Jul 9, 2021
@vmayoral vmayoral changed the title Ultra96-v2: Add a new community support board Ultra96-v2: Add a new community support board Jul 9, 2021
@vmayoral
Copy link
Member

Ok, thanks. May I help in some way? I have a Ultra96-V2 board so I can do some tests if you need.

@pimartos to follow up on this, instructions to proceed with the port is somewhat reflected in ros-infrastructure/rep#324. An example firmware repo is available at https://github.com/ros-acceleration/acceleration_firmware_kv260.

I'm pushing this back to you. Feel free to launch questions in here if you have any specific ones.

@vmayoral vmayoral assigned pimartos and unassigned vmayoral Sep 27, 2021
@pimartos
Copy link
Author

Hi,
Ok, I will work with 0.6.0 (last time I checked v0.6.0 was in alpha, good to see that is prerelease) :-)

@vmayoral
Copy link
Member

That's right! 0.6.0 was shipped in KRS's alpha. Ping me if you struggle with anything.

@pimartos
Copy link
Author

Ok, my path should be

  1. Install KRS and its dependencies
  2. Build examples (Unfortunatelly I cann't test it with real hardware)
  3. Create a repo acceleration_firmware_Ultra96V2
  4. Port acceleration_firmware_kv260 to target Ultra96V2
  5. Build the examples using ultra96v2 firmware
  6. Integrate to KRS.
    Do you agree with this?

@vmayoral
Copy link
Member

@pimartos that's an awesome first list. Thanks for puting it together. So that it can be translated to others, my recommendation for the official adding new boards to HAWG should be as follows:

  1. Check out the Initial draft of REP-2008 - ROS 2 Hardware Acceleration Architecture and Conventions
  2. Create your own firmware repository (e.g. acceleration_firmware_Ultra96V2) for the corresponding board (see acceleration_firmware_kv260 for an example)
  3. Once the firmware repo is finalized, assess the capabilities of the hardware according to REP-2008 and create a table in the README.md that argues about it (see example here)
  4. Submit a PR to ros-acceleration/community to add your board to the community, with the corresponding support level according to REP-2008

Aligned to this, regarding your suggested path above:

  1. Install KRS and its dependencies
  2. Build examples (Unfortunatelly I cann't test it with real hardware)

I not done already, I would really encourage you to review REP-2008 PR, familiarize with it and send feedback.

I think installing KRS and playing a bit with the examples with it will indeed help you familiarize with the architecture. Note you can launch some examples using emulation targets, so no real need for the KV260 hardware to evaluate this.

  1. Create a repo acceleration_firmware_Ultra96V2
  2. Port acceleration_firmware_kv260 to target Ultra96V2

Yeap, correct.

  1. Build the examples using ultra96v2 firmware

Correct.

  1. Integrate to KRS.

This last step is not needed. Instead, I think we could simply submit a PR to ros-acceleration/community to add your board to the community, with the corresponding support level according to REP-2008.

Let me know if you need further clarifications @pimartos.

@kscharan
Copy link

kscharan commented Oct 3, 2021

Hello @pimartos ,
I have an Ultra96-V2 board with me. Is there anything I can contribute to here?

@pimartos
Copy link
Author

pimartos commented Oct 3, 2021

Hello @pimartos ,
I have an Ultra96-V2 board with me. Is there anything I can contribute to here?

Hi,
I am starting, I installed ros and krs and I am triying to build the examples.
If you didn't do it yet, do the same, so we can have a build enviaron mente

Regards,
Pedro

@pimartos
Copy link
Author

pimartos commented Oct 4, 2021

Let me know if you need further clarifications @pimartos.
@vmayoral, hi, I installed KRS and downloaded the examples (I openend an issue about not having vitis_common). I am not able to build the samples, I receive this error:

$ colcon build --build-base=build-kv260 --install-base=install-kv260 --merge-install --mixin kv260 --packages-select ament_vitis vadd_publisher

Starting >>> ament_vitis
Finished <<< ament_vitis [0.18s]                  
Starting >>> vadd_publisher
--- stderr: vadd_publisher                         
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "/tools/Xilinx/Vitis/2021.1/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-gcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/usuario/krs_ws/build-kv260/vadd_publisher/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/make cmTC_44b65/fast && /usr/bin/make -f CMakeFiles/cmTC_44b65.dir/build.make CMakeFiles/cmTC_44b65.dir/build
    make[1]: se entra en el directorio '/home/usuario/krs_ws/build-kv260/vadd_publisher/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_44b65.dir/testCCompiler.c.o
    /tools/Xilinx/Vitis/2021.1/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-gcc --sysroot=/home/usuario/krs_ws/install/../acceleration/firmware/kv260/sysroots/aarch64-xilinx-linux    -o CMakeFiles/cmTC_44b65.dir/testCCompiler.c.o   -c /home/usuario/krs_ws/build-kv260/vadd_publisher/CMakeFiles/CMakeTmp/testCCompiler.c
    Linking C executable cmTC_44b65
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_44b65.dir/link.txt --verbose=1
    /tools/Xilinx/Vitis/2021.1/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-gcc --sysroot=/home/usuario/krs_ws/install/../acceleration/firmware/kv260/sysroots/aarch64-xilinx-linux      CMakeFiles/cmTC_44b65.dir/testCCompiler.c.o  -o cmTC_44b65 
    /tools/Xilinx/Vitis/2021.1/gnu/aarch64/lin/aarch64-linux/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.real: cannot find crtbeginS.o: No such file or directory
    /tools/Xilinx/Vitis/2021.1/gnu/aarch64/lin/aarch64-linux/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.real: cannot find -lgcc
    collect2.real: error: ld returned 1 exit status
    make[1]: *** [CMakeFiles/cmTC_44b65.dir/build.make:87: cmTC_44b65] Error 1
    make[1]: se sale del directorio '/home/usuario/krs_ws/build-kv260/vadd_publisher/CMakeFiles/CMakeTmp'
    make: *** [Makefile:121: cmTC_44b65/fast] Error 2
    
  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


---
Failed   <<< vadd_publisher [1.08s, exited with code 1]

Summary: 1 package finished [1.42s]
  1 package failed: vadd_publisher
  1 package had stderr output: vadd_publisher

I suspect that the problem is that I don't have kv260 bsp files installed; I downloaded it from xilinx, but I am not able to install it using petalinux-upgrade
By the way, the downloaded bsp file is "xilinx-k26-starterkit-v2021.1-final.bsp"; but it seems to be a gzipped file. How should I deal with it? Thanks in advance for your support

best regards,
Pedro

@vmayoral
Copy link
Member

vmayoral commented Oct 4, 2021

@pimartos it indeed seems like you are not installing kv260 files appropriately.

Can you confirm you're following the 6 steps at https://xilinx.github.io/KRS/sphinx/build/html/docs/install.html appropriately? I uploaded a video to help navigate the process, have a look.

Also, to debug your setup, inspect the following:

colcon acceleration list  # this should list the deployed firmware resources
                          # you should see at least 'kv260' listed

Also, manually, have a look at the following directory <your-workspace>/acceleration/firmware/kv260. Ensure all firmware files are there.

Note the process of installing (https://xilinx.github.io/KRS/sphinx/build/html/docs/install.html) and running a first example (https://xilinx.github.io/KRS/sphinx/build/html/docs/examples/1_hello_xilinx.html) are detailed in KRS documentation.

@vmayoral
Copy link
Member

vmayoral commented Oct 4, 2021

I suspect that the problem is that I don't have kv260 bsp files installed; I downloaded it from xilinx, but I am not able to install it using petalinux-upgrade

No need to use PetaLinux for evaluating KV260 (though you'll will need to rely on it for building the firmware files of Ultra96v2, but with its corresponding BSP). I specifically pushed for abstracting Yocto/PetaLinux aspects from the user.

By the way, the downloaded bsp file is "xilinx-k26-starterkit-v2021.1-final.bsp"; but it seems to be a gzipped file. How should I deal with it? Thanks in advance for your support

Not sure what you mean by this, as pointed out above. You don't need to use anything else but KRS's instructions for getting up to speed. PetaLinux BSP for KV260 is already abstracted within https://github.com/ros-acceleration/acceleration_firmware_kv260. It's made this way so that embedded expertise is avoided in the process.

@pimartos
Copy link
Author

pimartos commented Oct 4, 2021

Hi @vmayoral
Yes, I can do the install without problem (it builds all 14 packages); I have the files under /acceleration/firmware/kv260; and colcon acceleration list gives kv260*
The problem is when I try to build the first sample (0: ROS 2 Publisher); when I try to build the package with (as stated in the sample):

colcon build --build-base=build-kv260 --install-base=install-kv260 --merge-install --mixin kv260 --packages-select ament_vitis vadd_publisher

I get the mentioned output
Googling about "cannot find crtbeginS.o: No such file or directory"; gives me answer record 73705 (https://support.xilinx.com/s/article/73705?language=en_US); thats the reason that I suspected a petalinux issue; but if all the petalinux stuff is inside firmware, I don't know where could be the problem. :-(

@vmayoral
Copy link
Member

vmayoral commented Oct 4, 2021

From what you've shared @pimartos, it seems cross-compilation is failing because it doesn't find the right resources (this one hints about missing ones in the sysroot). This, again, goes back to firmware not properly deployed. I experienced issues like those in the past while developing, when firmware wasn't properly installed.

Xilinx/KRS#10 confirmed a few hours ago that he built successfully with the latest changes.

My recommendation will be to start over with the instructions. Clean up the workspace and start over. There's probably something wrong in your ROS 2 workspace and firmware deployment. So that the experience is useful for debugging, can you do it while asciinema-yourself? Share back in here a link to the recording if it still fails.

@pimartos
Copy link
Author

pimartos commented Oct 4, 2021

@vmayoral finally I solved it; I was using vitis 2021.1 (because I wanted to try vitis AI), I installed vitis 2020.2 and the first example compiled. When I tried to generate the sdcard (just to check that it is possible), the sd_card.img file was generated, but I had this message:

$ colcon acceleration linux vanilla --install-dir install-kv260
SECURITY WARNING: This class invokes explicitly a shell via the shell=True argument of the Python subprocess library, and uses admin privileges to manage raw disk images. It is the user's responsibility to ensure that all whitespace and metacharacters passed are quoted appropriately to avoid shell injection vulnerabilities.
- Creating a new base image using /home/usuario/krs_ws/acceleration/firmware/select/rootfs.cpio.gz ...
[sudo] contraseña para usuario: 
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
- Image successfully created
- Confirmed availability of raw image file at: /home/usuario/krs_ws/acceleration/firmware/select/sd_card.img
[25.389s] ERROR:colcon:colcon acceleration: can only concatenate str (not "NoneType") to str
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/command.py", line 528, in verb_main
    rc = context.args.main(context=context)
  File "/home/usuario/krs_ws/install/lib/python3.8/site-packages/colcon_acceleration/subverb/linux.py", line 466, in main
    mount_rawimage(rawimage_path, 1)
  File "/home/usuario/krs_ws/install/lib/python3.8/site-packages/colcon_acceleration/subverb/__init__.py", line 395, in mount_rawimage
    "Something went wrong while fetching the raw image UNITS.\n"
TypeError: can only concatenate str (not "NoneType") to str

Should I discard it?

UPDATE:
I found what was that "Something went wrong while fetching the raw image UNITS.\n" error....
I have a spanish (latin america) ubuntu install, so the output of fdisk is "Unidades" not "Units"; so the script fails because search for the string "Units" and the output is in spanish "Unidades". What should be the best way to manage this?

@pimartos
Copy link
Author

pimartos commented Oct 5, 2021

@vmayoral With the spanish "Unidades" in .py scripts, Now I can build sd_card-img for Hello Xilinx, but when I try to run in the emulator with $ colcon acceleration emulation sw_emu install-kv260
I get:

SECURITY WARNING: This class invokes explicitly a shell via the shell=True argument of the Python subprocess library, and uses admin privileges to manage raw disk images. It is the user's responsibility to ensure that all whitespace and metacharacters passed are quoted appropriately to avoid shell injection vulnerabilities.
- Verified that install/ is available in the current ROS 2 workspace
- Confirmed availability of raw image file at: /home/usuario/krs_ws/acceleration/firmware/select/sd_card.img
- Finished inspecting raw image, obtained UNITS and STARTSECTOR P1/P2
- Image mounted successfully at: /tmp/sdcard_img_p2
- Successfully cleaned up prior overlay ROS 2 workspace at: /tmp/sdcard_img_p2/ros2_ws
- Copied 'install-kv260' directory as a ROS 2 overlay workspace in the raw image.
- Umounted the raw image.
- Generated PMU and QEMU files.
- Launching emulation...
cd /home/usuario/krs_ws/acceleration/firmware/select/emulation && /tools/Xilinx/Vitis/2020.2/bin/launch_emulator -device-family ultrascale -target sw_emu -qemu-args-file /home/usuario/krs_ws/acceleration/firmware/select/emulation/qemu_args.txt -pmc-args-file /home/usuario/krs_ws/acceleration/firmware/select/emulation/pmu_args.txt -sd-card-image /home/usuario/krs_ws/acceleration/firmware/select/sd_card.img -enable-prep-target $*
Running SW Emulation
INFO :  [LAUNCH_EMULATOR] pl_sim_dir option is not provided.
Starting QEMU
 - Press <Ctrl-a h> for help 
Waiting for QEMU to start. qemu_port 9194
Qemu_pids 87327 87328
qemu-system-aarch64: -chardev socket,path=./qemu-rport-_pmu@0,server,id=pmu-apu-rp: info: QEMU waiting for connection on: disconnected:unix:./qemu-rport-_pmu@0,server
QEMU started. qemu_pid=87327.
Waiting for PMU to start. Qemu_pids 87331 87332
qemu-system-aarch64: -chardev socket,id=pl-rp,host=127.0.0.1,port=7495,server: info: QEMU waiting for connection on: disconnected:tcp:127.0.0.1:7495,server
PMC started. pmc_pid=87331
Starting PL simulation.Generating PLLauncher commandline
running PLL Launcher
qemu-system-aarch64: Could not set up host forwarding rule 'tcp:127.0.0.1:2222-10.0.2.15:22'
qemu-system-microblazeel: /pmu@0: Disconnected clk=3915984112 ns

[LAUNCH_EMULATOR] INFO: 22:41:43 : PMU/PMC-QEMU  exited
[LAUNCH_EMULATOR] INFO: 22:41:45 : PS-QEMU exited
[LAUNCH_EMULATOR] INFO: 22:41:45 : PMU/PMC-QEMU exited
[LAUNCH_EMULATOR] INFO: 22:41:45 : Trying to kill PLLauncher forcefully because QEMU exited
[LAUNCH_EMULATOR] INFO: 22:41:45 : PLLauncher exited by force
Please refer PS /simulate logs at /home/usuario/krs_ws/acceleration/firmware/kv260/emulation for more details.
DONE!
INFO: Emulation ran successfully
Finalized successfully.

How can I solve this error?
qemu-system-aarch64: Could not set up host forwarding rule 'tcp:127.0.0.1:2222-10.0.2.15:22'
Thanks in advance for your help

UPDATE: It was a qemu issue, it was working as daemon since I was working with a bad image because the spanish "Unidades" issue, killed and restarted and I was able to run Hello Xilinx in emulated mode, so if something goes bad with qemu, is necessary to kill the process...

@vmayoral
Copy link
Member

vmayoral commented Oct 5, 2021

@pimartos, glad to see the progress! Thanks for the updates and for answering your hurdles, that helps a lot future users. I took the liberty of slightly editing your comments using Markdown syntax. Feel free to have a look at it, it may help the readibility of future queries.

Regarding:

I found what was that "Something went wrong while fetching the raw image UNITS.\n" error....
I have a spanish (latin america) ubuntu install, so the output of fdisk is "Unidades" not "Units"; so the script fails because search for the string "Units" and the output is in spanish "Unidades". What should be the best way to manage this?

Shame on me for not having considered this given that I'm from Spain! This is coded in the colcon-acceleration extensions. Particularly, Units is fetched in https://github.com/ros-acceleration/colcon-acceleration/blob/main/colcon_acceleration/subverb/__init__.py#L389 and https://github.com/ros-acceleration/colcon-acceleration/blob/main/colcon_acceleration/subverb/__init__.py#L661. A quick fix is to support both languages by extending the grep from grep 'Units' to grep "[Unidades|Units]". This would do for now but a better way forward would be to add a language-agnostic one, so that regardless the system preferences it'll work.

This is a good first contribution. @pimartos would you like to make the changes yourself and submit a Pull Request?

@pimartos
Copy link
Author

pimartos commented Oct 5, 2021

This is a good first contribution. @pimartos would you like to make the changes yourself and submit a Pull Request?

OK, I will do it :-D
Now I can start porting :-)
(Should I modify something in the header of the files? Add a contribution under author?)

@vmayoral
Copy link
Member

@pimartos I took a look at https://github.com/ros-acceleration-ultra96v2 in search for updates regarding this effort. Do you think you could join us this Wednesday at the HAWG meeting and give a short update?

If not, could you share with in here some notes so that I discuss it with the rest of the group?

@vmayoral
Copy link
Member

do you recommend to upgrade to 2021.2 and make the port with that newer toolset?

Yes. From 2021.1 to 2021.2 you shouldn't suffer that much.

@pimartos
Copy link
Author

Ok, I will upgrade to 2021.2 and start over to build the platform. =)

@jlamperez
Copy link

Hi!

Which are the most suitable ROS_OE_RELEASE_SERIES and ROS_DISTRO values for Petalinux 2021.2?

I am trying with gategarths and galactic or rolling but first this change and now some annoying Taskhash mismatch make my compilation fail.

Any suggestion? Thanks!

@vmayoral
Copy link
Member

Which are the most suitable ROS_OE_RELEASE_SERIES and ROS_DISTRO values for Petalinux 2021.2?

For new development I'm using gatesgarth and rolling. This will change in the future but that should get you aligned with me.

I am trying with gategarths and galactic or rolling but first this change and now some annoying Taskhash mismatch make my compilation fail.

Yeah, that's very annoying and I experienced the same myself. There's no easy fix for this AFAIK and seems related to BSP changes introduced while releasing Vitis 2021.2. You can ignore the Taskhash mismatch if your artifacts get built or alternatively, remove the faulty artifacts by hand from the build directory in your PetaLinux project.

Regarding the change you link above, that's because the bitbake version released is old. You can either go back in the commit history to that point (or one that allows the bitbake version to build the recipes), or update simply update bitbake to a more modern version. I'm going for the latter:

cd /home/xilinx/xilinx-k26-som-2021.2/components/yocto/layers/core/; mv bitbake bitbake_old
git clone https://github.com/openembedded/bitbake -b 1.50

@jlamperez
Copy link

Yes, you are right, I was able to compile an image yesterday. I took the path of going back in history 😄

I documented the procedure in hackster using Kria board for those interested.

Thanks!

@jwdinius
Copy link

What is the current state of this issue? The last comment focused on the Ultra96v2 appears to be this one. @pimartos, did the upgrade to 2021.2 squash the bug you found? I'm happy to work on this to try to get the firmware artifacts in a state where they can be shared with the community.

@vmayoral
Copy link
Member

Thanks for pinging about this @jwdinius.

AFAIK @pimartos stopped his contributions due to personal reasons. He might get back to it once available again, but there's no certainty.

I'm happy to work on this to try to get the firmware artifacts in a state where they can be shared with the community.

This is great, thanks. I've been trying to secure sponsorship for this, so that the firmware is maintained and well supported over time. That requires users asking for it (which we have 😄 ) and someone/some-organization willing to sponsor the engineering work and maintain it over-time.

If you can work out the artifacts, count on me for helping shape it up. I've added this topic to the agenda for tomorrow. Let's have a quick discussion about it and define next steps.

@pimartos
Copy link
Author

Hi @vmayoral and @jwdinius
Yes I had a very busy beginning of the year, I started working in a new company, so I had to put the effort in the new job. Now I am more stabilized, so I can resume the project. Currently I am rebuilding the linux distribution to include ROS Foxy so the hardware accelerated examples can be tested. I have an eye to the XIlinx Ubuntu distro, the apt method is easiert than the bitbake one, but there isn't a official Xilinx Ubuntu for the ultra96v2.

@vmayoral
Copy link
Member

vmayoral commented Apr 1, 2022

Yes I had a very busy beginning of the year, I started working in a new company, so I had to put the effort in the new job. Now I am more stabilized, so I can resume the project. Currently I am rebuilding the linux distribution to include ROS Foxy so the hardware accelerated examples can be tested. I have an eye to the XIlinx Ubuntu distro, the apt method is easiert than the bitbake one, but there isn't a official Xilinx Ubuntu for the ultra96v2.

Good to have you back @pimartos!

Yeah, I don't think there will be an official image. AVNET will need to pay Canonical to support Ubuntu officially and these contracts are pretty expensive. AVNET doesn't seem too interested in sponsoring development on their side (otherwise they'd have reacted in here when I first pinged them) but we shouldn't loose faith completely neither.

In yesterday's meeting @jwdinius and @jlamperez offered to help @pimartos. Do you think you three could coordinate yourselves and try to push firmward a first official release at https://github.com/ros-acceleration/acceleration_firmware_ultra96v2? I've given you three privileges there.

@robertbanderso
Copy link

Hi all, I would like to contribute to this effort as well for the Ultra96V2! I currently have a dedicated build machine and have Petalinux 2021.2 and Vitis 2021.2 installed. Is there a ROS2 version that everyone has synched up on yet?

@jwdinius
Copy link

jwdinius commented Apr 1, 2022

I will be using rolling to keep up with the beta release of KRS; see this

@pimartos
Copy link
Author

pimartos commented Apr 1, 2022

Hi
@vmayoral: Sad to hear that about Avnet (I didn't know how Canonical work). By the way: I was able to purchase a kv260 from Xilinx (20 weeks lead time, but on the road)

@jwdinius and @jlamperez: happy to have help with this =) I think that with the combined effort, this will be possible.
@robertbanderso: good! I have an intermitent access to my building machine

About what version of ROS2 to use:
Foxy is older but has a longer EOL date (2Q2023)
Galactic is the current one, but has EOL by the end of this year (Nov.2022)
Rolling is a staging distribution and has the development releases, so it seems to be unstable

Currently I am working with foxy, but I could change if we agree that would be better to use other version :-)

@dirksavage88
Copy link

@pimartos would like to help with the ultra96, but I do not see any in stock anywhere :(

@jwdinius
Copy link

jwdinius commented Apr 3, 2022

Seems like there is renewed interest in this now. To jump start collaboration on this, I propose we move further discussion to a slack or discord channel. @vmayoral does the working group have a discord or slack space we could create an ultra96 channel in?

@pimartos
Copy link
Author

pimartos commented Apr 3, 2022

@dirksavage88: that's are bad news. Maybe a used one?
@jwdinius: I created a discord server acceleration_firmware_ultra96v2, maybe we could use it for further discussion

@vmayoral
Copy link
Member

vmayoral commented Apr 4, 2022

Good to see excitement in here!

My suggestion would be to stick to only one channel for the life HAWG discussions. Don't really mind which one, but I think it's important so that we don't spread the information too much and it's easy for others to learn/engage/contribute. I proposed a while ago a Matrix channel (a security-conscious alternative to Slack, Discord and the sort). Matrix is used in the ROS 2 Security and Real-Time Working Groups as well.

From the README:

Communication Channels

@robertbanderso
Copy link

robertbanderso commented Apr 4, 2022 via email

@jwdinius
Copy link

jwdinius commented Apr 4, 2022

Keeping key points in this thread is a good idea. For troubleshooting and collaborating on building the artifacts for the board, an IM client is the best way to go. I already think the thread regarding this issue is too cluttered and not easy to index when I try to find relevant and/or helpful information.

I posted a message in the Matrix chatroom. It looks like Element is an app that provides an interface for mobile clients, for whoever is interested. I plan on checking in with the Matrix chat daily and will post build steps, questions, etc... when it is pertinent to do so.

@pimartos
Copy link
Author

pimartos commented Apr 5, 2022

Hi @jwdinius
I installed Element (both in my laptop and mobile), I was able to find the chatroom (It says something about convert it to a "space"), I can see the members, but I am not able to read anything or write a message :-( (Is the chat room empty?)

@vmayoral
Copy link
Member

vmayoral commented Apr 5, 2022

@pimartos I'm using it in the browser. The link from @jwdinius above works fine. You can try and use this other one if you prefer. Room's not empty, you should see some comments already there. Chat history is enabled.

@pimartos
Copy link
Author

pimartos commented Apr 24, 2022

Captura de pantalla de 2022-04-24 20-38-58
Hi @vmayoral
I made some progress, but I am still not able to load a kernel. When I use fpgautil to load offloadded_doublevadd_publisher the fpga-manager tells me that I need kv260-dp.bit.bin; I think this file is generated for kv260 board, so I would like to know how can I generate it for ultra96v2. Thanks in advance for any advice about this.
Regards

@pimartos
Copy link
Author

Hi @vmayoral
Sorry for not being in the meeting today, I had a problem, my apologies.
I have good and bad news. The good news are that now I am able to load the kernel and run offloaded_doublevadd_publisher in the board (I had to replace a .dtbo file in the acceleration firmware).
The bad news are that ros2 acceleration list doesn't show anything and to run the example is necessary to load it twice with this sequence:

  1. source /usr/bin/ros_setup.bash
  2. . /krs_ws/local_setup.bash
  3. ros2 acceleration stop
  4. ros2 acceleration start
  5. ros2 acceleration select offloaded_doublevadd_publisher
  6. xmutil listapps
  7. xmutil unloadapp
  8. xmutil listapps
  9. xmutil loadapp offloaded_doublevadd_publisher
  10. cd /krs_ws/lib/offloaded_doublevadd_publisher/
  11. ros2 topic hz /vector --window 10 &
  12. ros2 acceleration select offloaded_doublevadd_publisher

I will test the other examples, If you have a clue about why ros2 acceleration list doesn't show anything, please let me know (xmutil listapps works well)

Regards

@pimartos
Copy link
Author

pimartos commented Jun 14, 2022

Hi @vmayoral and folks,
A lot of time has passed since I opened the issue, but finally I got an acceleration firmware for the ultra96v2 board that runs all the examples from krs_alpha 😄

Details are here

Please give a try, all the feedback is welcomed 😃

@vmayoral
Copy link
Member

Hi @vmayoral and folks, A lot of time has passed since I opened the issue, but finally I got an acceleration firmware for the ultra96v2 board that runs all the examples from krs_alpha 😄

Details are here

Please give a try, all the feedback is welcomed 😃

This is fantastic @pimartos 👍, very well done! I answerd your questions at #29 and catching up with other open threads. I'll find some time to give that a try and report if I encounter any hurdles.

@vmayoral
Copy link
Member

Managed to book some time and confirm the validity of @pimartos's work 👍1! I think this finalizes this ticket and successfully closes the first community port. Very well done @pimartos.

I'll be bringing this success to the attention of the whole group tomorrow and encourage others to test it out and report back feedback if any.

Closing this ticket.

Footnotes

  1. I had to apply a few minor hacks for things on my side. Will review again if time allows for it and contribute to it directly to https://github.com/pimartos/acceleration_firmware_ultra96v2.

Repository owner moved this from In Progress to Done in ROS 2 Hardware Acceleration WG backlog Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

8 participants