工程問題--ubuntu 14.04/16.04源碼安裝catvehicle

ubuntu 14.04/16.04源碼安裝catvehiclec++


系統環境:git

1. Ubuntu 14.04 + ROS Indigo 或者 Ubuntu 16.04 + ROS kinetic(主要)github

2. Gazebo模型已經下載完成。ubuntu

未下載的能夠參考:https://blog.csdn.net/qq_40213457/article/details/81021562 中的方法2。bash


安裝步驟:app

1. 創建工做空間:ide

1 cd ~
2 mkdir -p catvehicle_ws/src
3 cd catvehicle_ws
4 catkin_make
5 echo "source ~/catvehicle_ws/devel/setup.bash" > ~/.bashrc
6 source ~/.bashrc

2. 下載功能包編譯:ui

1 cd ~/catvehicle_ws/src
2 git clone https://github.com/sprinkjm/catvehicle.git
3 git clone https://github.com/sprinkjm/obstaclestopper.git
4 cd ..
5 catkin_make

3. catkin_make過程當中終端報錯及其解決方法spa

1)找不到controller_managerConfig.cmake.net

 1 CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
 2   Could not find a package configuration file provided by
 3   "controller_manager" with any of the following names:
 4 
 5     controller_managerConfig.cmake
 6     controller_manager-config.cmake
 7 
 8   Add the installation prefix of "controller_manager" to CMAKE_PREFIX_PATH or
 9   set "controller_manager_DIR" to a directory containing one of the above
10   files.  If "controller_manager" provides a separate development package or
11   SDK, be sure it has been installed.
12 Call Stack (most recent call first):
13   catvehicle/CMakeLists.txt:7 (find_package)
14 
15 
16 -- Could not find the required component 'controller_manager'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
17 CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
18   Could not find a package configuration file provided by
19   "controller_manager" with any of the following names:
20 
21     controller_managerConfig.cmake
22     controller_manager-config.cmake
23 
24   Add the installation prefix of "controller_manager" to CMAKE_PREFIX_PATH or
25   set "controller_manager_DIR" to a directory containing one of the above
26   files.  If "controller_manager" provides a separate development package or
27   SDK, be sure it has been installed.
28 Call Stack (most recent call first):
29   catvehicle/CMakeLists.txt:7 (find_package)
30 
31 
32 -- Configuring incomplete, errors occurred!
33 See also "/home/gian/catvehicle_ws/build/CMakeFiles/CMakeOutput.log".
34 See also "/home/gian/catvehicle_ws/build/CMakeFiles/CMakeError.log".

解決方法:

1 sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers
2 (14.04版本輸入如下命令行:
3 sudo apt-get install ros-indigo-ros-control ros-indigo-ros-controllers
4 )

再次catkin_make

2)找不到gazebo_ros_controlConfig.cmake

 1 CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
 2   Could not find a package configuration file provided by
 3   "gazebo_ros_control" with any of the following names:
 4 
 5     gazebo_ros_controlConfig.cmake
 6     gazebo_ros_control-config.cmake
 7 
 8   Add the installation prefix of "gazebo_ros_control" to CMAKE_PREFIX_PATH or
 9   set "gazebo_ros_control_DIR" to a directory containing one of the above
10   files.  If "gazebo_ros_control" provides a separate development package or
11   SDK, be sure it has been installed.
12 Call Stack (most recent call first):
13   catvehicle/CMakeLists.txt:7 (find_package)
14 
15 
16 -- Could not find the required component 'gazebo_ros_control'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
17 CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
18   Could not find a package configuration file provided by
19   "gazebo_ros_control" with any of the following names:
20 
21     gazebo_ros_controlConfig.cmake
22     gazebo_ros_control-config.cmake
23 
24   Add the installation prefix of "gazebo_ros_control" to CMAKE_PREFIX_PATH or
25   set "gazebo_ros_control_DIR" to a directory containing one of the above
26   files.  If "gazebo_ros_control" provides a separate development package or
27   SDK, be sure it has been installed.
28 Call Stack (most recent call first):
29   catvehicle/CMakeLists.txt:7 (find_package)
30 
31 
32 -- Configuring incomplete, errors occurred!
33 See also "/home/gian/catvehicle_ws/build/CMakeFiles/CMakeOutput.log".
34 See also "/home/gian/catvehicle_ws/build/CMakeFiles/CMakeError.log".
35 Makefile:318: recipe for target 'cmake_check_build_system' failed
36 make: *** [cmake_check_build_system] Error 1
37 Invoking "make cmake_check_build_system" failed

解決方法:

1 sudo apt-get install ros-kinetic-gazebo-ros-control
2 (14.04版本輸入如下命令行:
3 sudo apt-get install ros-indigo-gazebo-ros-control
4 )

再次catkin_make

