44
By:  Jasmeet Singh (M.Sc. -19701)

Communication Between Robots

Embed Size (px)

Citation preview

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 1/44

By: Jasmeet Singh(M.Sc. -19701)

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 2/44

I would like to express my gratitude towards thefollowing people for their support and

cooperation :-

•Dr. Punam Bedi, Project supervisor•Dr. Vasudha Bhatnagar, Head of ComputerScience Department•Staff members and•My parents

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 3/44

•Introduction•Fire Bird IV•Lego NXT•Microsoft Robotics Studio•Using Lego NXT with Microsoft Robotics Studio•Bioloid•Robotic Mapping•Future Work•References

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 4/44

In this project three types of robots have beenused; and the task is to study them and understandtheir working so that they can be further used for

communicating.

This is a record of all that has been studied andimplemented so far using these robots.

The Lego NXT has been run using Microsoft RoboticsStudio‟s Visual Programming Language, while an

effort has been made to fully understand otherrobots and to find ways for them to communicateeither with each other and/or with the computer

system.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 5/44

The Fire Bird IV robot is a mobile robot that is used toexplore the environment around it using various types of sensors and moves about in this environment using 2 DC

motors.

Fire Bird was made commercially available by Nex Roboticsonly after its second version. The first two versions of the

Fire Bird were made exclusively for the Department of Computer Science and Engineering, IIT Bombay and were not

commercially available. The hardware and software of theFire Bird is „Open Source‟ and hence the user can design hisown code in any language and load it onto the robot without

any compatibility problems.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 6/44

Sensors

The Fire Bird IV robot comes equipped with the following types of sensors-

•White line sensors- When the sensor is not on a white line, amount of light reflected is less so the output is in the range of 1 volt to 5 volt. Whenthe sensor is on a white line, the output is in the range of 0.15 to 0.8volts.•

Infrared range sensors- The sensors use triangulation to measure thedistance from the obstacle. Linear CCD array calculates the angle of thereflected light depending on the distance from the obstacle.•Bump sensors- These sensors are used by the robot to detect obstacles.When the bump sensor bumps into an obstacle, its switch gets closed andit gives logic low as output which is sensed by the microcontroller.•Position encoders- These encoders are used along with the DC motors

and are fitted on the shaft of the two motors. They are used to control thedegree rotation of the motors by the microcontroller.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 7/44

•Light intensity sensor- This sensor is used to detect the direction of light falling on the sensor and can thus find a light source whenneeded.•Servo mounted sensor pod- Two servo motors are used to changethe pan and tilt angles of the mounted camera.•Wireless color camera- It is used to acquire images from its

surroundings and these images are sent back to the computer forprocessing.•Ultrasound scanner-This is used to detect distance of objects fromthe robot using ultrasound.•Gyroscope- These are used to determine the acceleration of therobot in a particular direction.

Apart from these, the Fire Bird, due to its open source philosophy,can be fitted with any number of custom sensors that the userdesigns.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 8/44

Communication The Fire Bird is able to communicate with other robots or thecomputer in the following ways-

Wired RS232 communication- This is used to connect the Fire Bird

with the computer using a wire that converts RS232 to USB and thecommunication is serial.

XBee wireless communication- The XBee modules are used to sendwireless packets from computer to Fire Bird and vice versa andoperate at the fixed frequency of 2.4 GHz.

Simplex infrared communication- Infrared communication takesplace between robot and the remote used to control its movements.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 9/44

Block Diagram of Fire Bird IV Hardware

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 10/44

Various commands are used to program the micro controller of the FireBird. These commands are broadly divided into following types-

•Loading the upper/lower nibble of the left/right motor speed into therobot.

Turning of the robot in a particular direction and the way that turn is tobe made.

•Finding out value of distance of robot from obstacle.

•Finding the Status of Bump Switches attached to the Fire Bird.

•Loading the upper/lower nibble of the Pan/Tilt servo motors of thecamera sensor pod into the robot.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 11/44

Advantages of Fire Bird IV-•The Fire Bird can be used to freely roam the wanted area.•It can take photos of its surrounding environment.•It used a Wireless XBee protocol to communicate and hence thereis low chances of interference of data as the frequency forcommunication is fixed.

