This repository helps in running ROS Noetic on non-supported devices. It has been tested on Ubuntu 22 and 24. It has not been tested on Windows and Mac.
- Docker installed. Follow the instructions here.
- On Linux, make sure to follow the Docker post-install steps here.
First, clone the repository and navigate to the directory:
git clone https://github.com/harishkumarbalaji/ROS-noetic-docker.git
cd ROS-noetic-dockerIf you have an NVIDIA GPU, ensure you have the correct drivers installed and test them:
nvidia-smiIf nvidia-smi is not found, install the NVIDIA drivers. Follow the instructions here.
Next, install NVIDIA Container Toolkit and configure the runtime. Follow the instructions here.
Use Docker Compose to build the image:
docker-compose buildNote: If you are using without NVIDIA GPU, check the comments in the Docker Compose file and make the corresponding changes before you start the container.
Start the container using Docker Compose:
docker-compose up -dTo execute into the container in another terminal:
docker exec -it ros-noetic-container bashTo check if the GUI is working from the container, run:
source /opt/ros/noetic/setup.bash
rvizNote: Make sure to run
roscorein another terminal before you run RViz or any nodes.
This should open the RViz GUI.
You can use the host volume under the container's home directory inside the username folder. This allows you to build and run files that are on the host machine. For example, if you have a file on the host machine at /home/username/project, you can access it inside the container at /home/username/host/project.
To have a good developer environment inside the Docker container, you can use the Dev Containers extension in VSCode. Follow these steps:
- Install the Dev Containers extension in VSCode.
- Open the cloned repository in VSCode.
- Press
ctrl+shift+p(or select the remote explorer icon from the left bar) and selectDev-Containers: Attach to Running Container.... - Select the container name
ros-noetic-container. - Once attached, Select
File->Open Folder.... - Select the folder/workspace you want to open in the container.
This will set up the development environment inside the Docker container, allowing you to use VSCode features seamlessly.