fredag den 13. november 2009

Lab Session 9


13112009

Attendees: Jesper Jakobsen, Mads Hansen Lund and Michael Nygaard Pedersen

Work time: 9.15 - 13.35

Goal

The goal is to investigate different types of navigation e.g. tacho counter and a digital compass.

The robot construction is based on “Maximum Lego NXTBuilding Robots with Java Brains” Ref1 to get a horizontal placement of the NXT. The horizontal placement of the NXT is done to satisfy a horizontal placement of the compass sensor. The specific requirements from “HiTechnic’s Compass Sensor manual” will be satisfied (see the requirements below).

The specific requirements from HiTechnic’s Compass Sensor Manual:

· The compass has to be placed at least 10 cm from the NXT.

· The compass has to be placed at least 15 cm from the motors.

· Calibration for the compass.

o Turn at least 360 degrees.

o The circular spin should not be done too fast (use at least 2 seconds for a rotation)

Sub goals

The NXT robot should be able to navigate in a Cartesian coordinate system and reproduce the same movement several times. There is several physical aspects to take in account, because the simple navigator refers to physical size, which might vary as a function of the robot weight and construction quality.

Plan

· Implement a simple navigator based on readings from the tacho counters, which is placed in a standard NXT motor

· Investigate the possibilities to implement an ultra sonic sensor to avoid collision during a navigation sequence.

· Implement and test the compass functionality by implementing the compass class and compare the performance with the simple tacho navigator.

Results

Description of experiment

Four different investigations where preformed during this lab session.

Tacho counter navigation

A differential driven NXT robot was build with respect to the building instructions given on page 293 to 296 in Ref2 with a board marker mounted to gather information on the movements of the robot.

Using the SimpleNavigator class of lejos.robotics.navigation, the robot was programmed to follow the pattern shown below;

robot.goTo(50,0);

robot.goTo(25,25);

robot.goTo(25,-12.5f);

robot.goTo(0,0);

This pattern was repeated six times to investigate the accuracy of the goTo method of the SimpleNavigator class (i.e. does the robot return to its starting position?).

The results are presented in the picture below;










Figure 1 - Tacho navigator pattern

Clearly, the robot does not return to its original position. Each repetition of the pattern is shifted approximately 10 degrees with respect to the previous run through. The distances driven are the same, but the robot seems to loose track of its position when doing turns, i.e. the robot does not rotate as much in reality as it “thinks” it does, which then gives rice to the 10 degree (±2) shifting in track orientation.

This 10 degree shifting was attempted minimized by changing the value (in software) of the wheel diameter as well as the value of the track width. Unfortunately no radical improvement was observed. The surface also changed the result.

Tacho counter combined collision detection (investigation)

The tacho counter functionality can be thought of as the most primitive layer in a behavior model, if the purpose of the system is to navigate without any caretaking to surroundings. A simple two layer suppression strategy can be added, if the robot should be able to avoid collision (Figure 2).




Figure 2 - Suppression strategy

When the navigation drive is suppressed it must begin calculating how the route changes and continue to log coordinates so it can drive to the preferred set point (if possible).

The center of the circular movement can be calculated by the equation beneath.



The speed can be calculated by the following differential equation (presented in matrix form) and a numerical integrator can then approximate the new x and y coordinates (Ref8).



This approach has not been fully implemented because of the limited time.

Digital compass calibration

The earth differs in its magnetic field depending on the placement. The compass sensor has to be calibrated to compensate for local magnetic field. A recalibration is only needed when the robot is tested on a new localization. The manual and “Maximum Lego NXTBuilding Robots with Java Brains” does not mention a specific requirement for the how much the localization has to differ for a needed recalibration.

The calibration code is more or less copied from “Maximum Lego NXTBuilding Robots with Java Brains” with small modified correction for the leJos version 0.85.

The test run of calibration was not succeeded since the software didn’t stop after its predefined rotation and instead run into an unlimited loop.

Modification from “Maximum Lego NXTBuilding Robots with Java Brains” to leJos version 0.85:

Added

import lejos.nxt.addon.*;

Chanced from import lejos.navigation.*; to import lejos.robotics.navigation.*;

Added cmps as a extra parameter
CompassPilot hector = new CompassPilot(cmps, 5.6F, 16.0F, Motor.B, Motor.C, true);

Handheld compass

The handheld compass code is more or less copied from “Maximum Lego NXTBuilding Robots with Java Brains” with small modified correction for the leJos version 0.85.

The test run of the handheld compass code showed that the compass sensor is very sensitive to Electromagnetic emission. It can be concluded that robot does not have the optimized environment to succeed with the today’s lab session.

Modification from “Maximum Lego NXTBuilding Robots with Java Brains” to leJos version 0.85:

Added

import lejos.nxt.addon.*;

Digital compass navigation

The compass navigation code is more or less copied from “Maximum Lego NXTBuilding Robots with Java Brains” with small modified correction for the leJos version 0.85.

The test run of the compass navigation didn’t succeed; this was already expected from the handheld test run.

Modification from “Maximum Lego NXTBuilding Robots with Java Brains” to leJos version 0.85:

Chanced from SimpleNavigator robot = new CompassNavigator(pilot);

To SimpleNavigator robot = new SimpleNavigator(pilot);

Pictures of Lego model











Figure 3 - Picture of robot

Observations

video video

video

Problems encountered

Mentioned in the chapters: Digital compass calibration and Digital compass navigation and observed (see videos)

Conclusion

The conclusion can be made by just observing the uploaded videos. The simple navigator worked “ok”, but was not very precise. A performance optimization was not obtained by including the compass functionality, because of either missing calibration or electromagnetic emission.

References

Ref1: Brian Bagnall, Maximum Lego NXTBuilding Robots with Java Brains, Chapter 12, Localization, p.292 - p.296

Ref 2: Brian Bagnall, Maximum Lego NXTBuilding Robots with Java Brains, Chapter 12, Localization, p.285 - p.302

Ref 3: Brian Bagnall, Maximum Lego NXTBuilding Robots with Java Brains, Chapter 12, Localization, p.300

Ref 4: Recorded video of the test run Compass Calibration.

Ref 5: Brian Bagnall, Maximum Lego NXTBuilding Robots with Java Brains, Chapter 12, Localization, p.301

Ref 6: Brian Bagnall, Maximum Lego NXTBuilding Robots with Java Brains, Chapter 12, Localization, p.302

Ref 7: Recorded video of the test run Compass Navigation.

Ref 8: Forward Kinematics for the Khepera Robot - Thomas Hellström

1 kommentar:

  1. just linked this article on my facebook account. it’s a very interesting article for all...


    calibration lab

    SvarSlet

Faste læsere