Не удалось построить Catkin (ROS) - PullRequest
0 голосов
/ 15 октября 2018

Я пытаюсь установить ROS на мою Ubuntu 16.04, чтобы использовать симулятор Gazebo.Сначала я попытался запустить скрипт, который устанавливает все, затем я получил ошибку в конце.Поэтому я решил установить ROS прямо из инструкции на их сайте, но я получил ту же ошибку.Затем я следовал другим учебникам, пытался найти кого-то, у кого была такая же проблема, но не было пути!Мой последний шанс здесь .. Я понимаю проблему CMake, я использую python3 и установил все необходимые библиотеки.

sudo catkin build
---------------------------------------------------
Profile:                     default
Extending:                   None
Workspace:                   /home/stribuda
---------------------------------------------------
Build Space:        [exists] /home/stribuda/build
Devel Space:        [exists] /home/stribuda/devel
Install Space:      [unused] /home/stribuda/install
Log Space:          [exists] /home/stribuda/logs
Source Space:       [exists] /home/stribuda/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] Found '1' packages in 0.0 seconds.
[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/stribuda/logs/catkin_tools_prebuild/build.cmake.013.log          
CMake Error at /home/stribuda/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/stribuda/build/catkin_tools_prebuild; catkin build --get-env catkin_tools_prebuild | catkin env -si  /usr/bin/cmake /home/stribuda/build/catkin_tools_prebuild --no-warn-    unused-cli -DCATKIN_DEVEL_PREFIX=/home/stribuda/devel/.private/catkin_tools_prebuild -DCMAKE_INSTALL_PREFIX=/home/stribuda/install; cd -
....................................................................................................................................................................
Failed     << catkin_tools_prebuild:cmake          [ Exited with code 1 ]                                                               
Failed    <<< catkin_tools_prebuild                [ 0.0 seconds ]                                                        
Abandoned <<< px4                                  [ Unrelated job failed ]                                                                                   
[build] Summary: 0 of 2 packages succeeded.                                                                                                                     
[build]   Ignored:   None.                                                                                                                                    
[build]   Warnings:  None.                                                                                                                                      
[build]   Abandoned: 1 packages were abandoned.                                                                                                        
[build]   Failed:    1 packages failed.                                                                                                                      
[build] Runtime: 0.1 seconds total

Если кто-то может помочь, это было бы очень полезно!Спасибо

ОБНОВЛЕНО:

env |grep -i ros

ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
LD_LIBRARY_PATH=/opt/ros/kinetic/lib:/opt/ros/kinetic/lib/x86_64-linux-gnu
PATH=/opt/ros/kinetic/bin:/home/stribuda/gcc-arm-none-eabi-7-2017-q4-major/bin:/home/stribuda/bin:/home/stribuda/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=kinetic
PYTHONPATH=/opt/ros/kinetic/lib/python2.7/dist-packages
PKG_CONFIG_PATH=/opt/ros/kinetic/lib/pkgconfig:/opt/ros/kinetic/lib/x86_64-linux-gnu/pkgconfig
CMAKE_PREFIX_PATH=/opt/ros/kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros

ВТОРОЕ ОБНОВЛЕНИЕ: Я переустановил Ubuntu Я следовал инструкциям, как всегда, и получил это после ввода catkin build

--------------------------------------------------------------
Profile:                     default
Extending:          [cached] /opt/ros/kinetic
Workspace:                   /home/stribudax/catkin_ws
--------------------------------------------------------------
Source Space:       [exists] /home/stribudax/catkin_ws/src
Log Space:          [exists] /home/stribudax/catkin_ws/logs
Build Space:        [exists] /home/stribudax/catkin_ws/build
Devel Space:        [exists] /home/stribudax/catkin_ws/devel
Install Space:      [unused] /home/stribudax/catkin_ws/install
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.
--------------------------------------------------------------
[build] Found '19' packages in 0.0 seconds.                                                                                                                                                               
[build] Package table is up to date.                                                                                                                                                                      
Starting  >>> mav_msgs                                                                                                                                                                                    
Starting  >>> mavlink                                                                                                                                                                                     
Starting  >>> mavros_msgs                                                                                                                                                                                 
Starting  >>> rotors_comm                                                                                                                                                                                 
Finished  <<< rotors_comm                          [ 0.6 seconds ]                                                                                                                                        
Finished  <<< mav_msgs                             [ 0.8 seconds ]                                                                                                                                        
Starting  >>> rotors_description                                                                                                                                                                          
Finished  <<< mavlink                              [ 1.0 seconds ]                                                                                                                                        
Finished  <<< rotors_description                   [ 0.1 seconds ]                                                                                                                                        
Starting  >>> rotors_evaluation                                                                                                                                                                           
Finished  <<< rotors_evaluation                    [ 0.2 seconds ]                                                                                                                                        
Starting  >>> mav_planning_msgs                                                                                                                                                                           
Starting  >>> rotors_control                                                                                                                                                                              
Starting  >>> rotors_joy_interface                                                                                                                                                                        
Finished  <<< mavros_msgs                          [ 1.9 seconds ]                                                                                                                                        
Finished  <<< rotors_joy_interface                 [ 0.6 seconds ]                                                                                                                                        
Finished  <<< rotors_control                       [ 0.8 seconds ]                                                                                                                                        
Starting  >>> libmavconn                                                                                                                                                                                  
Finished  <<< mav_planning_msgs                    [ 0.8 seconds ]                                                                                                                                        
Starting  >>> rqt_rotors                                                                                                                                                                                  
Starting  >>> rotors_gazebo_plugins                                                                                                                                                                       
Finished  <<< libmavconn                           [ 0.2 seconds ]                                                                                                                                        
Starting  >>> mavros                                                                                                                                                                                      
Finished  <<< rqt_rotors                           [ 0.1 seconds ]                                                                                                                                        
__________________________________________________________________________________________________________________________________________________________________________________________________________
Errors     << mavros:cmake /home/stribudax/catkin_ws/logs/mavros/build.cmake.001.log                                                                                                                      
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find GeographicLib (missing: GeographicLib_LIBRARIES
  GeographicLib_INCLUDE_DIRS)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /home/stribudax/catkin_ws/src/mavros/libmavconn/cmake/Modules/FindGeographicLib.cmake:14 (find_package_handle_standard_args)
  CMakeLists.txt:42 (find_package)


cd /home/stribudax/catkin_ws/build/mavros; catkin build --get-env mavros | catkin env -si  /usr/bin/cmake /home/stribudax/catkin_ws/src/mavros/mavros --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/stribudax/catkin_ws/devel/.private/mavros -DCMAKE_INSTALL_PREFIX=/home/stribudax/catkin_ws/install; cd -
..........................................................................................................................................................................................................
Failed     << mavros:cmake                         [ Exited with code 1 ]                                                                                                                                 
Failed    <<< mavros                               [ 0.8 seconds ]                                                                                                                                        
Abandoned <<< mavros_extras                        [ Unrelated job failed ]                                                                                                                               
Abandoned <<< rotors_gazebo                        [ Unrelated job failed ]                                                                                                                               
Abandoned <<< rotors_hil_interface                 [ Unrelated job failed ]                                                                                                                               
Abandoned <<< test_mavros                          [ Unrelated job failed ]                                                                                                                               
__________________________________________________________________________________________________________________________________________________________________________________________________________
Warnings   << rotors_gazebo_plugins:cmake /home/stribudax/catkin_ws/logs/rotors_gazebo_plugins/build.cmake.000.log                                                                                        
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'eigen' but neither 'eigen_INCLUDE_DIRS' nor
  'eigen_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  CMakeLists.txt:198 (catkin_package)


CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'gazebo' but neither 'gazebo_INCLUDE_DIRS' nor
  'gazebo_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  CMakeLists.txt:198 (catkin_package)


CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'octomap' but neither 'octomap_INCLUDE_DIRS'
  nor 'octomap_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  CMakeLists.txt:198 (catkin_package)


CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'opencv' but neither 'opencv_INCLUDE_DIRS' nor
  'opencv_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  CMakeLists.txt:198 (catkin_package)


cd /home/stribudax/catkin_ws/build/rotors_gazebo_plugins; catkin build --get-env rotors_gazebo_plugins | catkin env -si  /usr/bin/cmake /home/stribudax/catkin_ws/src/rotors_simulator/rotors_gazebo_plugins --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/stribudax/catkin_ws/devel/.private/rotors_gazebo_plugins -DCMAKE_INSTALL_PREFIX=/home/stribudax/catkin_ws/install; cd -
..........................................................................................................................................................................................................
__________________________________________________________________________________________________________________________________________________________________________________________________________
Warnings   << rotors_gazebo_plugins:make /home/stribudax/catkin_ws/logs/rotors_gazebo_plugins/build.make.000.log                                                                                          
[libprotobuf WARNING google/protobuf/descriptor.cc:5411] Warning: Unused import: "MagneticField.proto" imports "quaternion.proto" which is not used.
/home/stribudax/catkin_ws/src/rotors_simulator/rotors_gazebo_plugins/src/external/gazebo_geotagged_images_plugin.cpp: In member function ‘virtual void gazebo::GeotaggedImagesPlugin::Load(gazebo::sensors::SensorPtr, sdf::ElementPtr)’:
/home/stribudax/catkin_ws/src/rotors_simulator/rotors_gazebo_plugins/src/external/gazebo_geotagged_images_plugin.cpp:83:39: warning: ‘gazebo::common::Time gazebo::rendering::Scene::GetSimTime() const’ is deprecated [-Wdeprecated-declarations]
   lastImageTime_ = scene_->GetSimTime();
                                       ^
In file included from /usr/include/gazebo-7/gazebo/rendering/rendering.hh:40:0,
                 from /home/stribudax/catkin_ws/src/rotors_simulator/rotors_gazebo_plugins/include/rotors_gazebo_plugins/external/gazebo_geotagged_images_plugin.h:30,
                 from /home/stribudax/catkin_ws/src/rotors_simulator/rotors_gazebo_plugins/src/external/gazebo_geotagged_images_plugin.cpp:18:
/usr/include/gazebo-7/gazebo/rendering/Scene.hh:639:28: note: declared here
       public: common::Time GetSimTime() const GAZEBO_DEPRECATED(7.0);
                            ^
/home/stribudax/catkin_ws/src/rotors_simulator/rotors_gazebo_plugins/src/external/gazebo_geotagged_images_plugin.cpp: In member function ‘void gazebo::GeotaggedImagesPlugin::OnNewFrame(const unsigned char*)’:
/home/stribudax/catkin_ws/src/rotors_simulator/rotors_gazebo_plugins/src/external/gazebo_geotagged_images_plugin.cpp:161:49: warning: ‘gazebo::common::Time gazebo::rendering::Scene::GetSimTime() const’ is deprecated [-Wdeprecated-declarations]
   common::Time currentTime = scene_->GetSimTime();
                                                 ^
In file included from /usr/include/gazebo-7/gazebo/rendering/rendering.hh:40:0,
                 from /home/stribudax/catkin_ws/src/rotors_simulator/rotors_gazebo_plugins/include/rotors_gazebo_plugins/external/gazebo_geotagged_images_plugin.h:30,
                 from /home/stribudax/catkin_ws/src/rotors_simulator/rotors_gazebo_plugins/src/external/gazebo_geotagged_images_plugin.cpp:18:
/usr/include/gazebo-7/gazebo/rendering/Scene.hh:639:28: note: declared here
       public: common::Time GetSimTime() const GAZEBO_DEPRECATED(7.0);
                            ^
cd /home/stribudax/catkin_ws/build/rotors_gazebo_plugins; catkin build --get-env rotors_gazebo_plugins | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
..........................................................................................................................................................................................................
Finished  <<< rotors_gazebo_plugins                [ 53.1 seconds ]                                                                                                                                       
[build] Summary: 12 of 17 packages succeeded.                                                                                                                                                             
[build]   Ignored:   2 packages were skipped or are blacklisted.                                                                                                                                          
[build]   Warnings:  1 packages succeeded with warnings.                                                                                                                                                  
[build]   Abandoned: 4 packages were abandoned.                                                                                                                                                           
[build]   Failed:    1 packages failed.                                                                                                                                                                   
[build] Runtime: 56.0 seconds total.                                                                                                                                                                      
[build] Note: Workspace packages have changed, please re-source setup files to use them.

1 Ответ

0 голосов
/ 24 октября 2018

Во втором ОБНОВЛЕНИИ Ваша проблема компилирует Mavros и беседку, для которой нужна библиотека, которой у вас нет.

В папке mavros должен быть скрипт с именем install_GeographicLib.sh (или что-то в этом роде)

Если вы не хотите редактировать источники mavros или gazebo, тогда я предлагаю установить mavros и gazebo сapt-get

...