Skip to content

Latest commit

 

History

History
123 lines (93 loc) · 3.47 KB

INSTALLATION.md

File metadata and controls

123 lines (93 loc) · 3.47 KB

Installation

Installation Instructions

Set Up the Pi (Basics)

Clone repository and get submodules

git clone https://github.com/GAVLab/ros-hab-dcs --recursive

If you are having trouble with submodules try the following commands

git submodule update --init --recursive

Set Up VNC on the Pi (Optional)

  • Install ifconfig and x11vnc: sudo apt-get install net-tools x11vnc

  • Run ifconfig to identify ip address.

  • Start the VNC

      startx &
      x11vnc &
  • Login to VNC viewer with IP address

Install ROS and other Basics

echo "source ~/ros-hab-dcs/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
  • Install Python 3
sudo apt-get install python3
  • Install various Python libraries
pip3 install scipy

Fix raspi_cpu_temp node

  • Open ~/ros-hab-dcs/catkin_ws/src/raspi_cpu_temp/scripts/raspi_cpu_temp_node.py
  • Change first line to #!/usr/bin/env python3

Setup i2c on Pi

  • Enable i2c

    sudo apt-get install i2c-tools
    i2cdetect -l
  • Add i2c-devl to boot with sudo nano /etc/modules-load.d/modules.conf

  • Slow down baud rate by adding dtparam=i2c_baudrate=10000 with sudo nano /boot/firmware/usercfg.txt

  • Install wiringpi sudo apt install wiringpi

  • Ensure proper permissions to prevent i/o errors:

cd /dev
sudo chmod og+rwx gpio*

Setup UART on Pi

sudo adduser $USER tty
sudo adduser $USER dialout 
sudo chmod g+r /dev/ttyAMA0
sudo chmod g+r /dev/ttyUSB0

Setup the GPS

  • Install ROS ublox: sudo apt install ros-noetic-ublox

Setup Camera

  • ROS Libraries
sudo apt-get install -y ros-noetic-camera-info-manager ros-noetic-rqt-image-view ros-noetic-compressed-image-transport ros-noetic-dynamic-reconfigure ros-noetic-usb-cam
  • Enable CSI Camera sudo modprobe bcm2835-v4l2
  • Check video ports v4l2-ctl --list-devices
  • View Results once Running Node rqt_image_view
  • Setup library for camera calibration sudo apt-get install ros-noetic-image-geometry
  • Perform camera calibration. Move checkerboard paper until all bars are green and press "Calibrate" wait until results are printed to terminal (may take up to 10 minutes). Press save (may take up to 5 minutes). Press commit.
roslaunch ~/ros-hab-dcs/launches/sensors/camera_calib.launch
rosrun camera_calibration cameracalibrator.py --size 9x6 --square 0.022 image:=/down_cam/image_raw camera:=/down_cam

Running system

cd  ~/ros-hab-dcs/launches/
roslaunch full_flight.launch
./record_full.sh