error with "make px4_sitl_rtps"

Traceback (most recent call last):
File “/home/zhongzw/UAV/Firmware/msg/tools/generate_microRTPS_bridge.py”, line 401, in
generate_agent(agent_out_dir)
File “/home/zhongzw/UAV/Firmware/msg/tools/generate_microRTPS_bridge.py”, line 334, in generate_agent
“fastrtpsgen not found. Specify the location of fastrtpsgen with the -f flag”)
Exception: fastrtpsgen not found. Specify the location of fastrtpsgen with the -f flag
ninja: build stopped: subcommand failed.
Makefile:193: recipe for target ‘px4_sitl_rtps’ failed
make: *** [px4_sitl_rtps] Error 1

What instructions are you following? Where does it fail?

Hello, JulianOes:
I want to receive uorb topic message with ROS2 and I follow the instruction “https://dev.px4.io/master/en/middleware/micrortps.html”.
I installed the ROS2 ardent and Fast RTPS, but the error appear after the command “make px4_sitl_rtps” under Firmware folder.

this is the error list:

[2/11] Generating RTPS topic bridge
FAILED: cd /home/zhongzw/UAV/Firmware/build/px4_sitl_rtps/src/modules/micrortps_bridge/micrortps_client && /usr/bin/python /home/zhongzw/UAV/Firmware/msg/tools/generate_microRTPS_bridge.py --fastrtpsgen-dir --generate-idl --mkdir-build --generate-cmakelists --topic-msg-dir /home/zhongzw/UAV/Firmware/msg --uorb-templates-dir templates/uorb_microcdr --urtps-templates-dir templates/urtps --agent-outdir /home/zhongzw/UAV/Firmware/build/px4_sitl_rtps/src/modules/micrortps_bridge/micrortps_client/micrortps_agent --client-outdir /home/zhongzw/UAV/Firmware/build/px4_sitl_rtps/src/modules/micrortps_bridge/micrortps_client/micrortps_client --idl-dir /home/zhongzw/UAV/Firmware/build/px4_sitl_rtps/src/modules/micrortps_bridge/micrortps_client/micrortps_agent/idl >micrortps_bridge.log > /dev/null
Traceback (most recent call last):
File “/home/zhongzw/UAV/Firmware/msg/tools/generate_microRTPS_bridge.py”, line 401, in
generate_agent(agent_out_dir)
File “/home/zhongzw/UAV/Firmware/msg/tools/generate_microRTPS_bridge.py”, line 334, in generate_agent
“fastrtpsgen not found. Specify the location of fastrtpsgen with the -f flag”)
Exception: fastrtpsgen not found. Specify the location of fastrtpsgen with the -f flag
ninja: build stopped: subcommand failed.
Makefile:193: recipe for target ‘px4_sitl_rtps’ failed
make: *** [px4_sitl_rtps] Error 1

But what steps have you done to install all prerequisites? And did they all succeed?

FYI @TSC21 maybe you can help here.

it seems that the prerequisites needed is ros1 kinetic, ros2 ardent and Fast RTPS.
first I install ros1 kinetic with “sudo apt install ros-kinetic-desktop”,
then ros2 ardent was installed with “sudo apt install ros-ardent-desktop”,
after that I install Fast RTPS under the instruction below:

$ git clone https://github.com/eProsima/Fast-RTPS
$ mkdir Fast-RTPS/build && cd Fast-RTPS/build
$ cmake -DTHIRDPARTY=ON -DBUILD_JAVA=ON …
$ make
$ sudo make install

the installation process is OK

I tried to reproduce this and I can’t even install Fast-RTPS successfully, so I’ve made an issue: https://github.com/PX4/Firmware/issues/12773

Thank you for your help!
may be this problem is caused by FAST-RTPS installation.