Limitations of Fire Bird IV-•It cannot process instructions when they are sent continuously.•It requires a delay between two consecutive instructions becausethe microcontroller takes time to process the instructions.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 12/44

Lego NXT is an intelligent robot that is manufacturedby Lego Mindstorms and is used by robotics

enthusiasts for hobby, professionals and students forresearch and by children to initiate them into the

world of robotics.

At the heart of this robot is the programmable NXTBrick that is the central computer of this robot and

controls the sensors and the motors.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 13/44

Sensors 

The NXT kit has the following sensors-

•Touch Sensors- Enables the robot to feel and react to itsenvironment. A value of 1 is returned when the sensor is pressed.•Color Sensors- This enables the robot to detect colors and light and

can also be used as a color lamp. The output range is between 0-100% where 0% is complete darkness and 100% is the highest lightintensity the sensor can measure.•Interactive Servo Motors- These ensure that the robot moves withprecision.•Ultrasonic Sensors- This sensor enables the robot to measure

distance to an object and react to movement.•Sound Sensors- This sensor detects the intensity of sound in itsimmediate neighborhood. The volume is measured in percentages,thus 100% roughly equals shouting and 5% equals a silent room.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 14/44

Input Ports The NXT brick has 4 input ports, each used to connect a particulartype of sensor. The sensors of NXT must be attached on the correctinput port as shown-Port 1- Touch SensorPort 2- Sound Sensor

Port 3- Color SensorPort 4- Ultrasonic Sensor

Output PortsThe NXT has 3 output ports for connecting the motors. The motors

must be attached on the right output port.Port A- Motor used for extra functionPort B- Motor used for movementPort C- Motor used for movement

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 15/44

Motor Ports  USB Port 

Bluetooth Icon 

USB Icon 

Sensor Ports 

Battery Level 

Running Icon Loudspeaker 

NXT Buttons 

Exit 

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 16/44

The main component of MSRS that is used is the VisualProgramming Language that allows the developer to drag and dropblock of activities that the programmer wants the robot to perform

and also when to execute that activity, depending on the input

received.

The connections between activities pass the data as messages.The connection pin on the left hand side of the activity is the input

pin and the ones on the right side of the activity are the output

pins. The output connection pins can be of two kinds: result output(also called a response output) or notification output.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 17/44

Setting the Initial configuration of the parts of the robot being usedin the VPL Diagram is very important. 4 types of configurationoptions are-

Set initial configuration- This lets us fix the serial port used forcommunication, polling frequency of the sensors, the distancebetween the 2 motors and their wheel diameters.Use a manifest- This option enables you to select an existingmanifest file to start the service. A manifest is a special file thatdescribes a set of services to be started and their configurations.Use another service- This lets us use the configuration informationof an already existing service to initialize our own.None- This is the default configuration and is used for simpleservices like TTS.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 18/44

The basic activities available are-

•Calculate- This activity allows us to calculate the values of incoming dataand lets us perform mathematical operations on them if required •Data- This activity lets us initialize data/constants that is to be fed asinput into another activity. For example-power of motors is between -1.0

to 1.0.•If- This lets us decide among several conditions of which only one is true.• Join- This activity lets us combine data from several sources into 1 singlemessage and then pass this message to the input of another activity.•Merge- This activity just merges the data from several incoming activitiesand passes them to another activity. It is generally used with If activity.•Switch-This activity allows us to have different types of conditions. Thefirst condition that holds true in the switch is used and the code followingit is run.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 19/44

Configuring Brick-1. Drag and Drop the NXT Brick activity.2. Configure the NXT Brick by using the “Set Initial Configuration” option and

setting the serial port number given to the Bluetooth, the Baud Rate andselecting “Show In Browser” which allows for run time debugging of the VPLprogram.

3. Now Select the Sensor/Drive activity to be used.4. Set the Initial Configuration of this sensor by first defining the partner asthe “NXT Brick” that is used in the diagram. 

5. Then set the name, Sensor/Motor ports where they are attached onto thebrick, and the polling frequency which is set to 0 by default. Pollingfrequency is the frequency with which the sensor is queried by the brick andis specified in milli-seconds.

