Error using roslaunch [closed]

asked 2015-07-31 06:18:48 -0500

pexison gravatar image

updated 2015-07-31 08:01:33 -0500

I am making a package named "random", but i changed the name of this package to "third". It compiles but when I am trying to use roslaunch third brain.launch, the output is:

Traceback (most recent call last):   File "/opt/ros/hydro/bin/roslaunch", line 34, in <module>
    import roslaunch   File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/__init__.py", line 48, in <module>
    from . import core as roslaunch_core   File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/core.py", line 42, in <module>
    import xmlrpclib   File "/usr/lib/python2.7/xmlrpclib.py", line 145, in <module>
    import httplib   File "/usr/lib/python2.7/httplib.py", line 79, in <module>
    import mimetools   File "/usr/lib/python2.7/mimetools.py", line 6, in <module>
    import tempfile   File "/usr/lib/python2.7/tempfile.py", line 34, in <module>
    from random import Random as _Random ImportError: cannot import name Random Error in sys.excepthook: Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes   File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report   File "/usr/lib/python2.7/dist-packages/apport/report.py", line 12, in <module>
    import subprocess, tempfile, os.path, urllib, re, pwd, grp, os   File "/usr/lib/python2.7/tempfile.py", line 34, in <module>
    from random import Random as _Random ImportError: cannot import name Random

Original exception was: Traceback (most recent call last):   File "/opt/ros/hydro/bin/roslaunch", line 34, in <module>
    import roslaunch   File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/__init__.py", line 48, in <module>
    from . import core as roslaunch_core   File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/core.py", line 42, in <module>
    import xmlrpclib   File "/usr/lib/python2.7/xmlrpclib.py", line 145, in <module>
    import httplib   File "/usr/lib/python2.7/httplib.py", line 79, in <module>
    import mimetools   File "/usr/lib/python2.7/mimetools.py", line 6, in <module>
    import tempfile   File "/usr/lib/python2.7/tempfile.py", line 34, in <module>
    from random import Random as _Random ImportError: cannot import name Random

The brain.launch file is:

<launch>
  <!--Launch the control of the motors for the turtlebot-->
  <include file="$(find turtlebot_bringup)/launch/minimal.launch"/>
  <node name="brain" pkg="third" type="brain"/>

  <!--Launch the 3d sensor of the kinect-->
  <include file="$(find turtlebot_bringup)/launch/3dsensor.launch"/>

  <arg name="map_file" value="/home/robot/Desktop/epsilon/maps/maps1/map1.yaml"/>
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)"/>

  <arg name="initial_pose_x" default="0.0"/> 
  <arg name="initial_pose_y" default="0.0"/> 
  <arg name="initial_pose_a" default="0.0"/>
  <!--Launch the amcl or stack navigation of the turtlebot-->
  <include file="$(find turtlebot_navigation)/launch/includes/amcl.launch.xml">
    <arg name="initial_pose_x" value="$(arg initial_pose_x)"/>
    <arg name="initial_pose_y" value="$(arg initial_pose_y)"/>
    <arg name="initial_pose_a" value="$(arg initial_pose_a)"/>
  </include>

  <include file="$(find turtlebot_navigation)/launch/includes/move_base.launch.xml"/>

  <!--Run the node that allows us to know where is the turtlebot in the map-- ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2017-04-15 03:01:00.522971

Comments

Have you tried to do another clean build? I.e. removing the build and devel folder and issuing another catkin_make? Also, it is important that the project name in the CMakeLists.txt is changed as well.

mgruhler gravatar image mgruhler  ( 2015-07-31 06:47:21 -0500 )edit

This looks odd. Does roslaunch work with other packages?

dornhege gravatar image dornhege  ( 2015-07-31 07:08:18 -0500 )edit

Yes, for the basic teleop tutorial of the Turtlebot it works!

pexison gravatar image pexison  ( 2015-07-31 07:59:23 -0500 )edit
2

You might have a problem with the random name. Try to remove that from everywhere and see if that fixes it.

dornhege gravatar image dornhege  ( 2015-07-31 08:04:51 -0500 )edit