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

Roslaunch not working

asked 2015-06-02 18:58:14 -0600

prr_shyam gravatar image

updated 2015-06-02 20:47:23 -0600

ahendrix gravatar image

I have two nodes - Mission Control and Simulator. Mission control publishes to command topic and subscribes to telemetry topic while simulator node subscribes to command topic and publishes to telemetry topic. When I use rosrun both runs fine but only mission control node runs when I use roslaunch command. the printed message on the terminal is "The Goal Latitude is 33 and Goal Longitude is -84" and it keeps on running ... No error message. I also know that both nodes are running (used rosnode list to check it). Also both telemetry topic and commands topic are running (rostopic list) The following is my XML code. Please help. Thanks in advance.

    <node pkg="groundcontrolstation" type="" name="mission_control"  output="screen"/>
    <node pkg="groundcontrolstation" type="" name="simulator" output="screen" />
edit retag flag offensive close merge delete



As already said in your duplicate post, please include any error messages you get. There is not enough information in your post to help you.

gvdhoorn gravatar image gvdhoorn  ( 2015-06-03 01:20:54 -0600 )edit

hello as I mentioned above in the post , I am not getting any error message the node keeps on running but one more thing I found out was while using rosrun I have to run simulator node before mission control node for it to work otherwise between the nodes no data is passed. Thank you

prr_shyam gravatar image prr_shyam  ( 2015-06-03 10:19:48 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-06-03 17:42:04 -0600

Horse-man gravatar image

If I understand your question: when you run the node before everything is okay, but when you run the two nodes simultaneously (using the launch file) no data is passed between them. In other terms: the start up order is very important in your case.

First, the documentation of roslaunch specify clearly that :

Roslaunch intentionally does not provide any control on the order or timing of node start up

So if you want that the node run before, you can simply add a waiting time in the code of this last one, for example:


This will force the second node to sleep for two seconds so that the first node will have all the time necessary to initialize and publish its messages.

However, this is like a "brute force" solution, and a nicer one will be to use the following function:

wait_for_message(topic, topic_type, timeout=None)

which will block the execution of the script until a message is published in the specified topic.

edit flag offensive delete link more


Thanks a lot. It works now.

prr_shyam gravatar image prr_shyam  ( 2015-06-05 13:31:32 -0600 )edit

you're welcome.

Horse-man gravatar image Horse-man  ( 2015-06-05 16:03:45 -0600 )edit

Question Tools

1 follower


Asked: 2015-06-02 18:58:14 -0600

Seen: 880 times

Last updated: Jun 03 '15