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 Python LoCoRo. If you want to create a ROS LoCoRo system, use the ROS SD Card documentation
command or responseto be entered in a console or terminal window
The LoCoRo project is designed for the Raspberry Pi 3 and uses Raspbian, the official operating system from the Raspberry Pi organization.
Warning: It is not advisable to log into a Linux system as the root user. To do so is considered a security risk.
The current version of Raspbian is 2017-03-02. There are two versions available - one with a graphical interface and one without. The PIXEL image contains a full desktop graphical environment. The PIXEL image is the recommended choice for users new to working with the Raspberry Pi and who have access to an HDMI monitor, keyboard, and mouse. Using PIXEL simplifies setting up the wireless networking and completing the LoCoRo software installation.
The Lite image contains no desktop environment. It is intended for users connecting with an SSH terminal program.
The LoCoRo SD Card instructions assume a new user with access to an HDMI monitor and USB keyboard and mouse.
If you prefer to use the the Lite image and access with SSH, there are instructions on the Raspberry Pi website.
For new users, it's recommended to read through the official documentation from Raspberry Pi Organization.
piand the default password is
~and then deleting it with the
Backspacekey. If necessary you can change the keyboard layout in the next step.
sudo raspi-configto access some basic settings. You must enable the I2C interface (one of the Interface Options). Other settings you may want to change include the user password, the hostname of the Raspberry Pi, enable SSH, or enable a Raspberry Pi camera. This is also when you can change the assigned keyboard layout. After making any changes, accept the option to reboot the Raspberry Pi. Note: Any of these settings may be changed latter using the same command.
Once the Raspbian with PIXEL 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.
sudo pip3 install tornado
gitcommands, you may store them using the following command:
git config credential.helper store
git clone https://gitlab.com/bradanlane/py-i2cpwmboard.gitsubstitude the URL of your forked project if created above
sudo python3 setup.py install
git clone https://gitlab.com/bradanlane/py-locoro.gitsubstitude the URL of your forked project if created above
sudo systemctl start locoro.serviceto manually start the service
sudo systemctl status locoro.serviceto check the status of the service
sudo systemctl stop locoro.serviceto manually stop the service
./uninstall.shto remove the system service
locoro.pyprogram is a placeholder.
~/py-locoro/autostartfolder an rename it to
examples/webserver.pyprogram over the
sudo systemctl start locoro.serviceto manually start the service which will run
~/py-locoro/examplesfolder. Start with the calibration example:
config_servo()code in the examples to match your specific hardware.
The SD card is now setup for your LoCoRo. By creating a backup, you have a image file 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. It's also an easy way to setup several LoCoRos!
If you have finished the electronics assembly, the hardware assembly, and the software installation, you have a working LoCoRo and can drive it right now!
You will want to calibrate your the servos on the LoCoRo but the defaults are likely good enough to try driving it around.
Python 3 (IDLE). This starts the Python development and learning environment.
Filemenu, open the
py-locorofolder and the
examplesfolder to then open the
Run Module(or press
F5>. This will start the LoCoRo web server program.
INFO:root:Serving HTTP on 0.0.0.0 port 8888
You are now ready to start programming the LoCoRo!
© 2017 Bradan Lane Studios | all rights reserved