Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Generating micrortps_agent #15412

Open
agent-nelson opened this issue Jul 24, 2020 · 1 comment
Open

Error Generating micrortps_agent #15412

agent-nelson opened this issue Jul 24, 2020 · 1 comment
Labels

Comments

@agent-nelson
Copy link

agent-nelson commented Jul 24, 2020

Describe the bug
micrortps_agent fails to compile

Context:

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.

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant