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

Publisher sleep forever using roslaunch

asked 2014-09-30 22:35:01 -0600

Min gravatar image

When I ran a simple publisher in the tutorial ( ). I got a problem that if I ran it through launch file, the node will sleep forever. But if I ran it through rosrun [packagename] talker, it works fine. My launch file looks like this, can anyone help me?


<master auto="start"/>

<param name="use_sim_time" value="true"/>

<node pkg="hybridAstar" type="talker" name="talker" output="screen"/>


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-01 01:12:20 -0600

Wolf gravatar image

The problem is

<param name="use_sim_time" value="true"/>

This means the uses simulation time published to /clock topic by e. g. Gazebo or a rosbag started by rosbag play --clock file.bag.

See this ans this for info about clock and simulation time

This means your node will not spin before any other node (gazebo/rosbag) is started and publishes to /clock topic

edit flag offensive delete link more


Yes, problem solved. Thanks a lot ;)

Min gravatar image Min  ( 2014-10-01 02:14:49 -0600 )edit

Plz accept answer and close thread if issue is solved...

Wolf gravatar image Wolf  ( 2014-10-01 03:17:08 -0600 )edit

Question Tools

1 follower


Asked: 2014-09-30 22:35:01 -0600

Seen: 438 times

Last updated: Oct 01 '14