More details to come... the current not-so-short instructions:
- Download the ROBsots ROS+OpenCV Raspbian Image. Unzip the image file.
- On a Windows, Linux or Mac machine, install the image on to your micro-sd card which you plan to use for your Raspberry Pi.
- You can use the same installation instructions as described by the Raspberry Pi folks - instead of their Raspbian image, you'll be using ours.
- ie for MacOS - sudo dd if=rosbots-xxx.img of=/dev/rdiskN conv=sync
- You can use the same installation instructions as described by the Raspberry Pi folks - instead of their Raspbian image, you'll be using ours.
- Connect your Pi to your network using an ethernet cable. (We'll set up Wifi after).
- Insert the micro-sd into your RPi then plug in the power
- If you are using our ROSbots build steps, that would mean plugging in the red/black Powerboost Lipo battery wires into the Powerboost board on the top platform.
- Find the IP address assigned to you Raspberry Pi's ethernet module:
- On a Mac or Linux system, that's easily discoverable via "sudo nmap -sP x.x.x.0/24" where you replace x.x.x.0 with your network subnet.
- ssh pi@xxx.xxx.xxx.xxx (IP address assigned to your RPi)
- password - rosbots!
- Once logged in, run the following commands in the ssh terminal:
- update_rosbots_git_repos
- This will retrieve our latest setup routines
- initialize_rosbots_image
- This will:
- Set up new SSH keys
- Ask you for a new password
- Run raspi-config where you should enable your Pi Camera and expand your filesystem to use entire SD card space.
- Select Interfacing Options -> Camera -> Enable
- Select Advanced Options -> Expand Filesystems
- Finish and Reboot
- This will:
- update_rosbots_git_repos
- Count to 60, ssh back into your Pi. To make sure ROS is running, type:
- rosnode list
- You should see - /rosout
- rosnode list
- If you are using a ROSbots robot, complete the ROSbots software setup. From an ssh terminal into your RPi, type:
- setup_rosbots_code
- After setting up some other packages (about 30 seconds), it'll ask you for your RPi password. Once you finished that, you can go grab a cup of coffee. When you return, setup should be complete.
- When complete, type - rosnode list
- You should see /rosout and /uno_serial_node outputted
- setup_rosbots_code
From your host machine (ie laptop):
- cd into the rpi_setup/ folder directory in the repository.
- Type "fab -H ipaddressforyourpi setup_wifi_on_pi" - enter your password for your Pi
- Answer the questions about your WiFi network (select a 2.4 GHz network for greater range)
- With your ethernet still connected into your Pi, SSH into your Pi. While ssh'd into your Pi, turn on then off the wlan0 interface:
- sudo ip link set wlan0 down
- sudo ip link set wlan0 up
- (wait about 1-2 minutes for wifi to connect to your access point)
- If above doesn't work, then try reboot via:
- sudo shutdown -r now
- Count to 60 to make sure the Pi has rebooted.
- Unplug your Pi's ethernet cable.
- Discover your Pi's new IP address assigned to its Wifi module:
- "sudo nmap -sP x.x.x.0/24" where you replace x.x.x.0 with your network subnet.
- Now you can SSH into your Pi with the new IP Address assigned to your Pi's Wifi.
From your host machine (ie laptop):
- cd into the rpi_setup/ folder directory in the repository.
- Type "fab -H ipaddressforyourpi main_setup_only_rosbots_components" - enter your password for your Pi
- ... wait for completion (about 30 minutes)
- rosnode list and you should see a /uno_serial_node running
- Try our first tutorial on Applying Coursera's Control of Mobile Robots using ROS and ROSbots.
- Create an SD card with the latest Raspbian image per the instructions on Raspberrypi.org.
- Create a stub empty file named "ssh" in the boot main directory of the SD card to enable SSH headless booting.
- Plug in your newly created Raspbian image SD card into your Pi
- Plug your Pi into an ethernet jack on your router
- On a laptop / host machine type "arp -a" to see current IP addresses on your subnet
- Power on your Pi
- On a laptop / host machine type "arp -a" again to see what IP address your Pi was allocated
- ALTERNATIVELY, you can use "sudo nmap -sP x.x.x.0/24" where you replace x.x.x.0 with your network subnet
- ssh pi@ - default password "raspberry"
- Change your password via "passwd"
- Expand your filesystem via "sudo raspi-config" then selecting the expand your filesystem step. Restart
- Upon restart, update your raspbian image:
- "sudo apt-get update"
- "sudo apt-get upgrade"
From your host machine:
- cd rpi_setup
- Type "fab -H main_setup_ros_opencv_for_rosbots" - enter your password for Pi
This step will take a long while - about 4-6 hours - so leave this running and check in every now and then to make sure everything is ok.
When the step completes:
- SSH into your Pi
- Type "rosnode list" to see the current ROS nodes running.
- Use gparted to shrink on Linux machine
- If there's an error, then resize2fs manually with "-f" flag
- May need to go back to gparted to shrink again to get the partition table updated
- Burn sd card image (only first 9GB in this case) to file
- sudo dd bs=1m of=rosbots-ros-opencv-stretch-lite-2017-11-29.img if=/dev/rdisk2 count=9000 conv=sync
================
Jack Pien - jack@rosbots.com