본문 바로가기
Robot/ROS

[ROS] DAY1 우분투 듀얼 부팅 18.04버전 &에러 없애기

by 9루트 2022. 2. 11.

에러가 일어나서 검색한 후

kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ catkin init
Catkin workspace `/home/kw-cobot/catkin_ws` is already initialized. No action taken.
-------------------------------------------------------------
Profile:                     default
Extending:                   None
Workspace:                   /home/kw-cobot/catkin_ws
-------------------------------------------------------------
Build Space:       [missing] /home/kw-cobot/catkin_ws/build
Devel Space:       [missing] /home/kw-cobot/catkin_ws/devel
Install Space:      [unused] /home/kw-cobot/catkin_ws/install
Log Space:         [missing] /home/kw-cobot/catkin_ws/logs
Source Space:       [exists] /home/kw-cobot/catkin_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------


-------------------------------------------------------------
WARNING: Your workspace is not extending any other result
space, but it is set to use a `linked` devel space layout.
This requires the `catkin` CMake package in your source
space in order to be built.
-------------------------------------------------------------

kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ subl ~/.bashrc
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ ls
src
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ catkin build
-------------------------------------------------------------
Profile:                     default
Extending:                   None
Workspace:                   /home/kw-cobot/catkin_ws
-------------------------------------------------------------
Build Space:        [exists] /home/kw-cobot/catkin_ws/build
Devel Space:        [exists] /home/kw-cobot/catkin_ws/devel
Install Space:      [unused] /home/kw-cobot/catkin_ws/install
Log Space:         [missing] /home/kw-cobot/catkin_ws/logs
Source Space:       [exists] /home/kw-cobot/catkin_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------
NOTE: Forcing CMake to run for each package.
-------------------------------------------------------------

-------------------------------------------------------------
WARNING: Your workspace is not extending any other result
space, but it is set to use a `linked` devel space layout.
This requires the `catkin` CMake package in your source
space in order to be built.
-------------------------------------------------------------

[build] No packages were found in the source space '/home/kw-cobot/catkin_ws/src'
[build] No packages to be built.
[build] Package table is up to date.                                           
Starting  >>> catkin_tools_prebuild                                            
_______________________________________________________________________________
Errors     << catkin_tools_prebuild:cmake /home/kw-cobot/catkin_ws/logs/catkin_tools_prebuild/build.cmake.000.log
CMake Error at /home/kw-cobot/catkin_ws/build/catkin_tools_prebuild/CMakeLists.txt:12 (message):
  The catkin CMake module was not found, but it is required to build a linked
  workspace.  To resolve this, please do one of the following, and try
  building again.



   1. Source the setup.sh file from an existing catkin workspace:
      source SETUP_FILE



   2. Extend another catkin workspace's result (install or devel) space:
      catkin config --extend RESULT_SPACE



   3. Set `catkin_DIR` to the directory containing `catkin-config.cmake`:
      catkin config --cmake-args -Dcatkin_DIR=CATKIN_CMAKE_CONFIG_PATH



   4. Add the catkin source package to your workspace's source space:
      cd SOURCE_SPACE && git clone https://github.com/ros/catkin.git


cd /home/kw-cobot/catkin_ws/build/catkin_tools_prebuild; catkin build --get-env catkin_tools_prebuild | catkin env -si  /usr/bin/cmake /home/kw-cobot/catkin_ws/build/catkin_tools_prebuild --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/kw-cobot/catkin_ws/devel/.private/catkin_tools_prebuild -DCMAKE_INSTALL_PREFIX=/home/kw-cobot/catkin_ws/install; cd -
...............................................................................
Failed     << catkin_tools_prebuild:cmake          [ Exited with code 1 ]      
Failed    <<< catkin_tools_prebuild                [ 0.9 seconds ]             
[build] Summary: 0 of 1 packages succeeded.                                    
[build]   Ignored:   None.                                                     
[build]   Warnings:  None.                                                     
[build]   Abandoned: None.                                                     
[build]   Failed:    1 packages failed.                                        
[build] Runtime: 1.0 seconds total.                                            
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ ls
build  devel  logs  src
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ cd devel/
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws/devel$ cd ..
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ catkin build
-------------------------------------------------------------
Profile:                     default
Extending:                   None
Workspace:                   /home/kw-cobot/catkin_ws
-------------------------------------------------------------
Build Space:        [exists] /home/kw-cobot/catkin_ws/build
Devel Space:        [exists] /home/kw-cobot/catkin_ws/devel
Install Space:      [unused] /home/kw-cobot/catkin_ws/install
Log Space:          [exists] /home/kw-cobot/catkin_ws/logs
Source Space:       [exists] /home/kw-cobot/catkin_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------


-------------------------------------------------------------
WARNING: Your workspace is not extending any other result
space, but it is set to use a `linked` devel space layout.
This requires the `catkin` CMake package in your source
space in order to be built.
-------------------------------------------------------------

[build] No packages were found in the source space '/home/kw-cobot/catkin_ws/src'
[build] No packages to be built.
[build] Package table is up to date.                                           
Warning: generated devel space setup files have been deleted.
Starting  >>> catkin_tools_prebuild                                            
_______________________________________________________________________________
Errors     << catkin_tools_prebuild:cmake /home/kw-cobot/catkin_ws/logs/catkin_tools_prebuild/build.cmake.001.log
CMake Error at /home/kw-cobot/catkin_ws/build/catkin_tools_prebuild/CMakeLists.txt:12 (message):
  The catkin CMake module was not found, but it is required to build a linked
  workspace.  To resolve this, please do one of the following, and try
  building again.



   1. Source the setup.sh file from an existing catkin workspace:
      source SETUP_FILE



   2. Extend another catkin workspace's result (install or devel) space:
      catkin config --extend RESULT_SPACE



   3. Set `catkin_DIR` to the directory containing `catkin-config.cmake`:
      catkin config --cmake-args -Dcatkin_DIR=CATKIN_CMAKE_CONFIG_PATH



   4. Add the catkin source package to your workspace's source space:
      cd SOURCE_SPACE && git clone https://github.com/ros/catkin.git


cd /home/kw-cobot/catkin_ws/build/catkin_tools_prebuild; catkin build --get-env catkin_tools_prebuild | catkin env -si  /usr/bin/cmake /home/kw-cobot/catkin_ws/build/catkin_tools_prebuild --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/kw-cobot/catkin_ws/devel/.private/catkin_tools_prebuild -DCMAKE_INSTALL_PREFIX=/home/kw-cobot/catkin_ws/install; cd -
...............................................................................
Failed     << catkin_tools_prebuild:cmake          [ Exited with code 1 ]      
Failed    <<< catkin_tools_prebuild                [ 0.0 seconds ]             
[build] Summary: 0 of 1 packages succeeded.                                    
[build]   Ignored:   None.                                                     
[build]   Warnings:  None.                                                     
[build]   Abandoned: None.                                                     
[build]   Failed:    1 packages failed.                                        
[build] Runtime: 0.0 seconds total.                                            
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ catkin config --extend /opt/ros/melodic
-------------------------------------------------------------
Profile:                     default
Extending:        [explicit] /opt/ros/melodic
Workspace:                   /home/kw-cobot/catkin_ws
-------------------------------------------------------------
Build Space:        [exists] /home/kw-cobot/catkin_ws/build
Devel Space:        [exists] /home/kw-cobot/catkin_ws/devel
Install Space:      [unused] /home/kw-cobot/catkin_ws/install
Log Space:          [exists] /home/kw-cobot/catkin_ws/logs
Source Space:       [exists] /home/kw-cobot/catkin_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------------
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ catkin init
Catkin workspace `/home/kw-cobot/catkin_ws` is already initialized. No action taken.
-------------------------------------------------------------
Profile:                     default
Extending:        [explicit] /opt/ros/melodic
Workspace:                   /home/kw-cobot/catkin_ws
-------------------------------------------------------------
Build Space:        [exists] /home/kw-cobot/catkin_ws/build
Devel Space:        [exists] /home/kw-cobot/catkin_ws/devel
Install Space:      [unused] /home/kw-cobot/catkin_ws/install
Log Space:          [exists] /home/kw-cobot/catkin_ws/logs
Source Space:       [exists] /home/kw-cobot/catkin_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------------
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ catkin clean

