Routines to control a humanoid echolocator robot.

Semester Project by Frederike Dümbgen

Acoustic Robot

Develop

This site contains some information on how the hardware used in this framework can be coded and improved. It also contains the link to the Doxygen site and instructions for developing this webpage.

Robot

For a better functioning of the robot, changements can be made in the source code of the server. For example, A line was added to the function stop_drive_motors() so that when the robot is at rest, its motors are shut down. Without doing so, the motors sometimes entered some unstable state where they were making a loud noise after receiving the command to stop. The resulting function was then:

The instructions for how to recompilse the code can be found in the Manufacturer's documentation.

Cameras

How to create backup of SD Card (Mac)

Insert the SD card into your computer and open a Terminal. Find out the number of the inserted disk by typing

diskutil list

In the following, the SD card is assumed to have number 2. Unmount the SD card by typing diskutil unmountdisk /dev/disk2. Now you may copy the image to your desired location by typing:
sudo dd if=/dev/rdisk2 bs=2m ~/Desktop/backups/backup_robot.img
or, directly zipping the file:
sudo dd if=/dev/rdisk2 bs=2m | gzip > ~/Desktop/backups/backup_robot.gz
When the backup is needed, it can be unzipped by entering
sudo dd if=~/Desktop/backups/backup_robot.gz bs=2m | gunzip > ~/Desktop/backups/backup_robot.img .
Once the image is unzipped, the card where the backups is to be copied to can be inserted and unmounted as described above and then the image can be copied onto it using
sudo dd if=~/Desktop/backups/backup_robot.img of=/dev/rdisk2 bs=2m

Webcam setup

You can find the hardware parameters of the cameras here. The camera is implemented to send images to a local network using the mjpg streamer. The two codes that have been added onto the camera are ~/start_camera.sh for starting raspistill with the mjpg streamer and ~/switchoff.py for starting the interrupt for turning the camera on via an externally mounted button. They can be find in the folder Cameras/ in in the Documentation. Also, the IP number in /etc/network/interfaces need to be set and finally, a few lines need to be added in /etc/rc.local:
#Auto start camera
sudo /home/pi/start_camera.sh &
#Auto start shutdowni
sudo python /home/pi/switchoff.py &

Program

The program has been documented using Doxygen and a filter for formatting python code doxypy.

View Code with Doxygen

Note that there are some debug options for the code, there is more information if you type 'h' as command line argument.

Page

Run ./template.sh for automatically adding template to all *.html files in home folder. The completed files will be copied to pages/. Don't edit the files in the pages/ folder, always edit files in home folder and run ./template.sh before commiting.