GithubHelp home page GithubHelp logo

jazibdawre / rospberrypi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alansrobotlab/rospberrypi

1.0 1.0 0.0 40 KB

Everything you need to set up ROS Melodic on the Raspberry Pi Zero / W

License: GNU General Public License v3.0

CMake 2.01% Shell 97.99%

rospberrypi's Introduction


ROSpberryPi

A quick and dirty way of bootstrapping ROS and some additional tools onto a Raspberry Pi Zero / W. (well, maybe not quick, it still takes more than an hour to complete the script and get everything installed)

Compatible binaries are available at https://github.com/jazibdawre/rospberrypi-binaries


FAQ:

Why?

  • Recent ROS distributions only support ROS on the Raspberry pi 2B or greater (all arm7l devices) and on Ubuntu Mate. The Raspberry Pi Zero/W is an arm6l device, so you if you want ROS on it you must compile it yourself which is a bit of a pain. So I put together all of my work in a separate repository so others can take advantage of a prebuilt ROS Melodic setup.
  • You can pick up a Pi Zero / W for a little as $5, which opens up all kinds of options for small projects
  • If you operate the Pi Zero as headless you can do all of your development work on another machine, and just push the code to the zero. My current setup has:
    • the pi zero w set up as an access point (using create_ap)
    • connect to it from my laptop using ssh/putty.
    • the ros src directory is shared and you can connect to it from \\(whatever your pi zero w ip address is)\ros
    • open the shared folder in visual studio code

How?

  • I downloaded and configured all of the required sources and compiled them on a Raspberry Pi 3 (I wouldn't recommend trying to compile them directly on a zero). Next I packaged up the installs using checkinstall and hosted them on my google drive. Then I wrote a script which grabs everything necessary for a functional ROS Melodic install.

What works?

  • Almost everything! (As far as I know)

What doesn't work?

  • rviz can't seem to load urdf/stl files without crashing (but you shouldn't be running these tools on the zero anyways)
  • visual studio code will not work on a pi zero (it relies on electron, which only compiles for the arm7l, and the pi zero is an arm6l)

Will this work on any Raspberry Pi?

  • In theory this should work on any Raspian Stretch install from the zero and original A+ to the 3B+.

Will this work on a Pi 2B/3B/3B+?

  • In theory, but for those devices it would be much easier to just install ubuntu mate and use the official packages

Requirements:

  • A Raspberry Pi Zero (preferably a W)
  • Raspbian Stretch (Desktop or Minimal)
  • An Internet connection

What this script installs:

  • A compatible version of TinyXML
  • A compatible precompiled arm6l version of OpenCV3
  • A compatible precompiled arm6l version of
    • ROS Melodic Desktop
    • ROS Melodic Perception (minus the pcl stuff)
    • ROS Melodic Robot
    • ROS Melodic Joy(stick)
    • All Dependencies
  • Tensorflow
  • Increases Swap to 1GB
  • GPIZero libraries
  • Installs create_ap (ability to use raspi zero w as access point)
  • Initializes a ROS workspace
  • Sets up a SAMBA Fileshare for the /home/pi/catkin_ws/src directory
  • Sets up all env variables for ROS melodic and your ros workspace

How to set this up

  1. Download and install Raspbian Stretch (Desktop or Lite) onto a microsd card
  2. Log into the pi and set it up to access the internet
  3. If you're feeling adventurous, maybe overclock the zero a bit (I'm not recommending you do this and I'm not going to walk you through how -- but possible settings are)
     # https://www.raspberrypi.org/forums/viewtopic.php?t=177743#p1169042
     # 10% overclock
     arm_freq=1100
     over_voltage=8
     sdram_freq=500
     sdram_over_voltage=2
     force_turbo=1
     boot_delay=1
     dtparam=sd_overclock=100
  4. Open up a command prompt and type in the following commands.
    git clone https://github.com/jazibdawre/rospberrypi
    cd rospberrypi
  5. Read through the install script so you understand what you're about to do. (You're not the type of person that runs random scripts you download from the internet are you?)
    nano bootstrap.sh
  6. Run the bootstrap script and go get a cup of coffee.
    sh bootstrap.sh
  7. Review the results of the bootstrap script, looking for any errors
  8. Carefully read the last lines of the bootstrap script.
    OK, now there are a few more things that you need to do
    before you can get started.
    First, run the following command in a command prompt
    to set the samba filesharing password
    for user 'pi'\n (Must be at least 8 characters)
    
    sudo smbpasswd -a pi
    
    
    Next, disconnect from your wifi network and run
    the following command to set up your pi as an access point
    
    sudo iw wlan0 disconnect (to disconnect wifi)
    sudo systemctl enable create_ap (set access point to begin automatically on startup)
    sudo systemctl start create_ap (to start the create_ap access point)
    
    
    Finally, run the following command to enable ssh, the camera and i2c
    
    sudo rc-gui (for the gui config tool) \n\
    sudo raspi-config (for the command line tool) \n"
    
  9. http://wiki.ros.org/ROS/Tutorials
  10. If you ever want to grab an updated version of this repository
    cd ~/.rospberrypi # whereever you cloned this repository
    git pull

rospberrypi's People

Contributors

jazibdawre avatar alansrobotlab avatar

Stargazers

Stathis Bozikas avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.