EntityComponentManager Failed to create component - running in docker image
I've been building some code to run robots using Ros2 - humble and gazebo fortress. Running locally on my machine it works fine. I've built a docker image to run it on the university cluster, and when I start up gazebo I get:
...
[Msg] Found no publishers on /clock, adding root clock topic
[Dbg] [SimulationRunner.cc:496] Creating PostUpdate worker threads: 7
[Dbg] [SimulationRunner.cc:507] Creating postupdate worker thread (0)
[Dbg] [SimulationRunner.cc:507] Creating postupdate worker thread (1)
[Dbg] [SimulationRunner.cc:507] Creating postupdate worker thread (2)
[Dbg] [SimulationRunner.cc:507] Creating postupdate worker thread (3)
[Dbg] [SimulationRunner.cc:507] Creating postupdate worker thread (4)
[Dbg] [SimulationRunner.cc:507] Creating postupdate worker thread (5)
[Err] [EntityComponentManager.cc:1026] Failed to create component of type [12013502194675979273] for entity [7]. Type has not been properly registered.
[Msg] Contact system publishing on world/rl_world/model/plane/link/plane_link/sensor/touch_sensor/contact
[Dbg] [TouchPlugin.cc:216] Started touch plugin [floor]
[Err] [EntityComponentManager.cc:1026] Failed to create component of type [9436740692853731264] for entity [53]. Type has not been properly registered.
[Err] [EntityComponentManager.cc:1026] Failed to create component of type [9436740692853731264] for entity [54]. Type has not been properly registered.
[Err] [EntityComponentManager.cc:1026] Failed to create component of type [9436740692853731264] for entity [55]. Type has not been properly registered.
[Err] [EntityComponentManager.cc:1026] Failed to create component of type [9436740692853731264] for entity [56]. Type has not been properly registered.
[Err] [EntityComponentManager.cc:1026] Failed to create component of type [9436740692853731264] for entity [57]. Type has not been properly registered.
[Err] [EntityComponentManager.cc:1026] Failed to create component of type [9436740692853731264] for entity [58]. Type has not been properly registered.
[Err] [EntityComponentManager.cc:1026] Failed to create component of type [9436740692853731264] for entity [59]. Type has not been properly registered.
[Err] [EntityComponentManager.cc:1026] Failed to create component of type [9436740692853731264] for entity [60]. Type has not been properly registered.
Segmentation fault (core dumped)
I'm running gazebo programatically using something like this:
#include "simulation.hh"
#include <stdexcept>
#include <ignition/gazebo/ServerConfig.hh>
#include <ignition/gazebo/Server.hh>
using namespace ignition::gazebo;
void Simulation::start() {
ServerConfig config;
config.SetSdfFile(_sdfPath);
_server = new Server(config);
};
void Simulation::step() {
if(_server)
_server->RunOnce(false);
else
throw std::runtime_error("Simulation not started: call start first!");
};
If I run it using the console command ign gazebo -s world.sdf it seems to be fine. - Though like I say, my code running it as above works fine on my machine, just not the docker image.
My docker file looks like this:
FROM ros:humble-ros-base-jammy
RUN apt-get update
RUN apt-get install -y python3-pip wget
RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
RUN apt-get update
RUN apt-get install -y ignition-fortress
RUN apt-get install -y ros-humble-ros-gz
RUN pip install tensorflow ...