I recently found the gz model for x500 with a depth camera, and would like to transfer the images from gz to ROS2. For this, I found that the image_bridge from ros_gz_image is suitable (GitHub - gazebosim/ros_gz: Integration between ROS (1 and 2) and Gazebo simulation). I have no problem using this package after installing the correct version (apt install ros-humble-ros-gzgarden) for one instance. My issue is that I want to use several instances of x500_depth - it seems like all of them publishes camera data on the same topics in gz, namely /camera and /depth_camera. Does anyone know if it is possible to change this in order to incorporate the model name as a namespace parameter in the topics? (/x500_depth_0/camera, /x500_depth_1/camera)
Do you know if sensors in gz support subtopics? If not, do you have any other idea of how to change the sdf file in order to support several camera sensors that does not publish on the same topic?
I checked and my understanding is that that sensor does not support subtopics, you would need to implement that feature.
The workaround would be to dynamically edit the sdf file before using it, and change the topic element. But, the camera model is fetched from fuel, therefore you first need to fetch the camera model from fuel and implement it in x500_depth
The only problem I encountered is that the topic is quite lengthy, but I think this would be a non-issue due to launch files. I just thought of this solution, I will update if I think of a more refined approach.
hi sorry but may i know where did you put that plugin, and also when I run that have an error in the px4 saying pxh> [Err] [SystemLoader.cc:92] Failed to load system plugin [libgazebo_ros_camera.so] : Could not find shared library.