0
$\begingroup$

Rosanswers logo

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!


Originally posted by Rufio on ROS Answers with karma: 43 on 2014-12-29

Post score: 0


Original comments

Comment by 130s on 2014-12-29:
Do you have std_msgs package installed? And edit your question with this command's output: ls -l `rospack find std_msgs`/msg

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by ahendrix with karma: 47576 on 2014-12-29

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.