Skip to content
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

Executing Roslaunch commands inside a running container #146

Open
tecena opened this issue Oct 6, 2022 · 1 comment
Open

Executing Roslaunch commands inside a running container #146

tecena opened this issue Oct 6, 2022 · 1 comment

Comments

@tecena
Copy link

tecena commented Oct 6, 2022

Hi,

I am trying to run autoware with carla. Autoware is running as a container in linux machine. now after starting the container, with the following commands

docker run
-d
-it --rm
--volume=$(pwd)/autoware-contents:/home/autoware/autoware-contents:ro
--env="DISPLAY=${DISPLAY}"
--privileged
--net=host
$RUNTIME
carla-autoware:latest, the container is up

now I want to launch my launch files to start the auotware nodes using
roslaunch carla_autoware_agent carla_autoware_agent.launch town:=Town04 synchronous_mode:=true
with out entering into the container so I tried to run with docker exec, I am getting the following error
OCI runtime exec failed: exec failed: unable to start container process: exec: "roslaunch": executable file not found in $PATH: unknown

How do I run the roslaunch command in a linux machine without entering into the container either using shell script.

@jpsndrs
Copy link

jpsndrs commented Oct 6, 2022

Hi @tecena,

When the docker is running, you can send it a command similar to this docker ps | grep -Eo '([0-9]|[a-z]){12}' | xargs -I %% docker exec --user autoware --env-file='$DIR_WHERE_YOUR_ENV_LIST_IS/env-list' %% roslaunch carla_autoware_agent carla_autoware_agent.launch town:=Town04 synchronous_mode:=true and to over come the error you will need to specify the environment variables. To do that, echo out the env variables from the docker container to a file and transfer to your host from which you will be running the above command. Let me know how you go!... Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants