ROBOTIS-GIT / turtlebot3

ROS packages for Turtlebot3
http://turtlebot3.robotis.com
Apache License 2.0
1.52k stars 1.03k forks source link

Problem with colcon build in ros humble #965

Closed AnhHazz closed 1 year ago

AnhHazz commented 1 year ago

ISSUE TEMPLATE ver. 0.4.0

  1. Which TurtleBot3 platform do you use?

    • Waffle
  2. Which ROS is working with TurtleBot3?

    • ROS2 Humble
  3. Which SBC(Single Board Computer) is working on TurtleBot3?

    • Raspberry Pi 3B+
  4. Which OS you installed on SBC?

    • Ubuntu server 22.04
  5. Which OS you installed on Remote PC?

    • Ubuntu 22.04
  6. Specify the software and firmware version(Can be found from Bringup messages)

    • Software version: [x.x.x]
    • Firmware version: [x.x.x]
  7. Specify the commands or instructions to reproduce the issue.

  8. Copy and Paste the error messages on terminal.

    • But, around 28% of compiling turtlebot3_node, it displays:

INFO: task kworker/0:0:1149 blocked for more than 120 seconds. Tainted: G C E 5.15.0-1030-raspi # 32-Ubuntu INFO: task kworker/0:0:1149 blocked for more than 241 seconds. Tainted: G C E 5.15.0-1030-raspi # 32-Ubunt ...

  1. Please describe the issue in detail.

    Then I hit Ctrl+C and the compilation resumed, skipping the compilation of turtlebot3_node.

    I do not know if this is relevant but, when (or just before maybe) I pressed Ctrl+C, I also got the message

    systemd[1]: snapd.service: Watchdog timout (limit 5 min)

    From what I see from htop, one cc1plus process is taking 65.7% of the RAM. There are also several snapd processes that take some 1.6% of the RAM, some of them takes 20% of the CPU as well .

ozanaki commented 1 year ago

I have exactly the same issue too.

ozanaki commented 1 year ago

ISSUE TEMPLATE ver. 0.4.0

  1. Which TurtleBot3 platform do you use?

    • [X] Burger
    • [X] Waffle Pi
  2. Which ROS is working with TurtleBot3?

    • [X] ROS 2 Humble Hawksbill
  3. Which SBC(Single Board Computer) is working on TurtleBot3?

    • [X] Raspberry Pi 3B+
    • [X] Raspberry Pi 4
  4. Which OS you installed on SBC?

    • [X] Ubuntu 22.04.2 LTS (jammy Server)
  5. Which OS you installed on Remote PC?

    • [X] Ubuntu 22.04.2 LTS (jammy Desktop)
  6. Specify the software and firmware version(Can be found from Bringup messages)

    • Software version: [x.x.x]
    • Firmware version: [x.x.x]
  7. Specify the commands or instructions to reproduce the issue.

  8. Copy and Paste the error messages on terminal.

    • Not any warning or error messages were shown.
    • Progress messages are updating (time is counting)
    • But the percentage of builds is hanging at 28%.
  9. Please describe the issue in detail.

    • This issue was observed just after a fresh installation.
    • After waiting almost 5 hours, no progress was observed.
    • Control+C can break the building process from the ssh terminal (the system is still responsive)
    • Trying the colcon building with different arguments, the same issue occurred.
    • This problem did not occur on Ubuntu 22.04 installed on PC/WSL/Virtual Machine.
    • Issue is appearing only on Ubuntu 22.04 installed on Raspberry Pi 3 & Raspberry Pi 4.
ROBOTIS-Will commented 1 year ago

Could you try setting up the swap memory as shown below? I'd recommend to set at least 2GB.

$ sudo swapoff /swapfile
$ sudo fallocate -l 2G /swapfile
$ sudo chmod 600 /swapfile
$ sudo mkswap /swapfile
$ sudo swapon /swapfile
$ sudo nano /etc/fstab

in the fstab file, append below line and reboot.

/swapfile swap swap defaults 0 0
ozanaki commented 1 year ago

I tried your recommendations and it just worked after applying these. Here are details of my experiences:

  1. The building process has been done in 9 minutes on Raspberry Pi 4 (waffle pi) without any issues.
  2. For Raspberry Pi 3 (burger), I broke the building process which takes over 1 hour, and redefine the swap file for 4GB.
  3. After defining the 4GB swapfile, the building process time reached 1 hour again. But this time I decided to wait because the percentage of the progress was incrementing.
  4. The building process has been done in about 1 hour and 30 minutes on Raspberry Pi 3 (burger) without any issues.
  5. After successfully building, I just try the same colcon command several times on Raspberry Pi 3 (burger) again, and the build (or rebuild) time was about 30 seconds each time anymore!
  6. Trying the same colcon build command on Raspberry 4 (waffle pi) again after a successful build, build time was not changed.
  7. I resized the swapfile of Raspberry Pi 4 (waffle pi) to 4GB.
  8. Trying the same colcon build command on Raspberry 4 (waffle pi) again after a successful build, build time was about 20 seconds!
  9. As a result of these experiments, it seems like the 4GB swapfile is the best choice for proper working.
ROBOTIS-Will commented 1 year ago

I'm expecting the ROS2 Humble and Iron RPi SBC miroSD image will be released in August through TurtleBot3 eManual. The instruction and some examples in the eManual will also be updated soon. Thank you.

aarsht7 commented 3 months ago

Hello @ROBOTIS-Will , Any update when ROS2 Humble image will be available? I faced the same issue and we have like 10 tb3 so I am preferring to wait for the official image. Thanks!

aarsht7 commented 3 months ago

In case if someone lands here, You can go to this gist comment and follow simple steps there.