By downloading PX4 (following the steps presented above – git …) and running QgroundControl I get the PX4 version of: 1.14.0beta version
Executing “make px4_sitl_rtps gazebo” - from the tutorial does not work and “micrortps_agent -t UDP” is not found
make px4_sitl gazebo
Reading different documentation, I understand that the micrortps module, and thus all rtps targets have been removed, and now I have to use the microdds module.
So, I installed microdds
By running: ros2 launch px4_ros_com sensor_combined_listener.launch.py
I get the error:
[INFO] [launch]: All log files can be found below /home/mdobrea/.ros/log/2023-01-07-00-48-52-317570-linuxhome-17935
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [micro-ros-agent udp4 --port 8888 -v -1]: process started with pid 
[INFO] [sensor_combined_listener-2]: process started with pid 
[sensor_combined_listener-2] 1673045332.716899  sensor_com: selected interface "lo" is not multicast-capable: disabling multicast
[micro-ros-agent udp4 --port 8888 -v -1] /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[micro-ros-agent udp4 --port 8888 -v -1] Error while starting IPvX agent!
[INFO] [micro-ros-agent udp4 --port 8888 -v -1]: process has finished cleanly [pid 17937]
I followed the steps and also tested the example from:
It does not work – nothing happens. From QGroundControl, I set the offboard mode for PX4 -in this situation QGroundControl is loosing connection ang it is regaining connexion from second tio second.
SO, please, can you help me? Can someone show me the error? Or maybe post a complete and correct tutorial? Thank you!!!
And once I had set the param COM_RCL_EXCEPT to 4, so that it ignores missing RC in offboard mode, I was able to switch the mode to offboard in QGC, and then arm it by clicking the “Ready to Fly” bar and then “Arm”.
So, my conclusion is that the bridge between ROS2 and PX4 does not work
One of the potential problems is FastDDS – a prerequisite, according to the tutorial.
In this regard, I follow all the steps presented in the Fast DDS Installation documentation
To give you an insight:
$ java --version
openjdk 13.0.7 2021-04-20
OpenJDK Runtime Environment (build 13.0.7+5-Ubuntu-0ubuntu120.04)
OpenJDK 64-Bit Server VM (build 13.0.7+5-Ubuntu-0ubuntu120.04, mixed mode)
$ gradle -v
Welcome to Gradle 7.6!
Here are the highlights of this release:
- Added support for Java 19.
- Introduced `--rerun` flag for individual task rerun.
- Improved dependency block for test suites to be strongly typed.
- Added a pluggable system for Java toolchains provisioning.
For more details see https://docs.gradle.org/7.6/release-notes.html
Build time: 2022-11-25 13:35:10 UTC
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 13.0.7 (Private Build 13.0.7+5-Ubuntu-0ubuntu120.04)
OS: Linux 5.15.0-56-generic amd64
Hi @mdobrea , the tutorial is heavily outdated so you don’t need to manually install FastDDS or fastDDS_gen anymore. But it is quite weird that both agent and client show that the connection is established while ros2 topic list remains silent. You are using ubuntu20.04 and ros2 foxy right?
Try crating a workspace with the following repos:
To be able to understand better the problem I upgraded a Ubuntu version 20.04 (on an another system - a laptop) to Ubuntu 22.04 and I installed ROS2 Humble, and all the packages including Micro-XRCE-DDS-Agent.
The problem is the same, I’m unable to list any topics from PX4 (through “ros2 topic list”). Moreover, “make px4_sitl gazebo” does not work, instead “make px4_sitl jmavsim” is working very well.
So, I conclude that due to the fact that on both installs (Ubuntu 20.04 + ros2 galactic & Ubuntu 22.04 + ros2 humble) I’m unable to get list of topics I miss a step. Please, do you have any idea?
I insist so much to make a functional chain on Ubuntu 20.04 and ros2 galactic mainly because I must to work on a NavQ Plus development board that has this configuration.
So, my suggestion is, follow the instruction to install and change the DDS implementation, than give another try to the workspace with only the Agent and the ros_msgs package.
From your video you are launching the agent from usr/local/bin, why? Can you make sure you are using the “right one” running which MicroXRCEAgent? The output should be your_ws_dir/install/microxrcedds_agent/bin/
make px4_sitl gazebo is no more since yesterday the new syntax is make px4_sitl gazebo_iris (you have to specify the model name). But it still does not explain why it is not working on humble… let’s see if on galactic it is solved for now.
Only today, Sunday, I had time to get back to work … and I’m making progress! Installing and uninstalling packages (some with sense, some just to see what happens), reading documentation, blogs and other users’ posts I finally found the solution for Ubuntu 22.04 with ROS2 Humble: in the .bashrc I set the ROS_DOMAIN_ID and, in order to work, it required only to unset ROS_DOMAIN_ID.
But instead, the problem persists with Ubuntu 20.04 and ROS2 Galactic. So far I have not found what agent to use to mediate communication between PX4 (simulated in Gazebo) and ROS2. Do you (or anyone else) have any ideas? I would be deeply indebted to you if you could suggest a solution or a way forward. Thank you!
Up to now, no progress! In this morning I changed the RMW from Cyclone DDS to Fast DDS but I was unable to get topics from PX4 simulated in Gazebo. On the evening, after 21.00 I will have more time to test other combination.
Hi @Benja@JulianOes ,is there a new documentation somewhere for this? I am trying to run multiple vehicle sim sitl using ros2-px4-gazebo and a bit confused now with what needs to be installed. what needs to be sourced etc.