Docsity

Mobile Robot Navigation: Achieving 'Where Am I?' using Sensors and NXT Programming, Slides of Robotics

Partial preview of the text

Download Mobile Robot Navigation: Achieving 'Where Am I?' using Sensors and NXT Programming and more Slides Robotics in PDF only on Docsity!

The Sensor Project

  • Motor “Direction” together with sonar

Left motor

Our first task – mapping and

navigation

  • The general problem of mobile robot navigation has to

answer three questions:

  • “Where am I?.”
  • “Where am I going?,”
  • “How should I get there?.”
  • Our project will focus on how to achieve these three

main questions using a mobile robot system and at the

same time map its surroundings.

  • In order to answer the first and most fundamental

question: “Where am I?,” the system requires some

sort of build-in sensing equipments to position itself.

Positioning System

  • Most common positioning system in robotic divides into two categories: relative and absolute position measurements and the brief description shown below:
  • The Relative Position Measurements
  • Uses internal sensor to measure its distant traveled relative to the previous position.
  • The advantage is that it’s totally self-contained and does not need any external system support to locate its position.
  • On the other hand, its position error grows without bound unless and independent reference is used periodically to reduce the error.
  • Two types of sensory system shown below are typically used for relative position measurement.

Absolute Position Measurements

  1. The Absolute Position Measurements is using a “known” external environment to locate its absolute position in the map given like the global positioning system (GPS).
  2. The advantage is that it can navigate through the environment accurately.
  3. The disadvantage is that:
    • the location of source signal must be known
    • or a detailed map of the environment must be given.
  4. There are few different types of system is using the absolute position measurement which are shown below
  1. Active Beacons –
    1. The robot computes its position from measuring the direction of incidence of three or more actively transmitted beacons.
    2. The transmitting signal could be light or radio frequencies.
  2. Artificial / Natural Landmark Recognition –
    1. The robot identifies the landmark (artificial or natural) with a recognizable feature
    2. This feature is preset in the system to position itself in the known map.
  3. Model Matching –
    1. it is a complex matching system which identifies its surroundings with its internal map and world model of the environment to estimate its position.
    2. This is a more high level system
    3. It can:
      1. improve global maps based on the new sensory observations in a dynamic environment
      2. Integrate local maps into the global map to cover previously unexplored areas.

Absolute Position Measurements

1. The NXT programmable microcomputer, so called the Brick.

2. It has an Atmel 32-bit ARM7 processor with 256KB Flash

memory, 64KB RAM, and a speed of 48 MHz.

3. The Brick also come four sensor inputs, three motor

outputs connection, USB connection, LCD display with four

bottoms controller, a loudspeaker, and Bluetooth capability.

Limited system capability

  • The Servo Motor – it uses a built-
in incremental optical encoder to
precisely control the motor’s
output.
  • The NXT allows to specify the
rotating degree with an accurate
of one degree, the rotating
revolution, or run time at
different output powers.
  • The user can also synchronize
between two motors and control
using other internal readings.

Our use of motors

Programming in NXC

  1. The most common C like compiler for NXT are RobotC and NXC (Not eXactly C).
  2. Since the RobotC requires license to use, the project robot was coded in NXC, which is an open source compiler
  3. The NXT has a bytecode interpreter, which can be used to execute programs.
  4. The NXC compiler translates a source program into NXT bytecodes, which can then be executed on the target itself.
  5. Although the preprocessor and control structures of NXC are very similar to C, NXC is not a general-purpose programming language, and there are many restrictions that stem from limitations of the NXT bytecode interpreter.
  6. The lexical rules of the compiler and the NXT input/output reading commands can be found at the “NXC Guide”.

NXC compiler interface

Software

Calibration function “Distant_Check”

Calibration function “Distant_Check”


The program checks the speed of the robot at given surface and battery life.


The program starts with defining the ultrasonic sensor, input port 4, and driving motor as output port A & C. Integers dist1, dist2, dist_avg, i defined.


#define US SENSOR_TYPE_LOWSPEED_9V //define US as the Ultra Sonic sensor #define Motor OUT_AC //driving motor #define US_IN IN_4 //US sensor input

task main() { int dist1; int dist2; int dist_avg; int i;


This last section of task maim outputs dist_avg on the NXT

LCD screen until the user cancels the operation


while (true)

{

Off(Motor);

NumOut(0, LCD_LINE2, dist_avg);

}

}


End of task main is here

“Rotation_Check”

Calibration function “Rotation_Check”



This program checks the rotation angle on the

given surface and between left and right

motor. It is used only for calibration