6. Use the If, Data, Calculate, Join, Merge, Switch and other basic activities tocreate a data flow diagram that uses a certain input and uses theactuators(motors) to perform an operation.

7. The connections to be made are defined according to what the activity isbeing used for.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 20/44

Advantages of Lego NXT-•The Lego NXT uses Bluetooth for communication and hencerequires pairing to take place between both the devices before thecommunication can begin.•The NXT can be easily programmed using VPL without much need

for coding.

Limitations of Lego NXT-•The NXT must be paired with the computer via Bluetooth in orderto run VPL programs as VPL does not support USB connectivity withthe NXT.•The NXT runs as long as the VPL programs on the computer isrunning, i.e., it does not allow the NXT to be a standalone robot,able to work on its own.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 21/44

Robotis Bioloid Premium Robot Kit is an all-in-onepackage for advanced robot builders. The BIOLOID is do-

it-yourself educational robot kit using modularDC servo blocks that allows the user to make nearly 26

types of robots and even allows for customization of these robots.

Manufactured and Marketed by Robotis, South Korea thiskit can be used to make a humanoid that can mimic the

movements of the human beings. The joints in thehumanoid are made using servo motors that are

intelligent in themselves.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 22/44

The central unit of the Bioloid is the CM-510 controller. This controllerallows the uses to easily connect the AX-12A servo motors, the sensorsand any communication devices that are needed by the robot.

Dynamixel AX-12A motors have features such as-Precision Control- Position and speed can be controlled with aresolution of 1024 steps.Feedback-Feedback for angular position, angular velocity, and loadtorque are available.Alarm System-The Dynamixel series robot actuator can alert the userwhen parameters deviate from user defined ranges.

Communication-Wiring is easy with daisy chain connection, and itsupport communication speeds up to 1MBPS, enabling the mainprocessor to control many Dynamixel units with very few resources.Unique ID- No Dynamixel units share the same ID in a network node.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 23/44

Sensors The Bioloid kit comes equipped with several different types of sensorsand all these sensors can be mounted easily on the Bioloid and can alsobe connected to the main controller box through wires.

Gyro Sensor- This is used to detect the acceleration of the robot in X orY direction and the value of this acceleration is used to balance therobot during falling or for dynamic balancing during walking.IR sensor- This sensor is used particularly to detect distance of anobject from the robot. The values of the IR sensor can also be used todetermine the color of an object held at a particular distance.

Distance Measurement Sensor- The Bioloid uses a sharp ultrasonicsensor to calculate the exact distance from an obstacle in centimeters.The distance is calculated by using the angle that the sent and receivedsignal makes on the object.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 24/44

CommunicationThe Bioloid is able to communicate in three different ways-

1. Using XBee- This is used when the robot communicates withthe RC110 remote controller or with the computer.

2. Using RS232- The Bioloid can communicate with the computerusing the RS232 serial connection.

3. Using Infrared- The Bioloid can communicate with the RC110using the IR sensor.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 25/44

Advantages of Bioloid-•It can be used as a standalone robot which is able to receivesignals, process inputs and perform operations all without havinga computer monitoring it at all times.•The various designs that are possible to build are an advantage,

as each of them is able to move in a different way and allowsexploring of spaces that some other model cannot.

Limitations of Bioloid-•Only a limited number of customized sensors can be added to itafter all the available sensors have been fixed.•The maximum number of motors that can be used with it are128, which leads to complex programming.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 26/44

So far we have learned about:

• The basic functionalities of Mindstorms Lego NXT Robot.

•The basic functionalities of Fire Bird IV.

• The basic functionalities of Bioloid.

• The way Lego NXT and its sensors can be controlled using

Microsoft Robotics Studio.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 27/44

Mapping is the problem of integrating the information gathered bya set of sensors and using that information to represent theenvironment by creating geometrically consistent maps of theenvironment. The main aspects in mapping are the representationof the environment and the interpretation of sensor data.

Maps are used to determine a location of the robot within anenvironment and to depict an environment for navigation. Mapsgenerally represent the environment at the time that the map isdrawn and is not necessarily consistent with the state of theenvironment at the time when the map is used.

Localization is the problem of estimating the place of the robotrelative to a map.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 28/44

To draw the map of a room by exploring thewhole room and taking the values from the

