Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
roslaunch completion fails when path contains white spaces / special characters #658
Creating a work-space in a path containing one or more special characters will lead to errors.
[roslaunch.config][INFO] 2015-08-29 13:47:15,356: loading config file /home/victor/catkin_workspacé/src/fanuc_experimental/fanuc_r1000ia_support/launch/test_r1000ia80f.launch [roslaunch][ERROR] 2015-08-29 13:47:15,381: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)
~/SpiderOak Hive/catkin_workspace/$ roslaunch fanuc_m10ia_support find: `/home/dell/SpiderOak': No such file or directory find: `Hive/catkin_workspace/src/fanuc/fanuc_m10ia_support': No such file or directory
$ cd ~ && mkdir "catkin workspace" && cd catkin\ workspace/ $ mkdir src && cd src/ $ git clone https://github.com/ros-industrial/industrial_core.git ... $ git clone https://github.com/ros-industrial/fanuc.git ... $ catkin_init_workspace Creating symlink "/home/victor/catkin workspace/src/CMakeLists.txt" pointing to "/opt/ros/indigo/share/catkin/cmake/toplevel.cmake" $ cd .. && catkin_make ... $ source devel/setup.bash $ roslaunch fanuc_m10ia_support test[TAB]find: `/home/victor/catkin': No such file or directory find: `workspace/src/fanuc/fanuc_m10ia_support': No such file or directory
The auto-completion fails; if you type the launch file name manually Rviz will launch but nothing will show up (a yellow Fanuc robot should be in the visualizer)
$ roslaunch fanuc_m10ia_support test_m10ia.launch
referenced this issue
Aug 31, 2015
Thanks for the detailed example. I was able to reproduce it based on that and created a fix for the roslaunch completion function: ros/ros#88
Can you please try if the patch also addresses the problem with special characters? I only tested white spaces. If you want to try the fix the easiest way is probably to apply the patch to the installed file directly (/opt/ros/indigo/share/rosbash/rosbash).
I also updated the title of this ticket to describe the actual problem more precisely.
This completely fixes the auto completion feature, including special characters (I have tested
But this does not (completely) solve the issue; either launching
This looks similar to ros/ros/#54:
victor@desktop:~/catkin_~è*#ù$ roslaunch fanuc_m10ia_support test_m10ia.launch ... logging to /home/victor/.ros/log/5aebf60e-500a-11e5-9dc9-10c37b6bfb43/roslaunch-desktop-17009.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. 'ascii' codec can't decode byte 0xc3 in position 21: ordinal not in range(128) The traceback for the exception was written to the log file
With a work-space containing a white space (and no special characters) the
$ locale LANG=fr_FR.UTF-8 LANGUAGE=fr_FR LC_CTYPE="fr_FR.UTF-8" LC_NUMERIC="fr_FR.UTF-8" LC_TIME="fr_FR.UTF-8" LC_COLLATE="fr_FR.UTF-8" LC_MONETARY="fr_FR.UTF-8" LC_MESSAGES="fr_FR.UTF-8" LC_PAPER="fr_FR.UTF-8" LC_NAME="fr_FR.UTF-8" LC_ADDRESS="fr_FR.UTF-8" LC_TELEPHONE="fr_FR.UTF-8" LC_MEASUREMENT="fr_FR.UTF-8" LC_IDENTIFICATION="fr_FR.UTF-8" LC_ALL= $ locale -a C C.UTF-8 en_AG en_AG.utf8 en_AU.utf8 en_BW.utf8 en_CA.utf8 en_DK.utf8 en_GB.utf8 en_HK.utf8 en_IE.utf8 en_IN en_IN.utf8 en_NG en_NG.utf8 en_NZ.utf8 en_PH.utf8 en_SG.utf8 en_US.utf8 en_ZA.utf8 en_ZM en_ZM.utf8 en_ZW.utf8 fr_BE.utf8 fr_CA.utf8 fr_CH.utf8 fr_FR.utf8 fr_LU.utf8 POSIX
Since the error message states "The traceback for the exception was written to the log file" it would have been beneficial to include this traceback from the log in the comment. Anyway I have reproduced the problem locally and had the following in the log:
The problem is that the default encoding of your Python version is
There are also several not ROS related compenents (e.g. using Qt via CMake) which won't handle that case. So I am not sure if it is "worth the effort".
If you would like to look into it further pull requests are definitely appreciated
I think you are right; it's not worth the pain investigating this much further.
ros/ros/pull/88 is a first step towards compatibility so it's better than nothing
I have been suffering this issue in Kubuntu 16.04 with ros kinetic. I hadn't any special character in the path of the project, but it failed every time I tried to execute roslaunch.
Finally, I have been able to workaround this bug by adding the following lines to the file /usr/lib/python2.7/posixpath.py
import sys reload(sys) sys.setdefaultencoding("utf-8")
I know it isn't the best way to solve this issue, but it's the only thing that works for me.