Max Z
Max Z

Reputation: 107

ROS2 Network Analysis

I'm currently running a complex system with several dozen ROS2 (mostly C++) nodes operating simultaneously. I'd like to analyze the network performance of the system to identify and log the topics with the highest network footprint. What ROS2 tools are available that can perform this kind of analysis, and what steps should I take to use them effectively?

Upvotes: 0

Views: 291

Answers (2)

Quazil
Quazil

Reputation: 47

You are mixing two worlds.

For ROS directly use the ros2 tool to capture a bag file then you can replay the bag on another machine and use whatever ROS tools you can find.

To address the networking layer use Wireshark for the analysis and you capture a pcap file using a tool like tcpdump (it captures more than tcp despite the name). You can do things like stream the pcap live over SSH but then you'll capture that traffic as well unless you set up filters et. al.

So it's easiest to capture a ROS bag, capture a pcap, run your test and as soon as you experience the issue you're trying to debug stop the captures. Copy those back to your workstation (e.g. scp) and now you can load them up and review the last few seconds of the recordings to see what is going on.

STFW for any tcpdump / Wireshark tutorial e.g. https://www.comparitech.com/net-admin/tcpdump-capture-wireshark/

PS I presume Linux, if you are using Windows you have bigger problems to solve first.

Upvotes: 0

Alesof
Alesof

Reputation: 341

You talk about network and topics, therefore I'll suggest one for each.

  1. Network: you can analyse network traffic by using tcpdump 1.
  2. Nodes: You can use tracing to analyse the impact of each node and its callbacks 2. If you have a subset of nodes you want to check you can always use command line tools to inspect frequency of topics etc.

Upvotes: 0

Related Questions