Hi, I am using the basic software stack for simulating x500 on PX4 gazebo to try and use camera to run a few perception tasks. I am using ROS2 and PX4 with PX4 gz to try and get the simulation camera footage. The issue that I am running into is that I am not completely sure how to get the simulation camera footage in rviz2. I am using the ros_gz_bridge using this command below:
keshav ~/PX4-Autopilot: ros2 run ros_gz_bridge parameter_bridge /camera@sensor_msgs/msg/Image@gz.msgs.Image
[INFO] [1742491673.362984944] [ros_gz_bridge]: Creating GZ->ROS Bridge: [/camera (gz.msgs.Image) -> /camera (sensor_msgs/msg/Image)] (Lazy 0)
[INFO] [1742491673.365093776] [ros_gz_bridge]: Creating ROS->GZ Bridge: [/camera (sensor_msgs/msg/Image) -> /camera (gz.msgs.Image)] (Lazy 0)
However, when I try to view the feed in rviz2, I get no image relayed
I also tried following the steps on ros_gz/ros_gz_bridge/README.md at 630b477ec12627563cc68cfa43d6b3657dc4e985 · gazebosim/ros_gz · GitHub
for Example 2: Run the bridge and exchange images
First we start Gazebo Sim (don't forget to hit play, or Gazebo Sim won't generate any images).
# Shell A:
gz sim sensors_demo.sdf
Let's see the topic where camera images are published.
# Shell B:
gz topic -l | grep image
/rgbd_camera/depth_image
/rgbd_camera/image
Then we start the parameter bridge with the previous topic.
# Shell B:
. ~/bridge_ws/install/setup.bash
ros2 run ros_gz_bridge parameter_bridge /rgbd_camera/image@sensor_msgs/msg/Image@gz.msgs.Image
Now we start the ROS GUI:
# Shell C:
. /opt/ros/rolling/setup.bash
ros2 run rqt_image_view rqt_image_view /rgbd_camera/image
However, when I run this as well. I get no image as seen in the image below: