PX4-SITL_gazebo-classic
PX4-SITL_gazebo-classic copied to clipboard
cant compile in ubuntu 20.04
i cant compile, theres a lot of problems in this ubuntu version, i was able to fixed the most part but now i am stuck here
-- install-prefix: /usr -- cmake build type: RelWithDebInfo -- Using C++17 standard -- Found TinyXML: /usr/lib/x86_64-linux-gnu/libtinyxml.so -- Checking for module 'gstreamer-1.0 >= 1.0' -- No package 'gstreamer-1.0' found -- Checking for module 'gstreamer-base-1.0 >= 1.0' -- No package 'gstreamer-base-1.0' found -- Checking for module 'gstreamer-app-1.0 >= 1.0' -- No package 'gstreamer-app-1.0' found -- Found GStreamer: GSTREAMER_INCLUDE_DIRS;GSTREAMER_LIBRARIES;GSTREAMER_VERSION;GSTREAMER_BASE_INCLUDE_DIRS;GSTREAMER_BASE_LIBRARIES (Required is at least version "1.0") -- Found unsuitable Qt version "" from NOTFOUND Qt QTGUI library not found. Qt QTCORE library not found. -- Checking for module 'OGRE' -- No package 'OGRE' found CMake Error at CMakeLists.txt:103 (add_subdirectory): The source directory /home/x/PX4/PX4-SITL_gazebo/external/OpticalFlow does not contain a CMakeLists.txt file. -- Could NOT find MAVLink (missing: MAVLINK_INCLUDE_DIRS) (found version "2.0") -- catkin DISABLED CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.22/Modules/FindProtobuf.cmake:650 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:145 (find_package) -- Configuring incomplete, errors occurred! See also "/home/x/PX4/PX4-SITL_gazebo/build/CMakeFiles/CMakeOutput.log".
dont know what to do, i need to setup a simulation to test flight paths generated with qground
@jorgeneo560 You need to update your submodule
Hi,
I think I have the same issue but building from a docker.
Error:
Built target HelicopterMixer
-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- Could NOT find MAVLink (missing: MAVLINK_INCLUDE_DIRS) (found version "2.0")
-- catkin DISABLED
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Gazebo version: 9.12
-- Found GStreamer: adding gst_camera_plugin
-- Found GStreamer: adding gst_video_stream_widget
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
_MAVLINK_INCLUDE_DIR
The docker file to reproduce:
FROM ubuntu:20.04
ENV WORKSPACE_DIR /root
ENV FIRMWARE_DIR ${WORKSPACE_DIR}/PX4-Autopilot
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y bc \
cmake \
curl \
gazebo9 \
git \
gcc \
gcc-arm-none-eabi \
g++ \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-ugly \
iproute2 \
libeigen3-dev \
libgazebo9-dev \
libgstreamer-plugins-base1.0-dev \
libgstrtspserver-1.0-dev \
libopencv-dev \
libroscpp-dev \
protobuf-compiler \
python3-jinja2 \
python3-empy \
python3-jsonschema \
python3-numpy \
python3-pip \
unzip \
xvfb && \
apt-get -y autoremove && \
apt-get clean autoclean && \
rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
RUN pip install numpy \
toml \
pyyaml
RUN pip3 install empy \
jinja2 \
packaging \
pyros-genmsg \
toml \
pyyaml \
kconfiglib
RUN git clone https://github.com/PX4/PX4-Autopilot.git ${FIRMWARE_DIR}
RUN git -C ${FIRMWARE_DIR} checkout tags/v1.13.0
RUN git -C ${FIRMWARE_DIR} submodule update --init --recursive
RUN cd ${FIRMWARE_DIR} && DONT_RUN=1 make px4_sitl gazebo
I let you know if I found the issue
@Katawann I don't think your issue is related. The builds are checked in the CI, so I suspect there is something wrong specific to your setup.
Why not use the setup script (Tools/setup/ubuntu.sh
) to install the dependencies?
Indeed... I succeed to do it with an updated dockerfile. Sorry for bringing up the subject again