Stuck on ROS2/RTPS Interface Install

Hello,

I am fairly new to ROS2 and Building all the code to work together. Currently this is what I have installed, PX4 Version was from this guide https://dev.px4.io/master/en/setup/building_px4.html

FastRTPS version: 1.9.3
FastRTPSGen: 1.0.2
ROS2 distro: Eloquent

I do have PX4 able to talk with gazebo 9 and I can control the quad through the px4 cmd line once I run it. I have tried to move onto the next step which is interface ros2 with px4 using this guide https://dev.px4.io/v1.9.0/en/middleware/micrortps.html#agent-in-a-ros-independent-offboard-fast-rtps-interface. Which is also the version of instructions I used to get PX4 running.

The issue I seem to be having is that the instructions state that the micrortps_agent should have been automatically built when the px4 firmware was compiled. But I do not see that folder located in the src/modules/micrortps_bridge folder and then when I go to the step to build say the agent application obviously it fails. Also I am pretty sure that when I try to do the colcon build

colcon build --symlink-install --packages-skip ros1_bridge --event-handlers console_direct+

it fails also because the agent folder is not present with the idl files.

I have tried to use the generate python script to manually generate the agent code but no luck so far.

Thanks for any help in advance.

So I am a little more confused now, I tried to do a colcon build again and now getting

~/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync_Publisher.h:48:10: fatal error: Timesync_PubSubTypes.h: No such file or directory
#include “Timesync_PubSubTypes.h” Fatal Error

TimesyncPubsubTypes.h exists in the micrortps_agent folder but not with the underscore. I saw a post similar about getting this issue but their solution was they had an old fastrtps installed still on the machine. I cant seem to find if there is any older versions left in /usr/lib, I did install a newer version 1.9.3 though. I do see 1.9.3 installed in /usr/local/include and share but no other versions.

Tried to downgrade to Ros2 Dashing and Fast-RTPS 1.8.2 and still get the exact same error

px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync_Publisher.h:48:10: fatal error: Timesync_PubSubTypes.h: No such file or directory
#include “Timesync_PubSubTypes.h”

not sure what I am doing wrong.

Are you building PX4 Firmware master? Please try it so.

I will double check, I think one of the instructions on the PX4 site lead you to download the developer repo which ends up getting you 1.11. I will go back and fix this and let you know if the master branch 1.10 works out.

Thank You

So I am on V1.11.0 which is the master branch from the below github

HW arch: PX4_SITL
FW git-hash: 5f86ea71bc74165f0eed59e7cc05616bba1c852f
FW version: 1.11.0 80 (17498240)
FW git-branch: master

Then followed the setting up the workspaces here

https://dev.px4.io/v1.9.0/en/middleware/micrortps.html

still getting same error though from first post trying to just build the ros2 px4_ros_com package with their script build_ros2_workspace.bash

In file included from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/microRTPS_timesync.h:46:0,
from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/microRTPS_timesync.cpp:42:
/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync_Publisher.h:48:10: fatal error: Timesync_PubSubTypes.h: No such file or directory
#include “Timesync_PubSubTypes.h”
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/micrortps_agent.dir/src/micrortps_agent/microRTPS_timesync.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs…
In file included from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/microRTPS_timesync.h:46:0,
from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/RtpsTopics.h:38,
from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/RtpsTopics.cpp:34:
/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync_Publisher.h:48:10: fatal error: Timesync_PubSubTypes.h: No such file or directory
#include “Timesync_PubSubTypes.h”
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/micrortps_agent.dir/src/micrortps_agent/RtpsTopics.cpp.o] Error 1
In file included from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/microRTPS_timesync.h:46:0,
from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/microRTPS_agent.cpp:52:
/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync_Publisher.h:48:10: fatal error: Timesync_PubSubTypes.h: No such file or directory
#include “Timesync_PubSubTypes.h”
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/micrortps_agent.dir/src/micrortps_agent/microRTPS_agent.cpp.o] Error 1
make[1]: *** [CMakeFiles/micrortps_agent.dir/all] Error 2
make: *** [all] Error 2

Failed <<< px4_ros_com [ Exited with code 2 ]

Summary: 1 package finished [3min 37s]
1 package failed: px4_ros_com
1 package had stderr output: px4_ros_com

https://dev.px4.io/v1.9.0/en/middleware/micrortps.html is the wrong version of the docs you are following. See the tag v1.9.0? You need to follow https://dev.px4.io/master/en/middleware/micrortps.html.
Also make sure that you install the following:

  • Fast-RTPS 1.8.2
  • Fast-RTPS-Gen 1.0.4

