Script to install ROS2 Foxy desktop on AGX Xavier jetpack 4.5.1

I took Dusty’s Dockerfile for foxy converted and added to it to make a script to install ros2 foxy-desktop on the jetson AGX. Also works on 4G nano. Tested on a clean install of the latest jetpack for both machines. I added urdf_parser_py xacro and joint_state_publisher to the standard desktop image. GitHub - griz1112/build-ros2-foxy-for-jetson: script to build ros2 foxy desktop on jetson nano and jetson AGX Xavier

Hi Griz, good to hear from you, and thanks for sharing the script! I will have to check this out as I wasn’t able to build Foxy desktop previously, just base. Looks like you installed some additional dependencies beforehand to get it working. Thanks!

The part that took the most time is numpy. If you do python3 -c “import
numpy” on the agx it core dumps. Found a few references to this behavior online. Its the copy in the ubuntu repo apparently as deleting it and reinstalling doesn’t work. PyQt5 and PyQt5-sip is another one that caused me much grief. I found another error last night as I was testing some more stuff but that was a syntax issue on my script fixing that now. It built but had problems running. Any ideas for cleaning it up or making it better let me know I’m not a dev so it might be a little crude in spots :) Started on galactic last night I will post that up once its working. One issue is trying to install melodic as well. It deletes several files you need to build foxy. I think installing the ros 1 equivalents will fix that since its a python3 vs python2 thing looks like. Rosdep is the biggie. I installed the python2.7 version and was able to get the build to start working through dependencies on that one now.

If numpy segfaults when you import it, my guess is it’s this issue: Illegal instruction (core dumped) on import for numpy 1.19.5 on ARM64 · Issue #18131 · numpy/numpy · GitHub
And can try running export OPENBLAS_CORETYPE=ARMV8 beforehand.

This is one reason that I prefer the containerized approach, which it seems more folks are using containers for ROS2 development in particular considering how many packages it installs on your system. However as you have found, you can take my Dockerfiles and run the commands or script them if you prefer to not use containers.

Yea that is the post I saw tried it but didn’t work for me. Perhaps I wasn’t doing it correctly. I’m just used to having it native I’m learning docker but not there yet. And I’m stubborn :) I have a 500g nvme on my AGX mount the home dir opt and /usr/lib from that so plenty of room. I’m using the docker image for the nanosaur. I’ve played with LXD as well. The problem I ran into was getting the stereolabs ros wrapper to compile. All the starter images I found don’t have the cuda dev tools on them and I haven’t figured out how to get that installed yet. They are sending me a 2i and I wanted ros2 to do some demos with.

That export command worked with numpy must have fat fingered it before. Cool it takes awhile to build that.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.