Logical camera plugin with ROS - no message received

asked 2021-02-25 13:52:50 -0500

Lucas gravatar image


I am currently following the course "Hello (real) world with ROS" on edX (can be found here). Unfortunately this MOOC is currently archived so I can't get help from the staff.

In the week 5 module, we use the logical camera plugin. I have it correctly configured (or at least I think, I followed the instructions given in the course), and the topic /hrwros/logical_camera is properly running, as I see it with a rostopic list command.

But when I try to rostopic echo /hrwros/logical_camera, I get the following error :

WARNING: no messages received and simulated time is active. Is /clock being published?

Of course my simulation isn't paused (would be too simple), and I verified with a rostopic echo /clock that the clock is properly published.

So I tried investigating the problem further. When I run my simulation, I have the following in my terminal :

[Dbg] [ROSLogicalCameraPlugin.cc:73] Started Logical Camera plugin with name: logical_camera
[Dbg] [ROSLogicalCameraPlugin.cc:136] Using model frame prefix of: logical_camera_
[Dbg] [ROSLogicalCameraPlugin.cc:174] Subscribing to gazebo topic: ~/logical_camera/logical_camera_link/logical_camera/models
[Dbg] [ROSLogicalCameraPlugin.cc:177] Publishing to ROS topic: /hrwros/logical_camera

So I checked everything was right on the Gazebo side with a gz topic list and then a gz topic echo /gazebo/hrwros_world/logical_camera/logical_camera_link/logical_camera/models. Everything is running properly, and I properly receive messages from gazebo with 2 models being seen and then the pose of the camera itself.

I ran a rqt_graph and verified there was an existing link between the gazebo node and my /hrwros/logical_camera topic.

So I really don't get why I can't rostopic echo this topic. After extensive research online, the only lead I found was about the simulation being paused... Does it have anything to do with time synchronization ? If that is the case, what would be a correct way to fix it ?

I am deeply sorry if a similar question has already been asked, and would greatly appreciate if anyone could point me toward a solution.

Thanks !

edit retag flag offensive close merge delete