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

Package paths with spaces don't work with rosbash?

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

mackorone gravatar image

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

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/"

and

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

and

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

and

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

and

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
1

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

gvdhoorn gravatar image

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

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

Comments

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 -0600 )edit
1

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 -0600 )edit

Question Tools

Stats

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

Seen: 502 times

Last updated: Jan 31 '14