user@sim $ make px4_sitl_rtps # this completes successfully
user@sim $ cd Firmware/build/px4_sitl_rtps/src/modules/micrortps_bridge/micrortps_client/micrortps_agent/build
user@sim $ cmake ..
user@sim $ make
Output:
Scanning dependencies of target micrortps_agent
[ 0%] Building CXX object CMakeFiles/micrortps_agent.dir/RtpsTopics.cpp.o
[ 1%] Building CXX object CMakeFiles/micrortps_agent.dir/adc_report.cpp.o
[ 2%] Building CXX object CMakeFiles/micrortps_agent.dir/adc_reportPubSubTypes.cpp.o
[ 3%] Building CXX object CMakeFiles/micrortps_agent.dir/adc_report_Publisher.cpp.o
/home/user/Projects/px4/Firmware/build/px4_sitl_rtps/src/modules/micrortps_bridge/micrortps_client/micrortps_agent/adc_report_Publisher.cpp: In member function ‘bool adc_report_Publisher::init()’:
/home/user/Projects/px4/Firmware/build/px4_sitl_rtps/src/modules/micrortps_bridge/micrortps_client/micrortps_agent/adc_report_Publisher.cpp:67:25: error: ‘class eprosima::fastrtps::rtps::BuiltinAttributes’ has no member named ‘discovery_config’
PParam.rtps.builtin.discovery_config.leaseDuration = c_TimeInfinite;
^~~~~~~~~~~~~~~~
CMakeFiles/micrortps_agent.dir/build.make:134: recipe for target 'CMakeFiles/micrortps_agent.dir/adc_report_Publisher.cpp.o' failed
make[2]: *** [CMakeFiles/micrortps_agent.dir/adc_report_Publisher.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/micrortps_agent.dir/all' failed
make[1]: *** [CMakeFiles/micrortps_agent.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
To Reproduce
From a fresh install of Ubuntu 18.04, I have executed the following steps:
#!/bin/bash
HOME=/home/user/
# Install Nvidia drivers
sudo ubuntu-drivers autoinstall
# Install git
sudo apt install git
mkdir $HOME/Projects
mkdir $HOME/Projects/px4
#=========================
# PX4 Firmware
#=========================
cd $HOME/Projects/px4
# Clone PX4
git clone https://github.com/PX4/Firmware.git
# Build the dev env
cd $HOME/Projects/px4/Firmware
./Tools/setup/ubuntu.sh
#=========================
# Fast-RTPS
#=========================
cd $HOME/Projects/px4/
# Clone Fast-RTPS
git clone --recursive https://github.com/eProsima/Fast-RTPS.git -b 1.8.x
# Build Fast-RTPS
cd Fast-RTPS/
mkdir build && cd build
cmake -DTHIRDPARTY=ONE -DSECURITY=ON ..
make
sudo make install
#=========================
# Gradle install
#=========================
cd $HOME/Projects/px4/
wget https://services.gradle.org/distributions/gradle-6.5.1-bin.zip
sudo mkdir /opt/gradle
sudo unzip -d /opt/gradle gradle-6.5.1-bin.zip
#=========================
# Fast-RTPS-Gen
#=========================
cd $HOME/Projects/px4/
# Clone Fast-RTPS-Gen
git clone --recursive https://github.com/eProsima/Fast-RTPS-Gen.git -b v1.0.4
# Build Fast-RTPS-Gen
cd Fast-RTPS-Gen
/opt/gradle/gradle-6.5.1/bin/gradle assemble
sudo /opt/gradle/gradle-6.5.1/bin/gradle install
#=========================
# Build PX4 Firmware
#=========================
cd $HOME/Projects/px4/Firmware
make px4_sitl_rtps
Expected behavior
micrortps_agent should successfully build.
Describe the bug micrortps_agent fails to compile
Context:
Output:
To Reproduce From a fresh install of Ubuntu 18.04, I have executed the following steps:
Expected behavior micrortps_agent should successfully build.