Use the master repo of PX4 by cloning it with git:
git clone recursive https://github.com/PX4/Firmware.git. That way you will be cloning usptream master. There is not such thing as “master branch 1.10”. What you see is the latest tag that was created, in this case 1.11, but what matters is that the HEAD hash corresponds to the latest commit hash upstream.

Also please do make sure to use the clean_all script in px4_ros_com before you try to build again after changing the setup, otherwise you will be building the same generated micrortps_agent source code. The src files are not generated again after each build and that’s why you are probably getting the same error over and over.

ahhh thank you tsc I will try this out now, following all the versioning is quite confusing. As I thought when I would go to the px4 master in the readme it took me to an older version of the notes (but maybe I am going crazy also)

edit: not sure exactly but the fastrtpsgen was pointing at the wrong folder where I copied the jar file from fastrtpsgen to, made the change now I can call the fastrtpsgen v1.0.4

Still getting same error as OP, i made sure to run the clean_all script before rebuilding px4_ros_com

./build_ros2_workspace.bash 
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
Starting >>> px4_msgs
[Processing: px4_msgs]                             
[Processing: px4_msgs]                                     
[Processing: px4_msgs]                                       
[Processing: px4_msgs]                                       
[Processing: px4_msgs]                                        
Finished <<< px4_msgs [2min 31s]                           
Starting >>> px4_ros_com
[Processing: px4_ros_com]                                 
[Processing: px4_ros_com]                                     
--- stderr: px4_ros_com                                        
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
CMakeFiles/micrortps_agent.dir/build.make:370: warning: overriding recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync.cpp'
CMakeFiles/micrortps_agent.dir/build.make:199: warning: ignoring old recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync.cpp'
CMakeFiles/micrortps_agent.dir/build.make:373: warning: overriding recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/TimesyncPubSubTypes.cpp'
CMakeFiles/micrortps_agent.dir/build.make:202: warning: ignoring old recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/TimesyncPubSubTypes.cpp'
CMakeFiles/micrortps_agent.dir/build.make:376: warning: overriding recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/TimesyncPubSubTypes.h'
CMakeFiles/micrortps_agent.dir/build.make:205: warning: ignoring old recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/TimesyncPubSubTypes.h'
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
/sbin/ldconfig.real: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Can't unlink /usr/local/lib/libfastrtps.so.1
/sbin/ldconfig.real: /lib/x86_64-linux-gnu/ld-2.27.so is the dynamic linker, ignoring

/sbin/ldconfig.real: /lib32/ld-2.27.so is the dynamic linker, ignoring

/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
openjdk version "11.0.6" 2020-01-14

OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
CMakeFiles/micrortps_agent.dir/build.make:370: warning: overriding recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync.cpp'
CMakeFiles/micrortps_agent.dir/build.make:199: warning: ignoring old recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync.cpp'
CMakeFiles/micrortps_agent.dir/build.make:373: warning: overriding recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/TimesyncPubSubTypes.cpp'
CMakeFiles/micrortps_agent.dir/build.make:202: warning: ignoring old recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/TimesyncPubSubTypes.cpp'
CMakeFiles/micrortps_agent.dir/build.make:376: warning: overriding recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/TimesyncPubSubTypes.h'
CMakeFiles/micrortps_agent.dir/build.make:205: warning: ignoring old recipe for target '/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/TimesyncPubSubTypes.h'
In file included from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/microRTPS_timesync.h:46:0,
                 from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/RtpsTopics.h:38,
                 from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/RtpsTopics.cpp:34:
/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync_Publisher.h:48:10: fatal error: Timesync_PubSubTypes.h: No such file or directory
 #include "Timesync_PubSubTypes.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/micrortps_agent.dir/src/micrortps_agent/RtpsTopics.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/microRTPS_timesync.h:46:0,
                 from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/microRTPS_timesync.cpp:42:
/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync_Publisher.h:48:10: fatal error: Timesync_PubSubTypes.h: No such file or directory
 #include "Timesync_PubSubTypes.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/micrortps_agent.dir/src/micrortps_agent/microRTPS_timesync.cpp.o] Error 1
In file included from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/microRTPS_timesync.h:46:0,
                 from /home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/microRTPS_agent.cpp:52:
