-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node takes a very long time to boot and load all plugins in Docker with network=host #1689
Comments
Hmm, on log i see 10-15 sec freezes. But absolutely unclear why. I'll try to reproduce, but might be hard to catch... |
Ok at least good to know that it should not be the case. I'll try to debug also on Monday |
Usually i do not see any performance related troubles with docker. And i use docker for development a lot because i love to have newest os release... |
I found the root of the issue, which is running Docker with I can modify my working setup to work without the host networking in the meantime |
I did some more debugging on unrelated networking tasks and it seems like the issue is "just" an underlying ROS2 issue. As MAVROS2 uses one node for each plugin, each node tries to communicate with the outside with ROS2 simple participant discovery protocol (SPDP). The SPDP was the thing that caused the long boot time, mainly because each MAVROS2 node boots one by one and tries to connect to the previous ones. When in network=bridge the MAVROS2 nodes don't try to reach the whole network, so it gies much faster I'll close this issue as this is not a MAVROS2 issue, but a ROS2 issue. If it can help other people, the two solutions I found are using the FastDDS RMW and two of their features: Discovery Server and Interface Whitelisting |
Issue details
The MAVROS2 node takes a very long time to fully boot with all plugins. There are no other intensive processes running in my machine (need to run alongside PX4 SITL, but it's not running in my tests).
The full boot time was as much as 7 minutes, which is not usable in my setup (currently using MAVROS1+ros1_bridge).
I'm putting boot logs below as well as the
ros2 run
command I'm using to start the nodes, but I don't really know what else may be needed to debug the issue.In the logs below the nodes started at ts=16443554116 and finished it's boot at ts=1641554543, which gives us 543-116 = 427s ~= 7mn of booting time.
I'm running this in Docker (host networking), could this influence the results?
MAVROS version and platform
Mavros: 2.0.5
ROS: Galactic
Ubuntu: 20.04
Autopilot type and version
[ ] ArduPilot
[x] PX4
Node logs
I'm starting MAVROS2 with these lines:
My plugin blacklist/whitelist file
/home/workspace/config/px4_pluginlists.yaml
is as follows:The text was updated successfully, but these errors were encountered: