ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Issues rendering Camera feed with Ros2 Rolling and Gazebo

asked 2021-04-03 01:59:20 -0600

anthares gravatar image

Hello everyone.

I am using this post https://medium.com/creating-a-gazebo-... as guidance. My goal is to bring up a model in Gazebo/Ros and display the video feed received via Ros.

I am using Gazebo 11.4, Rolling and RViz2.

I launch Gazebo via Ros Launch File and I successfully get to load the model. If I run ros2 topic list, I get few results including: /fake_car/pi_camera/camera_info /fake_car/pi_camera/image_raw

Also, if I can see:

ros2 topic info /fake_car/pi_camera/image_raw -v Type: sensor_msgs/msg/Image

Publisher count: 1

Node name: camera Node namespace: /fake_car Topic type: sensor_msgs/msg/Image Endpoint type: PUBLISHER GID: 01.0f.c0.e4.74.50.04.00.01.00.00.00.00.00.3a.03.00.00.00.00.00.00.00.00 QoS profile: Reliability: BEST_EFFORT Durability: VOLATILE Lifespan: 2147483651294967295 nanoseconds Deadline: 2147483651294967295 nanoseconds Liveliness: AUTOMATIC Liveliness lease duration: 2147483651294967295 nanoseconds

Subscription count: 1

Node name: rviz Node namespace: / Topic type: sensor_msgs/msg/Image Endpoint type: SUBSCRIPTION GID: 01.0f.c0.e4.34.51.04.00.01.00.00.00.00.00.2e.04.00.00.00.00.00.00.00.00 QoS profile: Reliability: BEST_EFFORT Durability: VOLATILE Lifespan: 2147483651294967295 nanoseconds Deadline: 2147483651294967295 nanoseconds Liveliness: AUTOMATIC Liveliness lease duration: 2147483651294967295 nanoseconds

However, in RVIZ I don't get any image whatsoever. What am I missing?

Cheers, Anthares

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-04-03 09:54:48 -0600

clyde gravatar image

The Gazebo camera plugin publishes images BEST_EFFORT, while the default Rviz2 QoS is RELIABLE. You'll need to tweak Rviz2 to subscribe to images BEST_EFFORT.

It's also possible that the frame_id in the image message doesn't appear in the TF tree that Rviz2 knows about. If you run Rviz2 from the command line you'll see error messages to this effect.

For more info see these answers :

https://answers.ros.org/question/3586...

https://answers.ros.org/question/3593...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-04-03 01:59:20 -0600

Seen: 416 times

Last updated: Apr 03 '21