[clean] Warning: This will completely remove the following directories. (Use `--yes` to skip this check)
[clean] Log Space:     /home/kw-cobot/catkin_ws/logs
[clean] Build Space:   /home/kw-cobot/catkin_ws/build
[clean] Devel Space:   /home/kw-cobot/catkin_ws/devel

[clean] Are you sure you want to completely remove the directories listed above? [yN]: y
[clean] Removing develspace: /home/kw-cobot/catkin_ws/devel
[clean] Removing buildspace: /home/kw-cobot/catkin_ws/build
[clean] Removing log space: /home/kw-cobot/catkin_ws/logs
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ catkin init
Catkin workspace `/home/kw-cobot/catkin_ws` is already initialized. No action taken.
-------------------------------------------------------------
Profile:                     default
Extending:        [explicit] /opt/ros/melodic
Workspace:                   /home/kw-cobot/catkin_ws
-------------------------------------------------------------
Build Space:       [missing] /home/kw-cobot/catkin_ws/build
Devel Space:       [missing] /home/kw-cobot/catkin_ws/devel
Install Space:      [unused] /home/kw-cobot/catkin_ws/install
Log Space:         [missing] /home/kw-cobot/catkin_ws/logs
Source Space:       [exists] /home/kw-cobot/catkin_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------------
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ catkin build
-------------------------------------------------------------
Profile:                     default
Extending:        [explicit] /opt/ros/melodic
Workspace:                   /home/kw-cobot/catkin_ws
-------------------------------------------------------------
Build Space:        [exists] /home/kw-cobot/catkin_ws/build
Devel Space:        [exists] /home/kw-cobot/catkin_ws/devel
Install Space:      [unused] /home/kw-cobot/catkin_ws/install
Log Space:         [missing] /home/kw-cobot/catkin_ws/logs
Source Space:       [exists] /home/kw-cobot/catkin_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-------------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
-------------------------------------------------------------
[build] No packages were found in the source space '/home/kw-cobot/catkin_ws/src'
[build] No packages to be built.
[build] Package table is up to date.                                           
Starting  >>> catkin_tools_prebuild                                            
Finished  <<< catkin_tools_prebuild                [ 1.6 seconds ]             
[build] Summary: All 1 packages succeeded!                                     
[build]   Ignored:   None.                                                     
[build]   Warnings:  None.                                                     
[build]   Abandoned: None.                                                     
[build]   Failed:    None.                                                     
[build] Runtime: 1.7 seconds total.                                            
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ 

 

 

에러 확인

 

해결 코드

kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ catkin config --extend /opt/ros/melodic
kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ catkin clean

 

 

 

버전 확인

kw-cobot@kwcobot-HGDT-Series:~/catkin_ws$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.6 LTS
Release:	18.04
Codename:	bionic

 

 

우분투 공부하고 싶다면

https://www.youtube.com/results?search_query=ubuntu+tutorial 

 

https://www.youtube.com/results?search_query=ubuntu+tutorial

 

www.youtube.com

 

블로그 주소

pinkwink.kr

유튜브: PinkLAB

 

 

 

'Robot > ROS' 카테고리의 다른 글

[Lidar] Lidar로 거리측정 프로젝트 DAY1  (0) 2022.02.22
[ROS] 과제2  (0) 2022.02.22
[통신] 참고  (0) 2022.02.15
[ROS] DAY2 Hello World - Turtlesim  (0) 2022.02.14
[ROS] DAY1 ROS 설치  (0) 2022.02.11