Scribbler

From Laramie Robotics Club
Jump to: navigation, search
Front view of scribbler robot and fluke bluetooth board.

The Scribbler is a wheeled robot used by the LRC.

Buying a Scribbler

The LRC has scribbler robots that you can use so you don't have to purchase your own. If you are not part of the LRC the following links provide information on obtaining a robot and any other hardware to get them working.

  • Scribblers can be bought at bettersbots.com. You need both the Scribbler and fluke2 board.
  • We recommend buying rechargeable AA batteries to use with the Scribbler robots. We have found success with the Eneloop batteries and chargers.
  • To control the Scribbler robots you will need a bluetooth capable computer. If your computer does not have built in bluetooth you can purchase a bluetooth adapter.

If you are unable to obtain a Scribbler robot you can still gain experience controlling a Scribbler robot via the simulator built into Calico.

Connecting to a Scribbler Robot

The original connection guide for the Scribbler Robot can be found on the archived Calico site located here This guide also includes how to update the robot's firmware. You can also jump down to the Firmware guide on this page.

LRC Club - EN4045

For those in the LRC connecting to robots in EN 4045 of the University Wyoming please follow go here for information on how to connect. Note the information found here relates to Windows 10 machines, but may extend to other versions of Windows.

Windows

Windows 7

  • Open your bluetooth settings
  • Go to add device. It might ask you to add as incoming or outgoing. Outgoing should be what you want. If it doesn't work try incoming. Also please let us know so we can update this description.
  • Once the device has been added close your bluetooth settings and go to Devices and Printers. You should see the fluke bluetooth device. Right click and go to hardware. It should tell you which COM the device is attached to. This is your port.

Window 8

  • Open your bluetooth settings. You might have to do a search to find it.
  • Add the fluke device.
  • Search again for Devices or Hardware and find the fluke device. Right click on the fluke device and search until you find the COM number.
  • Note that the instructions for Windows 8 are incomplete. If you have success pairing the fluke boards and looking up the port please document your process so we can improve these instructions.

OSX

TODO:Make this more detailed. RV

