PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.29k stars 13.43k forks source link

1.8: Can't Calibrate Sensors While UAVCAN is Enabled #10045

Closed keenanjohnson closed 5 years ago

keenanjohnson commented 6 years ago

I get an out of memory error if I do sensor calibrations while UAVCAN is enabled.

This did not happen in 1.7

To Reproduce Steps to reproduce the behavior:

  1. Turn drone on
  2. Enable UAVCAN
  3. Attempt to do sensor calibrations

Drone (please complete the following information):

mhkabir commented 6 years ago

Simply not enough RAM left, I'm afraid. You could try to disable stuff like extra mavlink instances in the startup script to free up some RAM.

dagar commented 6 years ago

@keenanjohnson if you can share the output of top we might have some ideas.

keenanjohnson commented 6 years ago

Here's the output of top:

image

LorenzMeier commented 6 years ago

@keenanjohnson I think Daniel also meant the output of free in addition. Thanks!

An obvious win would be the uavcan fw srv. It is used to upgrade nodes like ESCs with new Firmware and we could in theory shut it down before starting any calibration.

dagar commented 6 years ago

@keenanjohnson the easiest way to save some memory is limit the number of mavlink instances (mavlink status). For example when you have USB connected it starts an extra mavlink instance. As a side note you probably shouldn't calibrate the compass with USB attached regardless of memory.

  1. Don't use USB except when you need it for upgrade or debugging.
  2. Do you need mavlink on both telem ports? Review SYS_COMPANION.
  3. Shutdown uavcan firmware update server if you're not using it. uavcan stop fw (@LorenzMeier's comment).
  4. uavcan shrink
  5. Consider moving to a pixhawk 4 (or any fmu-v5).
mhkabir commented 6 years ago

Another option is to disable the dynamic node ID and firmware server permanently. Just assign Node IDs to your nodes manually. This is by far the easiest, and what I do on FMUv3 targets these days. See the UAVCAN_ENABLE parameter, and make sure you're on the "Manual Config" option.

dusan19 commented 6 years ago

@mhkabir thanks for the instructions, I just wonder how do I assign the node IDs to my nodes? How do I know what are the IDs of my nodes and where do I set them? I can only see one parameter related to this, UAVCAN_NODE_ID, is that what I should change? Thanks

mhkabir commented 6 years ago

@dusan19 You set node IDs on the node (e.g GPS, ESC, etc.) itself. Use an e.g Zubax Babel and uavcan_gui_tool (https://uavcan.org/GUI_Tool/Overview/).

Side note : UAVCAN-Mavlink parameter bridge seems to be broken currently. Not sure if it's a QGC thing or PX4 thing.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

Closing as stale.