Problem building micrortps_agent

Hi,
I’m following these instructions: https://dev.px4.io/en/middleware/micrortps.html#agent-off-board-fastrtps-interface

I’m getting the following error:
Firmware/src/modules/micrortps_bridge/micrortps_agent/build$ cmake …
– The C compiler identification is GNU 5.4.1
– The CXX compiler identification is GNU 5.4.1
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
CMake Error at CMakeLists.txt:37 (find_package):
By not providing “Findfastrtps.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “fastrtps”,
but CMake did not find one.

  Could not find a package configuration file provided by "fastrtps" with any
  of the following names:

    fastrtpsConfig.cmake
    fastrtps-config.cmake

  Add the installation prefix of "fastrtps" to CMAKE_PREFIX_PATH or set
  "fastrtps_DIR" to a directory containing one of the above files.  If
  "fastrtps" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!

Any ideas of what I’m missing? I cannot find any of the files listed in the error message.
Thanks

Solved In case others run into the same problem.

I had installed FastRTPS following the instructions here for Linux: https://dev.px4.io/en/setup/fast-rtps-installation.html#installation-from-binaries
That doesn’t install the cmake modules needed to find FastRTPS when building the micrortps_agent. I also tried the BASH script used to set up the PX4 Development environment, and it didn’t work either.

In the end, what worked was installing FastRTPS following the instructions to install it from sources found here: https://dev.px4.io/en/setup/fast-rtps-installation.html#installation-from-sources

Thanks for following up with the solution.

Yet another option is to use the docker images here. https://hub.docker.com/u/px4io/
This is what the PX4 continuous integration system uses.

1 Like

I tried using the docker image px4io/px4-dev-simulation-xenial but I get the same error as in my original post. Any ideas?