Error using roslaunch [closed]
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-- ...
Have you tried to do another clean build? I.e. removing the
build
anddevel
folder and issuing anothercatkin_make
? Also, it is important that the project name in theCMakeLists.txt
is changed as well.This looks odd. Does roslaunch work with other packages?
Yes, for the basic teleop tutorial of the Turtlebot it works!
You might have a problem with the random name. Try to remove that from everywhere and see if that fixes it.