Gazebo8 stops publishing /gazebo/link_states
Edit: It appears as though the problem occurs only for Gazebo8, having nothing to do with Singularity containment. My local machine is using Gazebo7.4, while I'm trying to use Gazebo8 which exhibit the problem.
The problem occurs right after start. Both Gazebo and my node is started and everything waits for the robot to spawn inside Gazebo. Once this is verified my experiments begin. From the output I can see that my code is started, waiting and then starts the experiment and is able to complete one round of evaluation before Gazebo stops publishing /gazebo/link_states
. My code reports that it is not getting any data and I have verified this using rostopic
which reports that right after start the topic is published, but after one round it stops.
My code subscribes and unsubscribes to /gazebo/link_states
during the course of an evaluation. This is done to ensure that only data related to the current evaluation is used to assess the performance. This setup worked for Gazebo7, but not for Gazebo8. Is this expected behavior in Gazebo8?
Edit: (Thanks to gvdhoorn)
So the problem was not actually related to the clock topic failing to publish. The problem was/is that my node did not handle Gazebo stopping to publish /gazebo/link_states
(which lead to a divide by 0 error). My code now correctly handles this situation, but there is still a problem that after the first iteration of my evaluation code Gazebo stops publishing /gazebo/link_states
.
inside the Docker container, or without it?
On my local machine it works outside Singularity. Will test inside Singularity right away. Just to clarify, I can't run inside Docker on the cluster, but I can create the Singularity container from a Docker image.
I was specifically wondering about the Docker image, as that is what you are starting from according to your OP.
Ah, my apologies. My sentence is a bit inaccurate, I'm creating the image from
docker://ros:robot
and moving my source folders into the Singularity container as explained on their documentation. I.e. I never create a full Docker image that can be run, only Singularity.Then it would seem you'll have to run your Singularity image on your machine to see whether it's a config issue on the cluster.
Apart from that: "ros crashes" is not a good way to start (as 'ros' does not run): which node crashes?
Well, that is sort of the problem. I never see a segmentation fault or anything like it.
roslaunch
detects my node as crashed, but there is nothing indicating what has gone wrong and the only fault that I can find is theConnection refused
error frommaster.log
.Just to add, after testing on my local machine the same problem happens so it seems to be something with how Singularity functions.
and
so is it your node that crashes, or the whole setup? If it's just your node, then I would try to run it in GDB and see what is going on when it crashes. If it's 'everything', then that is a different problem.