touch sensors, motors, and any othercombination of sensors using a Lego

Mindstorms NXT and to display the map of theroom to the user.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 29/44

Requirements:

1. Calculate the Distance- Here we simply count the number of rotationsthe wheel of the robot takes and calculate the distance travelled by therobot by using the value of the diameter of the wheel.

2. To Detect Sensor Values- The RWTHMindstormsNXT Toolbox for

MATLAB is used to establish a connection with a NXT Brick and thenaccess all the sensor ports and motor ports of that brick.

3. A Way to Scan the Room- In our implementation we have scanned theroom 4 times.

a) From Left to Right, starting at Top-Left Corner of the room.

b) From Right to Left, starting at Top-Right Corner of the room.c) From Top to Bottom, starting at Top-Left Corner of the room.d) From Bottom to Top, starting at Bottom-Left Corner of the

room.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 30/44

1.2.

3. 4.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 31/44

A two way scan of room is also possible:

1. Left to Right scan, starting at Top-Left corner.2. Top to Bottom scan, starting at Top-Left corner.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 32/44

Problem with 2 way scan:

It creates false objects as it cannot always access all the parts of the map and it takes the inaccessible portions as an object.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 33/44

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 34/44

•The red color represents the walls and the objects.

•The green color represents the horizontal scan of the room.

•The yellow color represents the vertical scan of the room.

•The blue color represents the portion where horizontal andvertical scans overlap.

•The gray color represents the false objects.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 35/44

The false objects have been scanned by a 4-way scan. Hence this

scan is preferred.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 36/44

4. To Display Map- We require a way to display the map obtained by thescanning of the room. For this purpose, MATLAB is used as it allows foreasy manipulation of matrices and images.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 37/44

Assumptions Taken:

• The walls of the boundary of room are fixed.

• The dimensions of the room are known.

• Objects placed inside the room are fixed and cannot be moved whenthe robot touches them.

• Friction between the floor of room and the wheels of robot is justenough so that, during a turn, the stationary wheel of the robot does not

slip.

• The robot has enough clearance to make a turn when it finds an objector reaches the boundary wall.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 38/44

1. 2.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 39/44

3. 4.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 40/44

Final Result

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 41/44

1. The final architecture of the whole network can be as proposed

below-•The Lego NXT communicates with the computer using Bluetooth.•The Bioloid is able to communicate with the computer using Xbee orRS232 serial communication.•The Firebird communicates with the computer using its XBee module.•The Fire Bird is also able to send and receive information to and fromthe Bioloid.

Bluetooth RS232/XBee 

XBee XBee 

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 42/44

2. The Bioloid can be programmed to recognize the different typesof objects and select the objects out of a collection based on theirsizes and colors.

3. Using the map of the room, the movement of robots can belimited to the white area of the map. This is called localization.

4. We can improve accuracy of the representation of map bychanging the grid size used, and/or by using more sensors likeultrasonic sensor, or by simply using a swarm of NXT robots,equipped with touch sensors, that are all controlled together

using MATLAB.

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 43/44

•Online Library of Microsoft Robotics Studio

http://msdn.microsoft.com/en-us/library/bb483024.aspx•Detailed account of Fire Bird IVhttp://www.cse.iitb.ac.in/~erts/robotics.html•How to connect NXT with Microsoft Robotics Studiohttp://huestones.co.uk/node/166•Overview of Microsoft Robotics Studio

http://en.wikipedia.org/wiki/Robotics_Developer_Studio•How to make NXT communicate with computer over Bluetoothhttp://channel9.msdn.com/coding4fun/articles/Microsoft-Robotics-Studio-and-Lego-Mindstorms-NXT•Bioloid Information e-Manual http://www.robotis.com/xe/bioloid_en•ATmega 128 , 8-bit Microcontroller Datasheet

www.atmel.com/atmel/acrobat/doc2467.pdf •Fire Bird IV Hardware Description Manualhttp://www.cse.iitb.ac.in/~cs684/Firebird_resources/FireBird-4/FIRE%20BIRD%20IV%20Hardware%20Manual%20Ver%201.3.pdf 

8/3/2019 Communication Between Robots

http://slidepdf.com/reader/full/communication-between-robots 44/44