suchetanrs / ORB-SLAM3-ROS2-Docker

This repository contains a full wrapper class for running ORB-SLAM3 on a docker container with ROS2 Humble with Ubuntu 22.04.
153 stars 35 forks source link

Can't get simulation running #26

Closed birneamstiel closed 1 month ago

birneamstiel commented 1 month ago

First of all, thanks @suchetanrs for providing this wrapper together with very detailed instructions.

I'm having a problem of receiving the camera data from simulation container within ORB-SLAM3.

What is working: I was successfully setting up the ORB-SLAM3 wrapper container as well as the corresponding gazebo simulation container. The ORB-SLAM3 Viewer opens up and shows the black window "Waiting for images". The simulation (within the other container) loads and shows the scene in which I can move the robot. Also, the topics are published correctly in the simulation container, e.g. /robot_0/rgb_camera is publishing data. I do also see the correct topics when running ros2 topic list within the ORB-SLAM3 container.

Screenshot 2024-10-15 at 11 43 58

However, it seems that there is no data published when listening from the ORB-SLAM3 container (running ros2 topic echo /robot_0/rgb_camera doesn't produce any results) and also the ORB-SLAM3 viewer stays black. I did double check the ROS_DOMAIN_ID variable, it is set to 55 in both containers.

Any help is greatly appreciated.

suchetanrs commented 1 month ago

Hi! Thanks a lot for your issue. I can't tell exactly why this is happening directly but I suppose you could run the talker and listener nodes from the demo nodes cpp package and try to check if you're able to establish communication between the containers. That is, run the talker node in one container and the listener node in the other container. Please let me know if any messages pass.

suchetanrs commented 1 month ago

Ah! Maybe it's the ROS_LOCALHOST_ONLY environment variable. I had set this to 1 in the simulation container to support machines without a network card. I think I forgot to update that variable here :p If the talker and listener from demo nodes cpp don't work, maybe you could try to do export ROS_LOCALHOST_ONLY=1 in the orb slam3 container and check if the communication works.

birneamstiel commented 1 month ago

@suchetanrs thanks for the quick reply.

Indeed, setting ROS_LOCALHOST_ONLY within the orb slam3 container does resolve the issue and everything works like a charm! Thanks again.

suchetanrs commented 1 month ago

@birneamstiel Awesome! Great to hear. Please feel free to open a PR if you wish to ;) If not, I'll push the changes tomorrow. Closing this issue now :)