Px4_ros_com applications won't receive any data via micrortps

I am running the px4_ros_com applications: Sensor Combined Listener and Vehicle GPS Position Listener. They are available to see under px4_ros_com_ros2/src/px4_ros_com/src/examples/listeners.
I am expecting to see text output of the data upon running the applications but I do not.

I am using the CUAV V5+ flight controller and running PX4 version v1.12.3 and px4_fmu-v5_rtps on it. I have connected the flight controller to my Ubuntu 20.04 laptop via the USB port and by the DSU7 debugging port using a serial-USB converter. I access the debugging port using the following command: screen /dev/ttyUSB0 57600 8N1

In the debugging port I start the Micro RTPS client with the command: micrortps_client start /dev/ttyACM0 -b 115200

In another terminal, I start the Micro RTPS Agent with the command: micrortps_agent -d /dev/ttyACM0 -b 115200 -v

And then I wait around 10 minutes for received messages to be accumulated in the agent.

From the screenshot below you can see the agent sends and receives messages:

The flight controller is definitely outputting GPS data and Sensor data as you can see below:


But the Sensor Combined Listener and Vehicle GPS Position Listener applications do not receive anything:


From doing cat /dev/ttyACM0 I can see that data is definitely being sent/received on this port.

I don’t know what messages the Agent is receiving exactly but if someone could help me in finding out that would be great. And could someone help me to figure out why the Sensor Combined Listener and Vehicle GPS Position Listener applications don’t receive any data?

Hi,

what version of Ubuntu are you running and what version of ros2? Anything special done regarding RMW?
In addition, can you run this command when your micrortps agent and client are running:

ros2 topic list

Where do you run that code, I guess frst you need enter nsh terminal then you have to start client with:
micrortps_client start -t UART -d /dev/tty(S1 or S2 depends on your Telem connection) then -b

Yes that is right , you run it in the nsh terminal (the flight controller’s debug port)

1 Like

Yes i can run that command. I am using Ubuntu 20.04 and ROS2 Foxy. And for RMW , I am using FastRTPS

Hey did you solve that issue?

I didn’t solve the issue in this post, however I achieved what I was trying to achieve in connecting PX4 (running on the flight controller) with the ROS network using MAVROS. I had to switch to using ROS1 Noetic and then use the MAVROS package to bring the data from the flight controller onto the ROS network.

Do you mean you won’t use ROS2 anymore and you passed ROS Noetic right?

Thats right . I’m not using ROS2 anymore because MAVROS is only compatible with ROS1

Yes you are right but in that case every dev suggests ROS2 because it has RTPS in its middleware.Anyway, If I get any solution about it , I will also post this topic.
Have a nice day.

thank you :slight_smile: and you too have a nice day

1 Like