ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I figured out how to solve the issue:

2 Steps:

A) Work locally with the Autoware.AI repos, installing at first a local image (Case 2 of this website https://github.com/Autoware-AI/autoware.ai/wiki/Generic-x86-Docker#run-an-autoware-docker-container). For that I runned a base container:

$ fork/docker/generic$ ./run.sh -b

Then I installed the package contained in the official DockerFile (After run the container, inside container):

~/generic$ cd /home/$USERNAME/Autoware
~/generic$ wget https://raw.githubusercontent.com/Autoware-AI/autoware.ai/1.14.0/autoware.ai.repos
~/generic$ source /home/$USERNAME/Autoware/install/local_setup.bash
~/generic$ vcs import src < autoware.ai.repos
~/generic$ source /opt/ros/$ROS_DISTRO/setup.bash
~/generic$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
~/generic$ source /home/$USERNAME/Autoware/install/local_setup.bash >> /home/$USERNAME/.bashrc

The steps above must be done just the first time you run the base image. Then after exit the container and re-enter other times later...it is required to run just one command to enable ROS pkgs to work:

~/generic$ source /home/$USERNAME/Autoware/install/local_setup.bash

B) Then I worked around and everytime I exited the container, the files are saved wheI enter the container again. However later to build all the project with my custom changed codes and upload to dockerhub, I have built an image, and changed the Dockerfile, as described in steps below:

Basically I needed to build the image and afterwards run the container with a custom Dockerfile (that pulled the code from muy github).

My Dockerfile was:

image description

And After the modification, the Dockerfile became:

image description To dowload the modified ROS codes to my image, instead of autoware repo ROS pkgs, I needed:

1 - Copy the autoware.ai.repos file from here: https://raw.githubusercontent.com/Autoware-AI/autoware.ai/1.14.0/autoware.ai.repos To my docker local folder (docker/generic) and unwrap them with vcs import command as the Dockerfile displays above...

2- Edit the autoware.ai.repos, in order to change the address of some of the repositories contained in autoware.ai.repos to my personal github:

I Removed the lines:

autoware/visualization: type: git url: https://github.com/Autoware-AI/visualization.git version: 1.14.0 And replaced by:

autoware/visualization: type: git url: https://github.com/marcusvinicius178/visualization

Afterwards I followed the build instructions in case 3 here: https://github.com/Autoware-AI/autoware.ai/wiki/Generic-x86-Docker#run-an-autoware-docker-container

$ ./build.sh

$ ./run.sh -t local

I know that may exist a more professional way to work with Docker images, and build a new Dockerfile based on the original one. But I am not that expert in Docker and also in this way my problem was solved.

I figured out how to solve the issue:

2 Steps:

A) Work locally with the Autoware.AI repos, installing at first a local image (Case 2 of this website https://github.com/Autoware-AI/autoware.ai/wiki/Generic-x86-Docker#run-an-autoware-docker-container). For that I runned a base container:

$ fork/docker/generic$ ./run.sh -b
-b home/desired_empty_folder

Then I installed the package contained in the official DockerFile (After run the container, inside container):

~/generic$ cd /home/$USERNAME/Autoware
~/generic$ wget https://raw.githubusercontent.com/Autoware-AI/autoware.ai/1.14.0/autoware.ai.repos
~/generic$ source /home/$USERNAME/Autoware/install/local_setup.bash
~/generic$ vcs import src < autoware.ai.repos
~/generic$ source /opt/ros/$ROS_DISTRO/setup.bash
~/generic$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
~/generic$ source /home/$USERNAME/Autoware/install/local_setup.bash >> /home/$USERNAME/.bashrc

The steps above must be done just the first time you run the base image. Then after exit the container and re-enter other times later...it is required to run just one command to enable ROS pkgs to work:

~/generic$ source /home/$USERNAME/Autoware/install/local_setup.bash

B) Then I worked around and everytime I exited the container, the files are saved wheI enter the container again. However later to build all the project with my custom changed codes and upload to dockerhub, I have built an image, and changed the Dockerfile, as described in steps below:

Basically I needed to build the image and afterwards run the container with a custom Dockerfile (that pulled the code from muy github).

My Dockerfile was:

image description

And After the modification, the Dockerfile became:

image description To dowload the modified ROS codes to my image, instead of autoware repo ROS pkgs, I needed:

1 - Copy the autoware.ai.repos file from here: https://raw.githubusercontent.com/Autoware-AI/autoware.ai/1.14.0/autoware.ai.repos To my docker local folder (docker/generic) and unwrap them with vcs import command as the Dockerfile displays above...

2- Edit the autoware.ai.repos, in order to change the address of some of the repositories contained in autoware.ai.repos to my personal github:

I Removed the lines:

autoware/visualization: type: git url: https://github.com/Autoware-AI/visualization.git version: 1.14.0 And replaced by:

autoware/visualization: type: git url: https://github.com/marcusvinicius178/visualization

Afterwards I followed the build instructions in case 3 here: https://github.com/Autoware-AI/autoware.ai/wiki/Generic-x86-Docker#run-an-autoware-docker-container

$ ./build.sh

$ ./run.sh -t local

I know that may exist a more professional way to work with Docker images, and build a new Dockerfile based on the original one. But I am not that expert in Docker and also in this way my problem was solved.