ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How do I use catkin in a directory containing a space character?

asked 2015-08-27 05:41:52 -0500

VictorLamoine gravatar image

I'm trying to use catkin in a directory that contains a space, when pressing TAB to trigger the tab completion the script fails:

~/SpiderOak Hive/catkin_workspace/devel$ 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

My .bashrc looks like: source ~/SpiderOak\ Hive/catkin_workspace/devel/setup.bash

Clearly a \ is missing somewhere to escape the space character, where should I add it? I've tried adding it to line 3 of setup.sh (it does not change anything):

: ${_CATKIN_SETUP_DIR:=/home/dell/SpiderOak\ Hive/catkin_workspace/devel}

edit retag flag offensive close merge delete

Comments

is that space so necessary? why making your life hard !

Mehdi. gravatar image Mehdi.  ( 2015-08-27 10:02:21 -0500 )edit

Yes, the Spider Oak app does not allow to rename the sync directory.

VictorLamoine gravatar image VictorLamoine  ( 2015-08-27 11:23:03 -0500 )edit

Can you try doing ln -s /SpiderOak\ Hive/ SpiderOak_Hive and then work with that static link which points to the original folder but with a name containing no spaces.

Mehdi. gravatar image Mehdi.  ( 2015-08-27 11:31:13 -0500 )edit

Nice idea but it doesn't work either!

VictorLamoine gravatar image VictorLamoine  ( 2015-08-27 12:54:55 -0500 )edit

This is very easily reproducable (just create a workspace path that includes a space in it) and I would say this is a bug. Could be that somewhere some script does not properly quote paths. Adding escape chars everywhere would only be a work around. I'd report this at the ros_comm tracker.

gvdhoorn gravatar image gvdhoorn  ( 2015-08-29 06:25:40 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-09-16 14:58:51 -0500

VictorLamoine gravatar image

It is not possible to use catkin in a directory containing special characters for the moment, an issue is opened here if you want more information and/or want to contribute to ROS by adding this feature:

https://github.com/ros/ros_comm/issue...

My question was closely related to SpiderOak; an alternative solution is to not use the SpiderOak Hive and setup sync folders instead. See https://spideroak.com/forum/search/?q... for more details.

edit flag offensive delete link more
1

answered 2015-09-17 00:45:53 -0500

ahendrix gravatar image

Don't use file names with spaces on Linux. It breaks lots of tools, not just ROS.

If you have a tool which uses spaces in the file name, you could try making a symlink around the directory name with a space; for example:

cd ~
ln -s /home/dell/SpiderOak\ Hive/catkin_workspace

Now you can:

cd ~/catkin_workspace
catkin_make

etc without the space in the path name

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-08-27 05:41:52 -0500

Seen: 475 times

Last updated: Sep 17 '15