Ask Your Question

Package paths with spaces don't work with rosbash?

asked 2014-01-30 14:39:55 -0500

mackorone gravatar image

updated 2014-04-20 14:09:26 -0500

ngrennan gravatar image

The location of the package I am working in is

/host/Users/Mark\ Won/Documents/School\ Work/College/Junior/Junior\ 2nd\ Semester/CSE\ 468/workspace/tutorials

I have added the following to my ~/.bashrc

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/host/Users/Mark\ Won/Documents/School\ Work/College/Junior/Junior\ 2nd\ Semester/CSE\ 468/workspace/

However, when I try to run roscd tutorials, I get the following error:

bash: cd: /host/Users/MarkWon/Documents/SchoolWork/College/Junior/Junior: No such file or directory

Does anyone know how to get package paths with spaces in the name to comply with the rosbash suite?

---------UPDATE: I've tried adding the following to my ~/.bashrc, but to no avail:-------

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:"/host/Users/Mark\ Won/Documents/School\ Work/College/Junior/Junior\ 2nd\ Semester/CSE\ 468/workspace/"


export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:"/host/Users/Mark Won/Documents/School Work/College/Junior/Junior 2nd Semester/CSE 468/workspace/"


export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:"\"/host/Users/Mark Won/Documents/School Work/College/Junior/Junior 2nd Semester/CSE 468/workspace/\""


export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:"/host/Users/Mark\\ Won/Documents/School Work/College/Junior/Junior\\ 2nd\\ Semester/CSE\\ 468/workspace/"


export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/host/Users/Mark\\ Won/Documents/School Work/College/Junior/Junior\\ 2nd\\ Semester/CSE\\ 468/workspace/
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-01-30 20:53:12 -0500

gvdhoorn gravatar image

updated 2014-01-30 20:55:00 -0500

Paths with spaces need to be enclosed in double quotes (ie: ").

This is more a bash related question than a ROS one. See fi:

on stackoverflow.

edit flag offensive delete link more


I've tried added quotes and taking out the backslash. I've also tried quotes with the backslash. Nothing seems to be working. I think the issue is that I'm not calling the cd command, ROS is. Therefore, I don't have any control over whether or not the path is quoted when cd is called.

mackorone gravatar image mackorone  ( 2014-01-31 03:14:43 -0500 )edit

I agree; I don't think rosbash properly support paths with spaces. In general, spaces in path names are *strongly* discouraged on Linux.

ahendrix gravatar image ahendrix  ( 2014-01-31 05:44:46 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-01-30 14:39:55 -0500

Seen: 395 times

Last updated: Jan 31 '14