Robotics StackExchange | Archived questions

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

i wrote a c++ node that publish std_msgs::Float64 to a topic where my gazebo is connected.

so the connection is done, but i have a problem cause gazebo didn't receive the message sent.

i'm trying : rostopic echo /pkgrobot/joint1position_controller/command

to message published, and i have this warning :

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

if you could help i would be so thankful.

Asked by samo on 2018-06-29 09:15:04 UTC

Comments

This question is rather vague. If you update your question with additional pertinent details (formatted code, etc.), it's more likely that someone here will be able to help you.

Asked by josephcoombe on 2018-06-29 14:20:47 UTC

Answers

Possible Problems:

  • Gazebo is paused
    solution: Un-pause Gazebo. "simulated time is active" means that ROS Time is slaved to simulation.
  • Your C++ ROS Node is not publishing to /pkg_robot/joint1_position_controller/command
    solution: Confirm that your C++ ROS Node is in fact written to publish to /pkg_robot/joint1_position_controller/command
  • Your C++ ROS Node is otherwise not doing what your expect
    solution 1: Check your C++ ROS Node (maybe consult http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29)
    solution 2: Update your question here with your C++ ROS Node (formatted)

Aside, how do you intend subscribe to this /pkg_robot/joint1_position_controller/command ROS Topic on the Gazebo side?

Asked by josephcoombe on 2018-06-29 14:19:22 UTC

Comments

I hope this answers your question: https://answers.ros.org/question/12083/messages-being-blocked-from-publishing/

Asked by anjulo on 2021-08-10 23:59:59 UTC

Comments

Yeah, the simulation in Gazebo has been paused. Just start that and you will see /clock start publishing msgs

Asked by Siddharth on 2022-06-29 07:32:50 UTC

Comments