0
$\begingroup$

I've been building some code to do reinforcement learning on robots in a ros-gazebo environment, using ros2 humble and (ignition) gazebo fortress. My code is running fine on my machine, but when I build a docker image to run it on the university computing cluster I'm receiving the following error:

...
[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)

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

Could there be some dependency missing from my image?

One relevant thing may be that I'm running programatically gazebo using the following code:

#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!");
};

Starting gazebo in the docker container using the console seems to work fine.

$\endgroup$

1 Answer 1

1
$\begingroup$

Ok I've got it working now. Doesn't really answer why it wasn't working, but it was taking the version of gazebo fortress installed by ros-gz rather than the one I installed directly. Building it from source and making sure my code is using that version fixed my issue.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.