Assignment 7: Computer Vision, Localization and navigation

This is a group assignment.

1a. In this project you should implement a vision system and combine the corrsponging sensor model with a motion model of the robot arm (one motor) to locate the pointer in space. Along the way you should explore implementing a convolution operator, to perform motion segmentation, and to apply Bayes filtering in form of a Kalman filter.

Attach a color blob to the robot arm and drive the lower motor (sholder) with the following program:

import nxt
B = nxt.find_one_brick()
M = nxt.Motor(B, nxt.PORT_B)
for i in range(10):
M.turn( 20,120,False)
M.turn(-20,120,False)

Write a program to locate a color blob in a video stream and indicate this target location with a circle in the video. Similarly, use as an alternative motion segmentation and compare the location estimation in form of a pixel coordinate between the two methods.

Write a program that translates a pixel coordinate to the estimation of the rotation angle of the motor with supervised learning and compare the location estimation of the two segmentation methods with the coordinates returned by the motors. Plot the difference between the vision estimates and the motor coordinates over time and submit this as part of the assignment report.

1b. For the next experiment we will add some noise to the color blob location by rotating also the upper motor with the program

import nxt
robot = nxt.find_one_brick()
shoulder= nxt.Motor(robot, nxt.PORT_B)
elbow = nxt.Motor(robot, nxt.PORT_C)
#elbow.run(30) #not working on labtop
for i in range(5):
shoulder.turn( 20,120,False); elbow.turn(30,40,False)
shoulder.turn(-20,120,False); elbow.turn(30,40,False)
elbow.idle(); shoulder.idle()
B.sock.close()

Calculate the location etsimates with the motion model alone (dead reconing), with the sensor estimation alone .(either color blob or from motion segementation), and when combining the sensor measurements and motion model (Bayes filtering). Demonstrate your findings by plotting the difference between the various localization techniques with the true position from the motor readout and by calculating the percentage decrease or increase between the various method and the dead reconing model.

2. In this exercise you should move a robot arm from a start location to and end location around an abtacle. Use your previous program that provided a accupancy grid from scanning the obstracle surface with the arm. Make a plot that shows the occupancy grid and the path of the robot arm.

Submit to prof4155@cs.dal.ca with subject line A7 by Friday November 16, 4pm