roslaunch rbx2_tasks fake_turtlebot.launch

106 views
Skip to first unread message

Cactus Jack

unread,
Dec 21, 2016, 11:28:43 AM12/21/16
to ros-by-example
I am trying to run  roslaunch rbx2_tasks fake_turtlebot.launch from ROS examples vol. 2 with Indigo.  I keep getting :
  roslaunch rbx2_tasks fake_turtlebot.launch
... logging to /home/brent/.ros/log/4e5f85aa-c79a-11e6-9d38-00123fafd8db/roslaunch-brent-Dell-DM051-28581.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):
  File "/opt/ros/indigo/share/xacro/xacro.py", line 60, in <module>
    import xacro
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 45, in <module>
    from roslaunch import substitution_args
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 48, in <module>
    import rospkg
ImportError: No module named rospkg
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/share/xacro/xacro.py '/home/brent/catkin_ws/src/rbx1/rbx1_description/urdf/turtlebot.urdf.xacro'] returned with code [1].

Param xml is <param command="$(arg urdf_file)" name="robot_description"/>
The traceback for the exception was written to the log file

Any help would be appreciated,
Thank you,
Cactus


Patrick Goebel

unread,
Dec 21, 2016, 12:01:11 PM12/21/16
to ros-by-...@googlegroups.com
Hi Cactus,

Sounds like your PYTHONPATH variable is not being set properly. What do
you see if you run the command:

$ env | grep PYTHONPATH

--patrick

B Lamb

unread,
Dec 22, 2016, 9:59:19 AM12/22/16
to ros-by-...@googlegroups.com
Patrick,
This what I get:

PYTHONPATH=/home/brent/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/indigo/lib/python2.7/dist-packages

Thank you for your help!
Cactus


--
You received this message because you are subscribed to a topic in the Google Groups "ros-by-example" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ros-by-example/RIYOX6Yh3uc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ros-by-example+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/ros-by-example.
For more options, visit https://groups.google.com/d/optout.


Cactus Jack

unread,
Dec 22, 2016, 10:00:34 AM12/22/16
to ros-by-example
Patrick this is what I get:

PYTHONPATH=/home/brent/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/indigo/lib/python2.7/dist-packages

Thank you for your help,
Cactus

Patrick Goebel

unread,
Dec 22, 2016, 10:16:45 AM12/22/16
to ros-by-...@googlegroups.com
That looks OK.  So something weird is going on.  Are you running Python3 as your default Python interpreter instead of Python2?

I Googled "ImportError: No module named rospkg" and there were a number of suggestions on answers.ros.org.  One of them was to install python-rospkg manually as follows:

$ sudo apt-get install python-rospkg

--patrick

B Lamb

unread,
Dec 22, 2016, 10:29:30 AM12/22/16
to ros-by-...@googlegroups.com
I ran sudo apt-get install python-rospkg again, and it still gives me the same error.  I have Python2 installed.

Cactus


>   File "/opt/ros/indigo/share/xacro/ xacro.py", line 60, in <module>
>     import xacro
>   File
> "/opt/ros/indigo/lib/python2. 7/dist-packages/xacro/__init__ .py", line
> 45, in <module>
>     from roslaunch import substitution_args
>   File
> "/opt/ros/indigo/lib/python2. 7/dist-packages/roslaunch/__ init__.py",
> line 48, in <module>
>     import rospkg
> ImportError: No module named rospkg
> Invalid <param> tag: Cannot load command parameter
> [robot_description]: command [/opt/ros/indigo/share/xacro/ xacro.py
> '/home/brent/catkin_ws/src/ rbx1/rbx1_description/urdf/ turtlebot.urdf.xacro']
> returned with code [1].
>
> Param xml is <param command="$(arg urdf_file)" name="robot_description"/>
> The traceback for the exception was written to the log file
>
> Any help would be appreciated,
> Thank you,
> Cactus


--
You received this message because you are subscribed to a topic in the Google Groups "ros-by-example" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ros-by-example/RIYOX6Yh3uc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ros-by-exampl...@googlegroups.com.

Patrick Goebel

unread,
Dec 22, 2016, 10:55:57 AM12/22/16
to ros-by-...@googlegroups.com
OK, but what version do you see when you run:

$ python --version

--p
You received this message because you are subscribed to the Google Groups "ros-by-example" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-by-exampl...@googlegroups.com.

-- 
The Pi Robot Project
http://www.pirobot.org/wordpress

B Lamb

unread,
Dec 22, 2016, 11:08:52 AM12/22/16
to ros-by-...@googlegroups.com
Patrick,  it shows Python 2.7.13
Cactus

Patrick Goebel

unread,
Dec 22, 2016, 11:22:51 AM12/22/16
to ros-by-...@googlegroups.com
Weirder and weirder.  Try adding the /usr space Python packages to your path:

$ export PYTHONPATH=/usr/lib/python2.7/dist-packages:$PYTHONPATH

This isn't necessary on my machine (Ubuntu 14.04, ROS Indigo), but it might be worth a try.

--patrick

B Lamb

unread,
Dec 22, 2016, 11:31:26 AM12/22/16
to ros-by-...@googlegroups.com
I still get the same error.

Cactus

Patrick Goebel

unread,
Dec 22, 2016, 11:44:14 AM12/22/16
to ros-by-...@googlegroups.com
Hmmm.  Let's go back to your Python version.  I have 2.7.6 under Ubuntu 14.04 and you have 2.7.13.  Are you not running Ubuntu 14.04?  Or did you install Python from source?

--patrick

B Lamb

unread,
Dec 22, 2016, 11:50:13 AM12/22/16
to ros-by-...@googlegroups.com
I am running Ubuntu 14.04.  I did upgrade Python to 2.7.13

Cactus

Patrick Goebel

unread,
Dec 22, 2016, 12:04:48 PM12/22/16
to ros-by-...@googlegroups.com
That might be a problem.  Try the following command to see if you get the same error:

$ roslaunch turtlebot_rviz_launchers view_model.launch

--p

B Lamb

unread,
Dec 22, 2016, 12:28:10 PM12/22/16
to ros-by-...@googlegroups.com
This is what I get:

brent@brent-Dell-DM051:~$ roslaunch turtlebot_rviz_launchers view_model.launch
... logging to /home/brent/.ros/log/d3a5806a-c863-11e6-84d9-00123fafd8db/roslaunch-brent-Dell-DM051-2672.log

Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):
  File "/opt/ros/indigo/share/xacro/xacro.py", line 60, in <module>
    import xacro
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 45, in <module>
    from roslaunch import substitution_args
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 48, in <module>

    import rospkg
ImportError: No module named rospkg
while processing /opt/ros/indigo/share/turtlebot_bringup/launch/includes/robot.launch.xml:
while processing /opt/ros/indigo/share/turtlebot_bringup/launch/includes/description.launch.xml:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/share/xacro/xacro.py '/opt/ros/indigo/share/turtlebot_description/robots/kobuki_hexagons_asus_xtion_pro.urdf.xacro'] returned with code [1].

Param xml is <param command="$(arg urdf_file)" name="robot_description"/>
The traceback for the exception was written to the log file.
 
Brent

Patrick Goebel

unread,
Dec 23, 2016, 11:05:34 AM12/23/16
to ros-by-...@googlegroups.com
Seems the problem is generic then and is not related to the rbx1 or rbx2 code.  So you're probably going to have to go back to Python 2.7.6, but for the definitive answer, best check on answers.ros.org.

--patrick
Reply all
Reply to author
Forward
0 new messages