rosnodes not connecting to roscore inside docker

asked 2021-01-08 09:30:56 -0500

SS6141 gravatar image

I have built a docker image on my own and run ros nodes in it. However, ros nodes are not able to connect to ros master. kindly find the docker run command I am using below.

 docker run -it \
--user=$(id -u $USER):$(id -g $USER) \
--env="DISPLAY" \
--workdir="/home/$USER" \
--volume="/home/$USER:/home/$USER" \
--volume="/etc/group:/etc/group:ro" \
--volume="/etc/passwd:/etc/passwd:ro" \
--volume="/etc/shadow:/etc/shadow:ro" \
--volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--volume="/dev/ttyUSB0:/dev/ttyUSB0:rw" \
--add-host hostname: \
--add-host in_ros_docker: \
--hostname in_ros_docker \
--net=host \
--env ROS_IP=  \
--privileged \

Am I missing something? Thanks in advance.

edit retag flag offensive close merge delete