msardonini / oakd_isaac_ros

An implementation of Isaac VIO and SLAM using the OakD stereo camera and imu
21 stars 3 forks source link

Unable to build base image #2

Open ciniminis1 opened 1 year ago

ciniminis1 commented 1 year ago

Hi @msardonini , I try to make your implementation work, but I face following issue when runnig ./run_docker.sh:

Building x86_64.spdlog.humble.nav2.flystereo.user base as image: isaac_ros_dev-x86_64 using key x86_64.spdlog.humble.nav2.flystereo.user
Using configured docker search paths: /home/pr_admin/workspaces/oakd_isaac_ros/src/isaac_ros_common/scripts//home/pr_admin/workspaces/oakd_isaac_ros/src/oakd_s2/docker/ /home/pr_admin/workspaces/oakd_isaac_ros/src/isaac_ros_common/scripts/../docker
Using base image name not specified, using ''
Using docker context dir not specified, using Dockerfile directory
Could not resolve Dockerfiles for target image ids: x86_64.spdlog.humble.nav2.flystereo
Partially resolved the following Dockerfiles for target image: x86_64.spdlog.humble.nav2.flystereo.user
/home/pr_admin/workspaces/oakd_isaac_ros/src/isaac_ros_common/scripts/../docker/Dockerfile.user
Failed to build base image: isaac_ros_dev-x86_64, aborting.

Could you please elaborate on this? Thank you.

msardonini commented 1 year ago

Hi @martinlucan,

thanks for raising the issue. I'm currently travelling, I'll try to reproduce the issue when I'm back next week

msardonini commented 1 year ago

@martinlucan

What are the contents of the generated file ./src/isaac_ros_common/scripts/.isaac_ros_common-config ? It gets generated by run_docker.sh, and should look something like this

CONFIG_IMAGE_KEY="spdlog.humble.nav2.flystereo"
CONFIG_DOCKER_SEARCH_DIRS=(<absolute path to docker config>)

where "\<absolute path to docker config>" leads here

It seems your docker search dirs are a little messed up.. possibly there's a bug in how that absolute path gets generated.

ciniminis1 commented 1 year ago

@msardonini Please see the file contect below, it seems to be correct from my point of view:


CONFIG_IMAGE_KEY="spdlog.humble.nav2.flystereo"
CONFIG_DOCKER_SEARCH_DIRS=(/home/pr_admin/workspaces/isaac_ros_dev/oakd_isaac_ros/src/oakd_s2/docker/)

is the implementation compatible also with OAK-Pro camera ?

androvsky commented 1 year ago

I'm having the same problem.

Building aarch64.spdlog.humble.nav2.flystereo.user base as image: isaac_ros_dev-aarch64 using key aarch64.spdlog.humble.nav2.flystereo.user
Using configured docker search paths: /home/andy/oakd_isaac_ros/src/isaac_ros_common/scripts//home/andy/oakd_isaac_ros/src/oakd_s2/docker/ /home/andy/oakd_isaac_ros/src/isaac_ros_common/scripts/../docker
Using base image name not specified, using ''
Using docker context dir not specified, using Dockerfile directory
Could not resolve Dockerfiles for target image ids: aarch64.spdlog.humble.nav2.flystereo
Partially resolved the following Dockerfiles for target image: aarch64.spdlog.humble.nav2.flystereo.user
/home/andy/oakd_isaac_ros/src/isaac_ros_common/scripts/../docker/Dockerfile.user
Failed to build base image: isaac_ros_dev-aarch64, aborting.
~/oakd_isaac_ros
CONFIG_IMAGE_KEY="spdlog.humble.nav2.flystereo"
CONFIG_DOCKER_SEARCH_DIRS=(/home/andy/oakd_isaac_ros/src/oakd_s2/docker/)

I don't know if it's related but I can't pull the submodules using --recurse-submodules (probably an error on my end, I haven't used git that much), so I went in and checked them all out manually. isaac-ros-common complains that d5878ed isn't part of that repo, but I was able to checkout the others okay.

And I'm also curious if it'll work with an Oak-D Pro camera.

msardonini commented 1 year ago

Unfortunately, I don't have an Oak-D Pro camera to test with. However, if the API for acquiring stereo images is the same, then it should also work.

Some questions about your setup.

  1. Have you checked out submodules using the command: git submodule update --init --recursive ? If that command shows any output, something has changed
  2. Is there a NVIDIA GPU on your system, with cuda drivers, docker, and nvidia-container-runtime installed?
  3. Is the user you are running with a part of the "docker" group?
  4. What OS / version are you running with?

An exercise that might be useful is to try to run the original implementation without my edits, and instead of using the OakD camera, use a provided rosbag.

androvsky commented 1 year ago

Very long story made slightly shorter: I'm on a Jetson Orin Nano devkit, Jetpack 5.1.1, Ubuntu 20.04. I'd already successfully run nvidia's original implementation before finding this repo. My user is part of the "docker" group.

I eventually discovered the problem I was having with git was that even though I was cloning using https, the submodules were using ssh and failing because I didn't have a key set up for my devkit. git submodule updatea --init --recursive executes cleanly now. With that fixed the image started building and installed a ton of stuff, but eventually failed with the following errors: errors.log

msardonini commented 1 year ago

@androvsky I tried recreating the issue on my Nano without success, though I'm on an earlier version of Jetpack. There's likely some backwards incompatible change in the build system I'll need to address.

The "invalid syntax" errors are curious.. you don't have any local changes in your git repo do you?

If you have an ubuntu desktop, could you try building with that?

androvsky commented 1 year ago

I do appreciate the help, apologies for this reply being slow and messy. So far it looks like an error on my end (as I expected tbh); I wiped my jetson and started from scratch doing nothing other than building and running the nvidia implementation and then this one (well, after increasing the size of the swap partition anyway). It seems to have worked better, but I'm still running into errors that I'm completely lost on. I'll attach my next error log, but I fear it's missing some context. errors2.log

So nav2_mppi_controller was missing xtensor and I couldn't use apt to install it in Dockerfile.nav2. After a lot of messing around I tried simply pulling and building the source of xtensor and related dependencies in the Dockerfile.nav2, but after adding xtl, xtensor, and xsimd to it I'm getting compile errors. I know this isn't the right way of solving it, but the nav2 git seems to have everything set up correctly with the rosdep dependencies in the package.xml file from that git; I have no idea why they're not getting handled automatically. Although I will say I'm having to guess at install prefix, I'm using cmake -DCMAKE_INSTALL_PREFIX=/usr .. since I can't find another reference in the other Dockfiles.

I just found the following in my error logs in the middle of writing this post:

35.60 Setting up libomp-10-dev (1:10.0.0-4ubuntu1) ...
35.61 Setting up libomp-dev (1:10.0-50~exp1) ...
35.61 Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
36.63 executing command [apt-get install -y nlohmann-json3-dev]
36.63 executing command [apt-get install -y libomp-dev]
36.63 #All required rosdeps installed successfully
36.63 ERROR: the following packages/stacks could not have their rosdep keys resolved
36.63 to system dependencies:
36.63 nav2_mppi_controller: [xsimd] defined as "not available" for OS version [focal]
36.63 nav2_system_tests: No definition of [gazebo_ros_pkgs] for OS version [focal]
36.63 Continuing to install resolvable dependencies...

So it looks like an issue with the Orin being on Ubuntu 20.04?

I tried building on my desktop but I'm on Ubuntu 23.04 which appeared to be too new for the nvidia container dependency, but I just discovered I can use the version for the older distros. I don't know if I can cross-compile this for jetson, I really only need to run it on an Orin so getting the desktop version going won't help me any.