The two systems are capable of serving either goal and in fact, many people develop for ROS using only Python (ROS supports a number of development languages).
The following section creates an SD card for the ROS LoCoRo. If you want to create a Python LoCoRo system, use the Python SD Card documentation
command or responseto be entered in a console or terminal window
The LoCoRo project is designed for the Raspberry Pi 3. There is an Ubuntu image for Raspberry Pi 2. It has not been tested.
As an alternate, the LoCoRo project is tested on the Orange Pi Lite. Where necessary, the documentation specific to different hardware will be highlighted.
Warning: It is not advisable to log into a Linux system as the root user. To do so is considered a security risk.
Any editing tasks will refer to
nano as the editor because it is simple and pre-installed, however editor any be used. Here is a reference sheet for nano.
The current version of Ubuntu is 16.04 Xenial. There is an image which has been created specifically for the Raspberry Pi.
Note: There are issues with some versions currently available. This document uses one specific image. While other images may work, theri use is at the discretion of the user.
These instructions will be updated following the release of Ubuntu 17.04 for Raspberry Pi.
sudo nano /etc/sudoers.d/default_user
#user rules for ubuntu ubuntu ALL=(ALL) NOPASSWD:ALL
sudo systemctl enable ssh.servicefollowed by the command:
sudo systemctl start ssh.service
sudo systemctl disable lightdm.service.
sudo nano /boot/cmdline.txtand remove the words
sudo systemctl disable lightdm.service.. To enable it temporarily until the next reboot, use the command:
sudo systemctl start lightdm.service.
sudo nmcli device wifi connect wifi_ssid password wifi_password
sudo apt-get updatefollowed by the commaond:
sudo apt-get upgrade
It will be necessary to have a light weight web server to support the mobile app interface. It's also a useful resource for other tasks.
sudo apt-get update
sudo apt-get install lighttpd
http:ip_addresswhere ip_address is the address of the Raspberry Pi.
sudo apt-get install php7.0-fpm php7.0
sudo nano /etc/php/7.0/fpm/php.ini
cgi.fix_pathinfo=1and remove the leading semicolon (
sudo nano /etc/lighttpd/conf-available/15-fastcgi-php.conf
fastcgi.serverto match the following:
fastcgi.server += ( ".php" => (( "socket" => "/var/run/php/php7.0-fpm.sock", "broken-scriptfilename" => "enable" )) )
sudo lighttpd-enable-mod fastcgiand
sudo lighttpd-enable-mod fastcgi-php
sudo /etc/init.d/lighttpd force-reload
sudo nano /var/www/html/info.php
<?php phpinfo(); ?>
http:ip_address/info.phpwhere ip_address is the address of the Raspberry Pi. You should see a page titled "PHP Version 7.x ...".
sudo apt-get install i2c-tools
sudo i2cdetect -y 1
sudo i2cdetect -y 0
sudo apt-get install daemontools
The SD card is now configured as a general purpose Linux server. This is a useful resource. By creating a backup - also called a clone - at this stage, the image may be used for other Pi projects. It may also be used in case it becomes necessary to start over.
It is recommended to make a backup image of the SD card periodically in case the SD card should fail or become inaccessible.
sudo shutdown now
There are two types of ROS software that will be used on the Raspberry Pi. The first includes all of the core pages for the robot operating system.
Rather that duplicate the instructions, please refer to the ROS wiki page Ubuntu install of ROS Kinetic for the steps to install the "ROS-Base (Bare Bones)" package. After installing the ROS core, verify the setup using the first tutorial - Installing and Configuring Your ROS Environment.
There are additional ROS packages needed in support developing the LoCoRo.
sudo apt-get install ros-kinetic-rosbridge-suite
sudo apt-get install ros-kinetic-roslint
Once the ROS core has been install, it is now time to install the packages specific to the LoCoRo project. These include the I2C PWM controller package and the LoCoRo example code.
gitcommands, you may store them using the following command:
git config credential.helper store
cd ~/catkin_ws/srcThis is where all of the ROS LoCoRo project code resides.
git clone https://gitlab.com/bradanlane/ros-i2cpwmboard.git
git clone https://gitlab.com/bradanlane/ros-locoro.git
git clone https://github.com/clearpathrobotics/robot_upstart.git
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
roslaunch locoro_drive locoro.launch
process[master]: started with pid  ROS_MASTER_URI=http://localhost:11311 process[rosout-1]: started with pid  started core service [/rosout] process[i2cpwm_board_node-2]: started with pid  process[locoro_autodrive_node-3]: started with pid  process[locoro_servomove_node-4]: started with pid  process[rosbridge_websocket-5]: started with pid  process[rosapi-6]: started with pid  [ INFO] [1484774269.909262772]: Drive mode configured: mode=mecanum, rpm=60.0000, radius=0.0620, track=0.2000, scale=1.0000 [ INFO] [1484774269.909601424]: Servo #1 configured: position=1 [ INFO] [1484774269.909934294]: Servo #2 configured: position=2 [ INFO] [1484774269.910123985]: Servo #3 configured: position=3 [ INFO] [1484774269.910703944]: Servo #4 configured: position=4 [INFO] [1484774549.409631]: created topic: move_servo [INFO] [1484774549.412372]: locoro_servomove_node initialized
rosrun robot_upstart install locoro_drive/launch/locoro.launchYou may manually start, stop, and get status of the LoCoRo service.
sudo systemctl status locoro.service
sudo systemctl stop locoro.service
sudo systemctl start locoro.service
Eventually, you will find it helpful to complete the ROS BEGINNER Level tutorials. These tutorials require a graphical desktop. If possible, use a Linux computer or a virtual machine and install ROS desktop on it. You have the option to run the ROS desktop and the tutorials on the Raspberry Pi.
An advantage of installing ROS desktop and the tutorials on your computer (or a virtual machine) will be learning ROS basics without changing your LoCoRo. Additionally, having ROS on your computer will enable you to link ROS on your computer to ROS on your LoCoRo at later stages for better experimentation. None of this is required to build and use your LoCoRo. They are of interest if you anticipate university studies in robotics or robotics as a career path.
If you choose to use the Raspberry Pi, use the following steps:
sudo systemctl enable lightdm.service.
© 2017 Bradan Lane Studios | all rights reserved