I'm using ros-melodic in a docker container based on the osrf/ros:melodic-desktop-full image.

What my docker file does:

My Dockerfile installs the jackal's robot ros-stack as in this tutorial from clearpath themselves.

After that, I install the ros-bridge-server, since I have to connect to Unity. (this part is not a problem though).

Finally I install my custom package which simply contains a custom roslaunch file. This launch file is finally executed at the bottom of the Dockerfile.

What I'd expect:

When running the container (with appropriate port mapping etc.) I'd expect the container to start, launch roscore, gazebo with the defined worlds & robots, and move_base as a planner.

What happens:

A few nodes start:

controller_spawner (controller_manager/spawner)
ekf_localization (robot_localization/ekf_localization_node)
file_server (file_server/file_server)
gazebo (gazebo_ros/gzserver)
move_base (move_base/move_base)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
rosapi (rosapi/rosapi_node)
rosbridge_websocket (rosbridge_server/rosbridge_websocket)
twist_marker_server (interactive_marker_twist_server/marker_server)
twist_mux (twist_mux/twist_mux)
urdf_spawner (gazebo_ros/spawn_model)

But then some errors in the ASLA lib are thrown. (missing sound cards; I am assuming that this does not break gazebo in total). Then the controller-spawner (and a few other processes) starts but quickly prints a warning "Controller Spawner couldn't find the expected controller_manager ROS interface." A little bit later a error "Spawn service failed. Exiting." comes up.

Sending goals to move_base does not result in anything. The output of roswtf shows that the controller_spawner node died.

Sometimes, if I run the exact same roslaunch command again in an attached shell after the startup of the container, the gazebo world works fine and the robots moves.

I did work through this answer (and 4 hours of additional research, tests etc.), tried / checked all of their ideas, but that did not change anything. This answer does not help. All proposed packages are installed.


  1. If everything this this answer is implemented as written there, what could be the reason for the error messages?
  2. Could somebody point me to a docker-file that works with gazebo more or less out of the box so that I can go from there?

I can also post a link to my dockerfile if it helps. Any help and ideas appreciated.

  • OS: Ubuntu 18.04 (in a container)
  • ROS: Melodic
  • all in docker on WSL2


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.