Ask Your Question

roslaunch does not work but rusrun does

asked 2014-12-29 05:41:46 -0500

Rufio gravatar image

updated 2014-12-29 16:30:15 -0500


When starting my node "test_node" from the package "test_pck" with rosrun, everything works fine. Now i have written following launchfile named test.launch which i have placed in src/launch/

<group ns="test">
  <node pkg="test_pck" name="test_name" type="test_node"/>

however if i run "roslaunch test_pck test.launch" i gett following error in the terminal:

Traceback (most recent call last):
File "/opt/ros/indigo/bin/roslaunch", line 34, in <module>
import roslaunch
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/", line 61, in <module>
from .scriptapi import ROSLaunch
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/", line 42, in <module>
import roslaunch.parent
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/", line 54, in <module>
import roslaunch.server
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/", line 78, in <module>
from rosgraph_msgs.msg import Log
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph_msgs/msg/", line 2, in <module>
from ._Log import *
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph_msgs/msg/", line 7, in <module>
import std_msgs.msg
ImportError: No module named msg

The terminal output of rospack find std_msgs is /opt/ros/indigo/share/std_msgs

I have absolutely now clue what i can do in order to solve this problem. Thank you for every hint!

edit retag flag offensive close merge delete


Do you have std_msgs package installed? And edit your question with this command's output: ls -l `rospack find std_msgs`/msg

130s gravatar image 130s  ( 2014-12-29 10:51:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-12-29 17:09:49 -0500

ahendrix gravatar image

This looks like a bug in roslaunch; not in your launch file or your packages.

There are two things you can try to check if this is a bug in roslaunch:

  • Try running roslaunch by itself: roslaunch. (It might fail or it might not, depending on how the imports are structured).
  • Try running roscore: roscore . roscore uses parts of the roslaunch API, and I suspect it will fail in the same way.

If either of these commands gives you a similar stacktrace to the one you're getting now, then this is definitely a bug in roslaunch and should be reported on their bug tracker:

If both of those work, then it's more likely that there's some kind of error in your launch file.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-12-29 05:41:46 -0500

Seen: 957 times

Last updated: Dec 29 '14