Unable to ros2 topic echo specific topics

I have setup up Micro XRCE-DDS Agent & Client following the guide

My flight controller has no gps and is only connected to my Nvidia Jetson Orin Nx Companion computer via ethernet

I believed that I have setup the communication bridge correctly between my companion computer and my flight controller because I am able to see the topics being published on the client:

On the companion computer, I am able to ros2 topic list to show all the topics

However, some of the ros2 topics can be echo’ed such as /fmu/out/vehicle_odometry but some topics, namely /fmu/out/vehicle_local_position and /fmu/out/vehicle_status cannot be echoed at all

I created my own subscriber node to subscribe to /fmu/out/vehicle_status but the callback was not triggered

#include <px4_msgs/msg/vehicle_status.hpp>
#include <rclcpp/rclcpp.hpp>

class Vehicle_Status_Listener : public rclcpp::Node {  // MODIFY NAME
    Vehicle_Status_Listener() : Node("telem_listener") {
        rmw_qos_profile_t qos_profile = rmw_qos_profile_default;
        qos_profile.reliability = RMW_QOS_POLICY_RELIABILITY_RELIABLE;
        qos_profile.durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
        qos_profile.lifespan = RMW_DURATION_INFINITE;
        qos_profile.deadline = RMW_DURATION_INFINITE;
        qos_profile.liveliness = RMW_QOS_POLICY_LIVELINESS_AUTOMATIC;
        qos_profile.liveliness_lease_duration = RMW_DURATION_INFINITE;
        auto qos = rclcpp::QoS(rclcpp::QoSInitialization(qos_profile.history, 5), qos_profile);
        RCLCPP_WARN(this->get_logger(), "help");
        telem_subscription_ = this->create_subscription<px4_msgs::msg::VehicleStatus>(
            "/fmu/out/vehicle_status", qos,
            [this](const px4_msgs::msg::VehicleStatus::UniquePtr msg) {
                std::cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
                std::cout << "RECEIVED VEHICLE_STATUS" << std::endl;
                std::cout << "=============================" << std::endl;
                std::cout << "ts: " << msg->timestamp << std::endl;

    rclcpp::Subscription<px4_msgs::msg::VehicleStatus>::SharedPtr telem_subscription_;

int main(int argc, char** argv) {
    rclcpp::init(argc, argv);
    auto node = std::make_shared<Vehicle_Status_Listener>(); 
    return 0;

Also, I was able to see the bandwith for /fmu/out/vehicle_status

I dont believe its a px4_msgs version mismatch because I cloned from GitHub - PX4/px4_msgs: ROS/ROS2 messages that match the uORB messages counterparts on the PX4 Firmware and the flight controller firmware is from the latest release 1.14.3

More about the issue and configs can be seen from this issue:

1 Like

I am having the same issue with my NVIDIA Jetson Orin Nano 8GB

Hi Cole,

I fixed my issue it was a version mismatch between the flight controller firmware and the branch of px4_msgs i was using

The best way to debug would be to look at the topic definitions in the MAVLink console from QGC and compare it against the message definitions on the px4_msgs branch

Hello @monkescripts I have the same issue. I am also using the tag v1.14.3 from PX4 Autopilot and the branch release/1.14 from px4_msgs. Are you using that branch too?

I am using the Isaac ROS packages, which involves using dockers where ROS2 Humble is running inside. I am able to connect through DDS, but I cannot see the topics. I assured the B/s in Mavlink console, same as you.

Btw I am cloning the repository with this command:

git clone https://github.com/PX4/px4_msgs.git -b release/1.14

Hi @Jimi1811 I wanted to be safe so I directly copied the message definitions from the PX4-Autopilot repo under tag v1.14.3 rather than using px4_msgs release/1.14 branch

Thanks for the help @monkescripts it seemed like that worked! I copied the msg folder from release/1.14 into the px4_msgs I already had from cloning main, removed the old msg folder, and changed a few of the msg references in px4_ros_com/src/examples/listeners/vehicle_gps_position_listener.cpp with what they were called in release/1.14 after getting some errors from colcon build (latitude_deg → lat, longitude_deg → lon, etc.). After that I got a successful colcon build and have not faced any issues as of yet with receiving messages from the pixhawk.

Thanks for your help!

Thans for this solution! It works perfectly.

If anybody doesn´t know what to change in px4_ros_com/src/examples/listeners/vehicle_gps_position_listener.cpp, you need to change:

Line 60: …msg->lat…
Line 61: …msg->lon…
Line 62:…msg->alt…
Line 63: …msg->alt_ellipsoid…