3)找不到sicktoolboxConfig.cmake

 1 CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
 2   Could not find a package configuration file provided by "sicktoolbox" with
 3   any of the following names:
 4 
 5     sicktoolboxConfig.cmake
 6     sicktoolbox-config.cmake
 7 
 8   Add the installation prefix of "sicktoolbox" to CMAKE_PREFIX_PATH or set
 9   "sicktoolbox_DIR" to a directory containing one of the above files.  If
10   "sicktoolbox" provides a separate development package or SDK, be sure it
11   has been installed.
12 Call Stack (most recent call first):
13   catvehicle/CMakeLists.txt:7 (find_package)
14 
15 
16 -- Could not find the required component 'sicktoolbox'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
17 CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
18   Could not find a package configuration file provided by "sicktoolbox" with
19   any of the following names:
20 
21     sicktoolboxConfig.cmake
22     sicktoolbox-config.cmake
23 
24   Add the installation prefix of "sicktoolbox" to CMAKE_PREFIX_PATH or set
25   "sicktoolbox_DIR" to a directory containing one of the above files.  If
26   "sicktoolbox" provides a separate development package or SDK, be sure it
27   has been installed.
28 Call Stack (most recent call first):
29   catvehicle/CMakeLists.txt:7 (find_package)
30 
31 
32 -- Configuring incomplete, errors occurred!
33 See also "/home/gian/catvehicle_ws/build/CMakeFiles/CMakeOutput.log".
34 See also "/home/gian/catvehicle_ws/build/CMakeFiles/CMakeError.log".
35 Makefile:318: recipe for target 'cmake_check_build_system' failed
36 make: *** [cmake_check_build_system] Error 1
37 Invoking "make cmake_check_build_system" failed

解決方法:

14.04環境下:

1 sudo apt-get install ros-indigo-sicktoolbox ros-indigo-sicktoolbox-wrapper

16.04環境下:

 1 cd ~
 2 mkdir -p sicktoolbox_ws/src
 3 cd sicktoolbox_ws
 4 catkin_make
 5 cd src
 6 git clone https://github.com/SantoshBanisetty/sicktoolbox.git
 7 git clone https://github.com/ros-drivers/sicktoolbox_wrapper/tree/indigo-devel
 8 cd ..
 9 catkin_make
10 echo "source ~/sicktoolbox_ws/devel/setup.bash" > ~/.bashrc
11 source ~/.bashrc

進入到catvehicle_ws

1 cd ~/catvehicle_ws

再次在catkin_make。

4)找不到velodyne_pointcloudConfig.cmake

 1 CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
 2   Could not find a package configuration file provided by
 3   "velodyne_pointcloud" with any of the following names:
 4 
 5     velodyne_pointcloudConfig.cmake
 6     velodyne_pointcloud-config.cmake
 7 
 8   Add the installation prefix of "velodyne_pointcloud" to CMAKE_PREFIX_PATH
 9   or set "velodyne_pointcloud_DIR" to a directory containing one of the above
10   files.  If "velodyne_pointcloud" provides a separate development package or
11   SDK, be sure it has been installed.
12 Call Stack (most recent call first):
13   catvehicle/CMakeLists.txt:7 (find_package)
14 
15 
16 -- Could not find the required component 'velodyne_pointcloud'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
17 CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
18   Could not find a package configuration file provided by
19   "velodyne_pointcloud" with any of the following names:
20 
21     velodyne_pointcloudConfig.cmake
22     velodyne_pointcloud-config.cmake
23 
24   Add the installation prefix of "velodyne_pointcloud" to CMAKE_PREFIX_PATH
25   or set "velodyne_pointcloud_DIR" to a directory containing one of the above
26   files.  If "velodyne_pointcloud" provides a separate development package or
27   SDK, be sure it has been installed.
28 Call Stack (most recent call first):
29   catvehicle/CMakeLists.txt:7 (find_package)
30 
31 
32 -- Configuring incomplete, errors occurred!
33 See also "/home/gian/catvehicle_ws/build/CMakeFiles/CMakeOutput.log".
34 See also "/home/gian/catvehicle_ws/build/CMakeFiles/CMakeError.log".
35 Makefile:318: recipe for target 'cmake_check_build_system' failed
36 make: *** [cmake_check_build_system] Error 1
37 Invoking "make cmake_check_build_system" failed

解決方法:

1 sudo apt-get install ros-kinetic-velodyne-pointcloud
2 (14.04版本輸入如下命令行:
3 sudo apt-get install ros-indigo-velodyne-pointcloud
4 )

再次catkin_make

5)終端會報一堆warningerror

1 /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
2  #error This file requires compiler and library support \

解決方法:

1 sudo gedit ~/catvehicle_ws/src/CMakeLists.txt
2 在文件中的第2或者3或者4或者5行的位置添加:
3 SET( CMAKE_CXX_FLAGS "-std=c++11 -O3")
4 保存。

再次catkin_make就能夠了

 

參考網址:

https://blog.csdn.net/handsome_for_kill/article/details/54382149

相關文章
相關標籤/搜索