Search code examples
rosdji-sdk

Problem with the installation of dji-osdk on raspberry pi 3 for dji matrice 100


I have a raspberry pi 3 with ubuntu mate 16.04 on it and i installed ROS. I'm following this guide to install the osdk on the raspberry. At point 6, when i type catkin_make the raspberry freezes at 94% and doesn't finish the compilation (i think that is because raspberry runs out of ram). How can i do?


Solution

  • Adding swap space would allow the Raspberry Pi to use the SD Card as extra memory. Accessing this memory will be very slow, but it can be useful in cases like this.

    To create a swapfile you'll need to run these commands. These instructions assume that the swapfile can be created in the root directory. You may want to change that depending on your setup to ensure that the file is created on the SD Card.

    sudo fallocate -l 1G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    

    To then use the swapfile run the below command. Note that you'll need to run this command each time you boot.

    sudo swapon /swapfile
    

    To verify that everything went as expected you can use this command to inspect the status of your memory.

    free -h
    

    You'll need to run this command to add the swapfile automatically.

    echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
    

    For more information, check out this article: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04