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

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

Hi,

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/

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

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/__init__.py", line 61, in <module>
from .scriptapi import ROSLaunch
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/scriptapi.py", line 42, in <module>
import roslaunch.parent
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 54, in <module>
import roslaunch.server
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/server.py", line 78, in <module>
from rosgraph_msgs.msg import Log
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph_msgs/msg/__init__.py", line 2, in <module>
from ._Log import *
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph_msgs/msg/_Log.py", 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

Comments

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
0

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: https://github.com/ros/ros_comm/issues

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

Question Tools

Stats

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

Seen: 1,101 times

Last updated: Dec 29 '14