-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I find a way to execute both AWSIM and autoware within docker containers #81
Comments
Excellent!!! It works perfect for me! |
Great work providing a thorough write-up. I followed your steps exactly and was able to launch
|
I ran into this problem before. It turns out I need to set localhost to multicast on host and some other things before running containers, as described in the AWSIM quick start demo:
And the required environment variables should be set within both containers of AWSIM and autoware:
So the overall steps would be:
|
@st9540808 @shmpwk FROM devel as prebuilted |
@Sam827-r I think this issue has been introduced since the re-organisation of Docker: https://github.com/autowarefoundation/autoware/tree/da22bdc9215edf188cdbf8ef34637b43956d9049 @oguzkaganozt what would be the most appropriate approach to avoid sourcing ROS2 in the container as recommended previously here. |
@st9540808 |
@ShoukatM Below is my current environment
The full Dockerfile, in
The build.sh file, in
After building the docker image, you still need to build the autoware stack. Then follow the instructions in Quick start demo from AWSIM, you should be able to run autoware with AWSIM just like the screenshot at the beginning. |
hi Taiyou Kuo, |
Signed-off-by: Alptuğ Cırıt <alptug@leodrive.ai>
I was trying to use AWSIM and autoware within docker containers for my research. It seems that some people also want to use AWSIM within docker. So I think it would be helpful if I write down the step I used.
The environment I used is shown in the table below
First, I build a new docker image from dockerfile. This is because AWSIM seems to require an environment without the presence of ROS 2. However, the ghrc images that autoware shipped already source the ROS 2
setup.bash
for you. Therefore, you will always end up with an environment with ROS 2 activated.Autoware already provides instructions and scripts to build a docker image:
https://github.com/autowarefoundation/autoware/tree/main/docker#building-docker-images-on-your-local-machine
Next, I slightly modify the dockerfile in autoware/docker/autoware-universe/Dockerfile so that it will not source
setup.bash
when building imageautoware/docker/autoware-universe/Dockerfile
It might be helpful to change the image name and tag to another so that it will not conflict with the default image from ghrc. The image name and tag can be changed in autoware/docker/build.sh. For example, I set tag to
devel.tags=st9540808:$rosdistro-latest$image_name_suffix
and the name and tag will best9540808:humble-latest-cuda
. I also use the option--no-cache
to not use cache when building the image. The part that I modified is shown belowautoware/docker/build.sh
Then simply follow the instruction in autoware to build the image
Finally, after building the image, set the correct localhost setting within a container as described in https://tier4.github.io/AWSIM/GettingStarted/QuickStartDemo/
then run
AWSIM_v1.1.0/AWSIM_demo.x86_64
. The command will be:After that, run another container and enable ROS 2 to check if it works. If all works correctly, you can see the topic from AWSIM.
If the topics correctly show up, the result will be the same as shown in the documentation. The difference is that both AWSIM and autoware are running within different containers.
The text was updated successfully, but these errors were encountered: