Skip to content

Instantly share code, notes, and snippets.

@tomlankhorst
Last active June 3, 2020 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomlankhorst/0993a05c242ace8c79cd5331c1f3eb0a to your computer and use it in GitHub Desktop.
Save tomlankhorst/0993a05c242ace8c79cd5331c1f3eb0a to your computer and use it in GitHub Desktop.
Launch ROS nodes in a docker container (roscpp_tutorial/talker_listener). This example uses host networking, but creating a network and setting the ROS_MASTER_URI should work just as well. See: https://github.com/ros/ros_tutorials/tree/melodic-devel/roscpp_tutorials https://hub.docker.com/_/ros/
<launch>
<node launch-prefix="docker run --rm --name listener -v$HOME:$HOME -u$UID --privileged --net=host -eROS_HOME=$ROS_HOME ros:melodic-ros-base-bionic" name="listener" pkg="roscpp_tutorials" type="listener" output="screen"/>
<node launch-prefix="docker run --rm --name talker -v$HOME:$HOME -u$UID --privileged --net=host -eROS_HOME=$ROS_HOME ros:melodic-ros-base-bionic" name="talker" pkg="roscpp_tutorials" type="talker" output="screen"/>
</launch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment