:imagesdir: ./doc/images :toc: macro
= PRSG RoboMagellan ROS node
== What's in the repository? The current use of this repository is to simulate a ROS node for the purposes of developing automated build. link:http://programmingrobotsstudygroup.github.io/2017RoboMagellan.html[See PRSG's project website for project details]
== This Repository is integrated with Jenkins! Continuous Integration Etiquette:
mailto:ProgrammingRobotsStudyGroup@gmail.com?Subject=Request%20RoboMagellan%20Build%20Access"[Request access to to Jenkins notifications] if you commit code here.
Check out the test suite. (still being developed).
Build and run the tests locally before pushing to Github.
If you build and run the tests successfully locally, go ahead and push to Github.
If you push to Jenkins and get an email failure, please fix it immediately!
== Prepare your System
=== 1. Install Ubuntu and ROS to UP and Test
Optional. Lidar support with rpilidar:
to your ~/.bashrc file.
echo $HOSTNAME
.local=== 5. Shutdown Switch This step describes how to set up a pushbutton switch to gracefully shut down the UP. This may help avoid flash corruption.
Install Rpi.GPIO. Try this first:
sudo apt-get install python-rpi.gpio
If that doesn't work
$ dpkg -L python-rpi.gpio $ wget http://ubilinux.com/ubilinux/pool/main/r/rpi-gpio/python-rpi.gpio_0.6.2%2bubi2-1_amd64.deb $ sudo dpkg -i python-rpi.gpio_0.6.2+ubi2-1_amd64.deb $ sudo groupadd gpio $ sudo adduser robot gpio $ pico /etc/udev/rules.d99-gpio.rules SUBSYSTEM=="bcm2835-gpiomem", KERNEL=="gpiomem", GROUP="gpio", MODE="0660" SUBSYSTEM=="gpio", KERNEL=="gpiochip", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/une SUBSYSTEM=="gpio", KERNEL=="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge
The file 99-gpio.rules can be found in the doc directory.
Add python /home/robot/catkin_ws/src/robo_magellan/scripts/shutdownSwitch.py &
to the UP in /etc/rc.local just before the existing exit 0
line.
The shutdownSwitch.py script assumes a momentary, normally open switch is connected from UP board pin 18 to ground (pin 20). You may also need an external 10k pullup resistor from pin 18 to 3.3 V (pin 17). A fragment of the link:https://up-community.org/wiki/Pinout[UP pinout] is included here for clarity.
image::switch-pins.PNG[width="400", height="300"]
=== 6. Get the Code You will need ROS Kinetic installed on your machine.
Install link:https://github.com/mavlink/mavros/blob/master/mavros/README.md[MAVROS]. Just use apt-get.
sudo apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras
If you haven't already done so, start by fetching the repository.
Edit: 1/24/18 (Errors occurring when re-starting Vicky after 9 months.)
Then install GeographicLib datasets by running the install_geographiclib_datasets.sh script:
wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh ./install_geographiclib_datasets.sh
If you already have the repository, make sure it's up to date
cd catkin_ws/src git pull