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

/home/youruser/catkin_ws/src:/opt/ros/kinetic/share: There is no such file or directory

asked 2022-09-30 17:16:39 -0600

schmidt gravatar image

updated 2022-09-30 23:56:27 -0600

ravijoshi gravatar image

I also have. problem:

/home/youruser/catkin_ws/src:/opt/ros/noetic/share: There is no such file or directory

The steps I have taken:

  1. Installing ROS
  2. Environment Management: Introduced commands

    $ printenv | grep ROS
    $ source /opt/ros/<distro>/setup.bash
    $ source /opt/ros/kinetic/setup.bash
    
  3. Creating the ROS workspace: catkin section, entered commands:

    $ mkdir -p ~/catkin_ws/src
    $ cd ~/catkin_ws/
    $ catkin_make
    $ catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
    $ source devel/setup.bash
    $ echo $ROS_PACKAGE_PATH
    /home/youruser/catkin_ws/src:/opt/ros/kinetic/share
    

Error:

/home/youruser/catkin_ws/src:/opt/ros/noetic/share: There is no such file or directory
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-10-01 00:21:29 -0600

ravijoshi gravatar image

updated 2022-10-01 00:28:10 -0600

You are on the right track and only need minor assistance. Please read below:

  1. It seems you are getting confused about the source command. First of all, because you are in Ubuntu 20.04, you should use ROS Noetic. Therefore, please replace the text kinetic with noetic in every command.
  2. Next, after installing ROS Noetic, you should be able to source it. For example, you can see ROS-related environment variables after sourcing it, as shown below:

    ravi@dell:~$ printenv | grep ROS
    
    ravi@dell:~$ source /opt/ros/noetic/setup.bash
    
    ravi@dell:~$ printenv | grep ROS
    ROS_VERSION=1
    ROS_PYTHON_VERSION=3
    ROS_PACKAGE_PATH=/opt/ros/noetic/share
    ROSLISP_PACKAGE_DIRECTORIES=
    ROS_ETC_DIR=/opt/ros/noetic/etc/ros
    ROS_MASTER_URI=http://localhost:11311
    ROS_ROOT=/opt/ros/noetic/share/ros
    ROS_DISTRO=noetic
    

    Most importantly, you can notice that ROS_DISTRO is set to noetic and ROS_PACKAGE_PATH is set to the installation directory.

  3. You are good to go if you see a similar output on your side. Now, you can create a workspace as you were doing before. Please see the below commands:

    ravi@dell:~$ mkdir -p ~/catkin_ws/src
    ravi@dell:~$ cd catkin_ws/
    
  4. We have created an empty workspace. Now, we should compile it. Before executing catkin_make, do not forget to source your ROS installation as shown below:

    ravi@dell:~/catkin_ws$ source /opt/ros/noetic/setup.bash
    ravi@dell:~/catkin_ws$ catkin_make
    Base path: /home/ravi/catkin_ws
    Source space: /home/ravi/catkin_ws/src
    Build space: /home/ravi/catkin_ws/build
    Devel space: /home/ravi/catkin_ws/devel
    Install space: /home/ravi/catkin_ws/install
    Creating symlink "/home/ravi/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/noetic/share/catkin/cmake/toplevel.cmake"
    ####
    #### Running command: "cmake /home/ravi/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/ravi/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/ravi/catkin_ws/install -G Unix Makefiles" in "/home/ravi/catkin_ws/build"
    ####
    -- The C compiler identification is GNU 9.4.0
    -- The CXX compiler identification is GNU 9.4.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Using CATKIN_DEVEL_PREFIX: /home/ravi/catkin_ws/devel
    -- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
    -- This workspace overlays: /opt/ros/noetic
    -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") 
    -- Using PYTHON_EXECUTABLE: /usr/bin/python3
    -- Using Debian Python package layout
    -- Found PY_em: /usr/lib/python3/dist-packages/em.py  
    -- Using empy: /usr/lib/python3/dist-packages/em.py
    -- Using CATKIN_ENABLE_TESTING: ON
    -- Call enable_testing()
    -- Using CATKIN_TEST_RESULTS_DIR: /home/ravi/catkin_ws/build/test_results
    -- Forcing gtest/gmock from source, though one was otherwise available.
    -- Found gtest sources under '/usr/src/googletest': gtests will be built
    -- Found gmock sources under '/usr/src/googletest': gmock will be built
    -- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") 
    -- Found Threads: TRUE  
    -- Using Python ...
(more)
edit flag offensive delete link more

Comments

I have done everything above, but when I try to execute the command:

$ echo $ROS_PACKAGE_PATH /home/youruser/catkin_ws/src:/opt/ros/kinetic/share

error is returned: /src:/opt/ros/kinetic/share: There is no such file or directory

schmidt gravatar image schmidt  ( 2022-10-01 05:58:36 -0600 )edit

Please format your code correctly because we can not see what the command is and what the output of your command is.

ravijoshi gravatar image ravijoshi  ( 2022-10-01 08:01:34 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2022-09-30 17:16:39 -0600

Seen: 787 times

Last updated: Oct 01 '22