ROS 2 Containers and Jetson nano

I am currently working on a robotics project on the Jetson Nano. Ubuntu 18.04 installed running a ROS 2 foxy docker container. I am currently trying to create a ROS 2 workspace and package etc but the new directory never updates on the host system to follow the tutorials through on the ROS 2 Documentation. I am currently using the following code to start up the docker. If i create a .txt file the host system updates of if i create a directory within the host system it updates in the container just not the other way wound.
“sudo docker run --privileged --runtime nvidia -it --rm -v /home/jetson:/home --network=host dustynv/ros:foxy-desktop-l4t-r35.”

I also have another issue where the python modules need reinstalling every time is there a method of installing all required modules at the start up of the container.

Does anyone have any ideas how to fix these issues.

Hi @sgccanni, try mounting your directory to a slightly different path in container so it doesn’t take over entire home directory in container, like --volume /home/jetson:/home/jetson

Now when you are running inside of container, if you run these commands in container, do you see the changes outside container?

mkdir /home/jetson/my_dir
echo "ABC123" > /home/jetson/my_dir/test.txt

If there are still issues, check the folder access privileges or see if it’s related to using the --priviledged flag.

Either use docker commit to save your changes to another container tag, or create/build your own Dockerfile that installs the added packages and uses dustynv/ros:foxy-desktop-l4t-r35 as the base image.

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