Problem on zsh - roscd:cd: no such file or directory
Hi all
I'm just getting started with ROS and trying to follow https://wiki.ros.org/ROS/Tutorials/CreatingPackage to create a catkin package. I've done the following on my Mac running zsh
:
$ cd /Volumes/Data/Projects/catkin_ws/src
$ catkin_create_pkg beginner_tutorials std_msgs rospy roscpp
$ cd /Volumes/Data/Projects/catkin_ws
$ catkin_make
Base path: /Volumes/Data/Projects/catkin_ws
Source space: /Volumes/Data/Projects/catkin_ws/src
Build space: /Volumes/Data/Projects/catkin_ws/build
Devel space: /Volumes/Data/Projects/catkin_ws/devel
Install space: /Volumes/Data/Projects/catkin_ws/install
####
#### Running command: "cmake /Volumes/Data/Projects/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/Volumes/Data/Projects/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/Volumes/Data/Projects/catkin_ws/install -G Unix Makefiles" in "/Volumes/Data/Projects/catkin_ws/build"
####
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Using CATKIN_DEVEL_PREFIX: /Volumes/Data/Projects/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /Volumes/Data/Projects/catkin_ws/devel;/opt/ros/melodic;/usr/local/opt/qt
-- This workspace overlays: /Volumes/Data/Projects/catkin_ws/devel;/opt/ros/melodic
-- Found PythonInterp: /usr/local/bin/python2 (found suitable version "2.7.16", minimum required is "2")
-- Using PYTHON_EXECUTABLE: /usr/local/bin/python2
-- Using default Python package layout
-- Using empy: /usr/local/lib/python2.7/site-packages/em.pyc
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /Volumes/Data/Projects/catkin_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/Volumes/Data/Projects/googletest': gtests will be built
-- Found gmock sources under '/Volumes/Data/Projects/googletest': gmock will be built
-- Found PythonInterp: /usr/local/bin/python2 (found version "2.7.16")
-- Using Python nosetests: /usr/local/bin/nosetests-2.7
-- catkin 0.7.17
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
gmock
gmock_main
gtest
gtest_main
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Volumes/Data/Projects/catkin_ws/build
####
#### Running command: "make -j4 -l4" in "/Volumes/Data/Projects/catkin_ws/build"
####
$ catkin_ws roscd beginner_tutorials
roscd:[:28: too many arguments
roscd:cd:36: no such file or directory: beginner_tutorials/Volumes/Data/Projects/catkin_ws/src/beginner_tutorials
Anyone know why roscd
gives the too many arguments
error and it tries to find the path beginner_tutorials/Volumes/Data/Projects/catkin_ws/src/beginner_tutorials
?
It runs fine on bash
though. Is roszsh
meant to be reasonably stable?
Asked by mun on 2019-08-26 09:03:29 UTC
Comments
You just write
roscd beginner_tutorials
right? Because it shouldn't look forbeginner_tutorials/Volumes/Data/Projects/catkin_ws/src/beginner_tutorials
, it should be looking for/Volumes/Data/Projects/catkin_ws/src/beginner_tutorials
Also when you just type
roscd
, where it brings you?Asked by ermanas on 2019-08-26 09:25:22 UTC
@ermanas
roscd
gives the error "Neither ROS_WORKSPACE is set nor a catkin workspace is listed in CMAKE_PREFIX_PATH. Please set ROS_WORKSPACE or source a catkin workspace to use roscd with no arguments."ROS_WORKSPACE
is indeed not set. I thought it'd be set after runningsource setup.bash
?Asked by mun on 2019-08-26 09:58:43 UTC
@ermanas I've tried manually setting
ROS_WORKSPACE
.roscd
alone no longer throws an error, butroscd
still tries to look forbeginner_tutorials/Volumes/Data/Projects/catkin_ws/src/beginner_tutorials
. I'm usingzsh
-- not sure if that makes a difference.Asked by mun on 2019-08-26 20:25:36 UTC
From the output of
catkin_make
I get the impression that there are some more fundamental problems with your install of ROS @mun. How did you install it? Which version of OSX is this? ROS 1 on OSX support is spotty at best, and typically doesn't really work right now (afaik, I'm not a mac user).And an observation: if you're using
zsh
, you shouldsource
thesetup.zsh
file (or whatever thezsh
equivalent ofsource
is). Notsetup.bash
.Asked by gvdhoorn on 2019-08-27 03:47:55 UTC
When I run roscd beginner_tutorials I get the exact same error: roscd beginner_tutorials roscd:[:28: too many arguments roscd:cd:36: no such file or directory: beginner_tutorials/home/laura/catkin_ws/src/beginner_tutorials Does anyone know how to fix this?
Asked by lauraadalmolin on 2020-03-31 07:20:57 UTC