Camera based line follower

From Rsewiki

Video of Line Following RegBot

In this first GIF a video is captured of the RegBot during it's run on line. The RegBot is set to take right turns.



This second GIF shows the run as seen on the RegBot. A rectangle bounding box is drawn around the boundaries of the tape-line contours. The red dot is the middle of the box/line and the blue dot functions as a navigation offset as the camera is mounted left to the center on RegBot and the RegBot should be driving on the center of the line.



How to use the application

When turning on the RegBot the Raspberry Pi and the Line Follower application will automatically start.

To wirelessly control and communicate with the RegBot and the Line Follower application open up a SSH session by using Putty on Windows and Terminal on Linux and Mac.

To access the RegBot type in:

ssh pi@hostname.local

where hostname should have been changed to regbotxx corresponding to the robots number.

The default password to a Raspberry Pi is raspberry, but this should have been changed to e.g. filippa corresponding to the robots name.

When the SSH session is open attach to the running Line Follower instance:

tmux attach

This will present a window like this:

In the bottom window 1 should be presented as 1:linefollow.

To attach to window 1 press Ctrl+B then 1.

As usual typing help will list the available commands for the RegBot.

Typing pihelp will give a list of commands to the Line Follower application:

         ### COMMANDS ### 

pihelp:               this text
left:                 regbot will make left turns [default]
right:                regbot will make right turns
linemode=0:           regbot will run till end of line [default]
linemode=xxxx:        regbot will run till xxxx frames have been captured
black:                regbot will run on black lines [default]
white:                regbot will run on white lines
err=xx:               sets a threshold on how many errors the robot
                      can make before stopping - if it fails during turns,
                      this variable probably needs to go up! [default = 4]

        ### ######## ###

To run the Line Follower mission on the RegBot change the mission to M=8.

To detach (exit) the session do not type exit as this will shut down the running instance. Instead press Ctrl+B then D to detach and then close down the SSH session by either closing the window or typing exit.

Details on how to set up Line Following RegBot

Go to Vision based Line Follower for detailed information on the project and instructions on how to setup a new Line Following RegBot.