mavlink / mavros

MAVLink to ROS gateway with proxy for Ground Control Station
Other
879 stars 990 forks source link

Error with building MAVROS #1039

Closed Abdulaaty closed 6 years ago

Abdulaaty commented 6 years ago

I am a new user to ROS, I want to use with PX4 to control a drone to do specific tasks !

I installed the MAVROS package, however it doesn't seem to build correctly! The installation line : sudo apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras

Then : cd catkin_ws catkin_make

And the result :

\Base path: /home/omar/catkin_ws Source space: /home/omar/catkin_ws/src Build space: /home/omar/catkin_ws/build Devel space: /home/omar/catkin_ws/devel Install space: /home/omar/catkin_ws/install

Running command: "cmake /home/omar/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/omar/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/omar/catkin_ws/install -G Unix Makefiles" in "/home/omar/catkin_ws/build"

-- Using CATKIN_DEVEL_PREFIX: /home/omar/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/omar/catkin_ws/devel;/opt/ros/kinetic -- This workspace overlays: /home/omar/catkin_ws/devel;/opt/ros/kinetic -- Using PYTHON_EXECUTABLE: /usr/bin/python -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/omar/catkin_ws/build/test_results -- Found gmock sources under '/usr/src/gmock': gmock will be built -- Found gtest sources under '/usr/src/gmock': gtests will be built -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.11 -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~ -- ~~ traversing 7 packages in topological order: -- ~~ - mavlink (plain cmake) -- ~~ - libmavconn -- ~~ - mavros_msgs -- ~~ - offboard -- ~~ - mavros -- ~~ - mavros_extras -- ~~ - test_mavros -- ~~~~~~~~~~~~~ CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake:95 (message): This workspace contains non-catkin packages in it, and catkin cannot build a non-homogeneous workspace without isolation. Try the 'catkin_make_isolated' command instead. Call Stack (most recent call first): CMakeLists.txt:63 (catkin_workspace)

-- Configuring incomplete, errors occurred! See also "/home/omar/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/omar/catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed

I don't know how to solve it ! Any help appreciated

TSC21 commented 6 years ago

@Omar-M-AbdelAziz I advise you to go through the ROS tutorials before adventuring yourself on this: http://wiki.ros.org/ROS/Tutorials. Also, if you install the mavros packages from the deb packages, you don't need to build them from source, unless you do want to use the latest master. For installation from source, follow https://github.com/mavlink/mavros/tree/master/mavros#source-installation. For binary/deb package, https://github.com/mavlink/mavros/tree/master/mavros#binary-installation-deb.