Open iCaran opened 2 months ago
i dont think it's my pi specific either, i tried
export ROS_DOMAIN_ID=0
export ROS_LOCALHOST_ONLY=0
export ROS_MASTER_URI=http://<pi-ip>:11311
export ROS_HOSTNAME=<laptop-ip>
and then ran rviz on my ubuntu 22, ros humble, i7-gtx1650 laptop. I subscrivbed to /map there and i got the exact same behaviour and result, the same partial map formation and freezing on rviz and the same error on the terminal
@Yadunund can you assign yourself to this?
@iCaran there are a number of things that could cause this so let's try to isolate the problem.
it would be great if you could provide a minimal reproducible example. ie, write a simple python/cpp script that publishes an occupancy map which when you subscribe to on RViz leads to this error. Please put this in a public Github repo. This will help us debug
Are you also running RViz on the RPi? What is the display display manager used?
What RMW implementation were you using? Was the same exported in all three terminals?
i dont think it's my pi specific either, i tried
export ROS_DOMAIN_ID=0 export ROS_LOCALHOST_ONLY=0 export ROS_MASTER_URI=http://<pi-ip>:11311 export ROS_HOSTNAME=<laptop-ip>
and then ran rviz on my ubuntu 22, ros humble, i7-gtx1650 laptop. I subscrivbed to /map there and i got the exact same behaviour and result, the same partial map formation and freezing on rviz and the same error on the terminal
ROS_MASTER_URI
and ROS_HOSTNAME
are only used in ROS 1 and have no effect with ROS 2 systems. Hi, sorry for the delayed response, but here's an update:
I've created a minimal reproducible example as requested. You can find the code in this repository: https://github.com/iCaran/SimpleRvizMapVisualizationTest. This is a ROS 2 package that publishes a simple occupancy grid, which when visualized in RViz, results in the same error I reported.
I tested this on two systems:
The results were nearly identical on both platforms. However, there was a slight difference in the reported OpenGL version:
Raspberry Pi 5 error:
[INFO] [1728230864.027825491] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [1728230864.027933543] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[INFO] [1728230864.075937684] [rviz2]: Stereo is NOT SUPPORTED
rviz/glsl120/indexed_8bit_image.frag GLSL link result: active samplers with a different type refer to the same texture image unit
Laptop error:
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[INFO] [1728236109.461400971] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [1728236109.461575845] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[INFO] [1728236109.527414202] [rviz2]: Stereo is NOT SUPPORTED
[ERROR] [1728236154.682309578] [rviz2]: Vertex Program: rviz/glsl120/indexed_8bit_image.vert Fragment Program: rviz/glsl120/indexed_8bit_image.frag GLSL link result:
active samplers with a different type refer to the same texture image unit
Are you also running RViz on the RPi? What is the display manager used?
What RMW implementation were you using? Was the same exported in all three terminals?
Let me know if you need any further information or testing. Thanks!
@iCaran I haven't had a chance to run your example yet but coincidentally I had to the chance to run slam_toolbox
on a RPi 4 running Jazzy. Everything was installed via binaries. I was able to successfully subscribe to the occupancy grid/map on my other PC also running jazzy binaries. All systems running GDM3 as well. Will see if I can get my hands on a Pi 5 to reproduce.
I am running Ros2 Jazzy on Ubuntu 24 on a Raspberry Pi 5. I have attached an RPLidar A1M8 to it. I want to use it to create a map of my environment, for that, I'm using the Slam_Toolbox.
But I encounter some errors while trying to visualize the map in Rviz2.
Here's my process:
Terminal 1:
Ignore the libthrottle_node.so warning, I was trying to create a throttled /scan topic with less frequency (i thought of trying to start with 1/sec), so as to try to not overwhelm my Pi5, but even with Ros2 topic_tools properly installed and the libthrottle_node.so in the correct place, for some reason I keep getting this error. If someone could help me with that it would be great help.
Terminal 2:
Terminal 3:
This is the error part, when I open Rviz2, and subscribe to the /map topic, for the first second, a map begins to take shape, and then this error happens and the map stops to update any further. I have checked by scanning the /scan topic after the crash, and it is fine, it's rviz which is having trouble visualizing the map. See the image below:
I have done:
due to some suggestions I read online while trying to debug this issue, but these don't seem to work. I'm not sure if all of this is important, but here are my slam_toolbox params for the lidar, as i read that maybe decreasing the resolution may help with the issue:
I found a question exactly similar to mine, but it has no responses. https://stackoverflow.com/questions/77907899/error-while-visualizing-map-from-slam-toolbox-on-rviz