Pre Maverick

  • Open Bluetooth Preferences
  • If it doesn't detect the Fluke click the "+" sign and it should start scanning
  • After it has found it click the settings tab (the gear next to the "+" and the "-" symbols.
  • Go to Edit Serial Ports
  • Record the port name. It should be something like "/dev/tty..."
teset

Maverick

  • Open Bluetooth Preferences it should automatically scan and detect the Fluke board
  • Click on your board and hit pair
  • It won't allow you to view the port, but it should be /dev/tty.Fluke2-SER-Fluke2 where you replace SER with the serial number of your board. For example 06A1
  • Alternatively if you know how to use terminal in OSX, if you issue the following commands you will see a list of devices for your computer.
cd /dev
ls

El Capitan

  • TODO

Robot Exercises

Examples of potential exercises for the Scribbler Robot can be found here.

Scribbler Overview

For the LRC we will be using the Scribbler 2 Robot shown on the right.
Top view of scribbler robot and sensors.

This robot has two IR sensors and a camera on the fluke board mounted up front. In the rear are three photo receptors, and two IR sensors. Underneath the robot is a line sensor. The robot is driven by two motors on either side and rotates with a castor located at the back middle. The robot can communicate with a computer via a bluetooth connection with the fluke board.

If you want experience with the Scribbler motors and sensors see the Gauntlet and Dungeon levels in Scribbler Adventure.

Movement

All of the Scribbler movement commands require you to pass parameters to those commands. The following commands require you to tell the robot how fast you want it to go and for how many seconds. The robot speed can be any number from 0 to 1. Below are a few examples of movement commands. Again you can use any values of speed and seconds you wish.

forward(1,0.5)
backward(0.5,2)
turnRight(0.25,3)
turnLeft(0.1,0.1)

There is another movement command that simple allows you to set the speed of the left and right wheels of the robots. Many times the motors() command is paired with a wait() command a stop command.

motors(0.5,-0.5)
wait(0.5)
stop()

Sensors

The robot sensors are very important and is how the robot sees the world and navigates. The following commands show you have you can call and store the sensors.

left,right=getLine()
left,right=getIR()
left,center,right=getObstacle()
left,center,right=getLight()
pic=takePicture()

Camera

The Fluke2 board that is attached to the Scribbler robot has a very simple camera and that can be used for a variety of activities. The following outlines some of the cameras commands and useful pieces of code.

  • Basic code for taking a picture
pic=takePicture()
show(pic)

-or-

show(takePicture())
  • takePicture()

-Can be passed arguments for the picture mode. Different picture modes are faster than others. Arguments: "jpeg", "jpeg-fast","gray","grayjpeg","grayjpeg-fast","grayraw","normal","blob" -Example:

grayPic=takePicture("gray")
  • manualCamera(gain,brightness,exposure)

-Can be used to change the darkness and lighting of the image. Generally gain, brightness, and exposure can be values from 0-1023. Default values seem to be 0,128,and 65. Generally raising the gain seems to make the picture brighter. Note that you might have to take a few pictures for the changes to take full affect.

  • getBlob()

-returns a list of the number of pixels as well as x and y of the centroid of the blob

  • set_blob_yuv(pic,x1,y1,x2,y2)

-Provide a picture and then a bounding box (x1,y,1,x2,y2) of the pixels you want to sample to become the blob filter

  • configureBlob (y_low, y_high, u_low, u_high, v_low, v_high)

-provide the low and high values for the color you want the blob tracker to see as a blob. note the values need to by yuv space.

  • Sample Code:

Useful code snippets and code can be found here:http://www.evolvingai.org/lrc/index.php/UsefulCode#Blob_Tracking

Misc

Firmware

If you have a new Scribbler robot or fluke2 you will have to update the firmware. To update the firmware you will have to be able to navigate Calico and use the shell. If you are unfamiliar with either check out the Help page on the shell.

First connect to the Scribbler robot. In the shell type the following commands

from firmwareupgrade import upgrade
upgrade("fluke")
upgrade("scribbler")

For more detailed information on updating the firmware check the Calico firmware page.

Once the firmware is updated you can test the robot with

turnRight(1,1)

Advanced Fluke

The green fluke board is a very powerful piece of hardware. It can be powered independent of the Scribbler Robot, and has a built in linux OS

Power Fluke

There are three ways to power the Fluke board.

  • Plug into Scribbler Robot.
  • Connect MicroUSB cable.
  • Connect 6-9 Volt power source to the side connectors. Lowest pin is Ground, Middle pin is Power.

PAN Bluetooth Interface - SSH

You can ssh into the fluke board and view or change the onboard firmware.

  • Power up Fluke board
  • If not done already, add Fluke to Bluetooth devices
  • OSX
    • Click on Bluetooth icon or go to Bluetooth settings
    • Each fluke board has a unique 4-Digit serial number. If your fluke board has not be added, it should show up in the scan. Hit "pair" to add the device.
    • In a terminal cd to your /dev folder and do an ls to view what port are present.
    • You should see a port that looks like tty.Fluke2-05FC-Fluke2, where instead of '05FC' there should be the serial number of your particular board
    • You port number is then /dev/tty.Fluke2-05FC-Fluke2. Again replace '05FC' with your particular port number.
  • Windows
    • Open Devices and Printers and see if your fluke board is already present.
    • If not go to add devices and add it.
    • Once added go back to Devices and Printers and right-click on Fluke devices. Go to properties (or hardware) to find the COM#
  • Open Calico. In the shell
from Myro import *
initialize()
  • Enter port (COM, /dev/tty, rfrrom,etc). Alternatively you can pass the port to the initialize() command.
  • In the shell enter command.
enablePanNetworking()
  • OSX
    • In Bluetooth Settings remove the Fluke board.
    • Go to Settings>Network. On the left hand side click the '+' to add a Bluetooth PAN interface. Click on "Setup Bluetooth Device." and re-add the Fluke board.
    • When you click on the bluetooth menu you should now see Fluke2-BoardNum permanently.
    • In Settings>Network configure Bluetooth PAN select the Fluke2 port added in previous step and click connect.
  • Windows
    • In Control Panel -> Devices and Printers... remove the Fluke device.
    • Add the device again. This time, the Fluke will be loaded as an access point.
  • Open and terminal and ssh into the board. IP address should be 10.10.0.1. username: root, password: password
ssh root@10.10.0.1

SSH into Fluke Windows

Connecting to Scribbler Fluke board via Bluetooth PAN:

- Allows for SSH and SFTP access directly to the fluke board

- Can install libraries... etc.

All instructions tested on Windows 8:

1. First turn on Scribbler and wait for power up.

2. On computer connect via Bluetooth.

- For Windows this can be accomplished through Control Panel -> Devices and Printers -> Add a device. The Fluke board should be detected.

3. Once connected, check which COM port the computer is using to communicate with the Fluke board. On Windows this is accomplished by viewing the Bluetooth settings and checking the COM ports tab.

4. Open Calico.

5. In the shell type: "from Myro import *" and "initialize()".

6. You will be prompted for the COM port number the Fluke board is connected to.

7. Once initialized, enter into the shell: "enablePanNetworking()".

8. In Control Panel -> Devices and Printers... remove the Fluke device.

9. Add the device again. This time, the Fluke will be loaded as an access point.

10. Select the Fluke, and from the toolbar select "Connect using" and "Access point".

11. You can now use SSH or SFTP to access the device at IP 10.10.0.1 using username "root" and password "password".