/home/jetson/px4_ros_com_ros2/src/px4_ros_com/src/micrortps_agent/Timesync_Publisher.h:48:10: fatal error: Timesync_PubSubTypes.h: No such file or directory
 #include "Timesync_PubSubTypes.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/micrortps_agent.dir/src/micrortps_agent/microRTPS_agent.cpp.o] Error 1
make[1]: *** [CMakeFiles/micrortps_agent.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< px4_ros_com	[ Exited with code 2 ]

Summary: 1 package finished [3min 36s]
  1 package failed: px4_ros_com
  1 package had stderr output: px4_ros_com

“”"

Current Versions:
ROS2: Dashing
openjdk: 11.0.6
FastRTPS: 1.8.2
FastRTPSGen: 1.0.4

is it possible that I have an older version of FastRTPS somewhere still installed? Not sure what else to try.

Just wanted to update, I cleaned up every folder that was FastRTPS/FastRTPSGEN/FastCDR and all files in all of my /usr and /usr/local folders with any of the above and started a clean install. Finally got it to compile using 1.8.2 FastRTPS, Fastrtpsgen 1.0.4 with dashing/melodic for ros2/ros1.

I do think there is an issue with the fastrtpsgen path in the script. I had to move the jar file to share/fastrtpsgen/java/ where it said it was looking for the jar file but when I installed it stuck it in share/fastrtps/.

@amano001 What issue? If you follow the documentation and use the PX4 master, everything will be setup correctly. Before FastRTPSGen, the fastrtpsgen script was installed in share/fastrtps/, but in 1.0.4 is installed in share/fastrtpsgen/java/. That’s the difference you are seeing. But a correct setup on your side would make this work even in FastRTPSGen 1.0.0.

@TSC21 I guess I am just confused then because the instructions here

https://dev.px4.io/master/en/setup/dev_env_linux_ubuntu.html

say to install FastRTPS 1.7.1

then the instructions that are here

https://dev.px4.io/master/en/setup/fast-rtps-installation.html

say you need FastRTPS 1.8.2 for ubuntu which seems conflicting and what got me into the original errors. So I dont agree following the documentation everything will be setup correctly.

Also I am not following what you mean with the fastrtpsgen script. I installed fastrtpsgen 1.0.4 and the files were placed in share/fastrtpsgen/java/ but fastrtpsgen script was looking in share/fastrtps/. Where in the instructions does it say to fix this?

Thank you for your responses!

Where exactly in https://dev.px4.io/master/en/middleware/micrortps.html you get forwarded to https://dev.px4.io/master/en/setup/dev_env_linux_ubuntu.html? I might admit that https://dev.px4.io/master/en/setup/dev_env_linux_ubuntu.html might be wrong, but in any step of (at least from what I can see) from https://dev.px4.io/master/en/middleware/micrortps.html you get forwarded to that link.

Here: https://github.com/PX4/Devguide/pull/1006 and deployed here: https://dev.px4.io/master/en/setup/fast-rtps-installation.html you can see what do do regarding the install of FastRTPSGen. You don’t have to fix anything.

@amano001 FYI the fix for the first link is in https://github.com/PX4/Devguide/pull/1011.

@TSC21

If you start the instructions (https://dev.px4.io/master/en) on the left hand side after introduction, you go to getting started:

In the getting started guide > toolchain installation > linux > ubuntu/debian

The link https://dev.px4.io/master/en/middleware/micrortps.html doesnt come until much later in the guide under middleware section.

I will have to check again on https://github.com/PX4/Devguide/pull/1006 because I followed that install https://dev.px4.io/master/en/setup/fast-rtps-installation.html and fastrtpsgen was giving me that error that it couldnt find the jar file. I assume fastrtpsgen gets installed when you compile the fastrtps 1.8.2 folder si that correct?

No. If it was like that it wouldn’t be provided instructions to install FastRTPSGen. Make sure that you don’t have fastrtpsgen.jar installed in a place different from usr/local/share/fastrtpsgen/java. Remove the one in usr/local/share/fastrtps

@TSC21 Ok thanks, I will try to reinstall using these instructions again for the fastrtpsgen section https://dev.px4.io/master/en/setup/fast-rtps-installation.html and see if things get installed into the right directories this time.

git clone --recursive https://github.com/eProsima/Fast-RTPS-Gen.git -b v1.0.4 ~/Fast-RTPS-Gen \
    && cd ~/Fast-RTPS-Gen \
    && gradle assemble \
    && gradle install