me-gy 6933 advanced mechatronicsengineering.nyu.edu/mechatronics/projects/me7836/fall... ·...

23
ME-GY 6933 Advanced Mechatronics Mohit Lala Shweta Vaviya

Upload: others

Post on 27-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

ME-GY 6933

Advanced Mechatronics

Mohit LalaShweta Vaviya

Page 2: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

TERM PROJECT“Swarm robots for environment mapping”

A swarm of two mobile robots which localizesitself in an unknown environment andgenerates an approximate map using varioussensors and algorithms.

Page 3: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

• Mapping of unknown environmentand locating land mines duringmilitary operations.

• Surveillance in dangerous andinaccessible places.

• Rescue search operations duringdisaster management.

• Sensor specific application such asusing the system to sense the levelsof toxic gases, etc.

• For assistance in mining operations.

Applications

Fall-2016 3

Page 4: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

• Our approach towards this project was structured based on the curriculum structure for Advanced  Mechatronics course

• The first prototype generated 2D maps of an environment using a wall‐follower algorithm implemented on Arduino Uno integrated with range sensors

• The second prototype was then modeled on a Parallax Propeller board where a swarm of two robots was employed to navigate an unknown environment using Wavefront and BFS algorithms

• The final prototype generates a map of the environment on a Rapsberry Pi 3 board which effectively communicates with the robots to obtain map and robot localization data from the propeller board mounted on each robot

Our Approach

Fall-2016 4

Page 5: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

• Development boards:2 x Propeller board of education1 x Raspberry Pi 3

• 2 x Ping Sensors• 4 x Optical encoders• 3 x Xbee Series 1 modules• 4 x 6V DC Motors• 2 X L293D Motor drivers• 4 x 5V batteries

Hardware

Fall-2016 5

Page 6: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

System Block diagram

Fall-2016 6

Raspberry Pi(User Station)

Robot 1 Robot 2

Page 7: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Detailed Block Diagram

Fall-2016 7

OpticalEncoders

Ping Senor

XbeePropeller

Board Xbee

RaspberryPi

(User Station)

Robot 1

Page 8: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Robots

Fall-2016 8

Page 9: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Algorithm and the code developed are generic enough to be used with different systems with similar development board functionalities

The code is modular and robust enough to be easily manipulated for hardware connections and additions

The number of robots can be increased with minimalistic variable initialization changes System generates simulation of the robot motion on the serial terminal which is helpful

in debugging the system Can broadcast localization information with respect to the map,

to any computer or other robot in its network withproper configuration

Once the map is complete the robots can be queried toautonomously reach a specific location or user defined location

System Features

Fall-2016 9

Page 10: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Receive input for the function. //Generate Map() or Go to a particular Location()

Go to a location finding the shortest path() 

Receive Input for Goal Location

Generate grid of known environment

Assign value to each cell of the grid map using Wavefront algorithm

Find shortest path using Breadth‐first search (BFS)

Manipulate robot motion as per the deduced path obtained by BFS

Using appropriate feedback sensors, track the location of the robot

On-board Algorithm for each Robot

Fall-2016 10

Page 11: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Generate Map()

Divide the given environment limits in grids

Navigate to each grid and sweep the whole environment

Send Robot location to Raspberry Pi via Xbee

If obstacle/objects are detected, update the map

send object location over to Raspberry Pi

On-board Algorithm for each Robot

Fall-2016 11

Page 12: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Traversing the Map [Logic]

Fall-2016 12

R1 R2

R1 = Robot1R2 = Robot2

The Robot divides the given area to be mapped in gridsBelow the map sweeping logic for a 4 x 8 grid

Page 13: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Generating Map

Fall-2016 13

GR

WGR

W GR

W RG

WRG

W

WR

. . .

W

WRR -> Robot

G -> Robot GoalW -> Obstacle

Start traversing About to encounter obstacle Obstacle/object detected

Continue traversingAll grids traversedReturn to Start point

Page 14: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Find Shortest Path

Fall-2016 14

GW W W

W W W

R

G 2 3 4

W W W 3 4 5

7 6 5 4 5 6

8 7 6 W W W

8 7 8

8 R

G 2 3 4

W W W 3 4 5

7 6 5 4 5 6

8 7 6 W W W

8 7 8

8 R

Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at thetree root (or some arbitrary node of a graph, sometimes referred to as a 'search key') and explores the neighbor nodes first, before moving to the next level neighbors.We utilize the BFS algorithm to fill the grid of the map like a Wavefront until the robot is found on the map and this helps the Robot to determine best path to get to the Goal location.

R -> RobotG -> Robot GoalW -> Obstacle

Page 15: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Localization of Robot

Fall-2016 15

Localization of the robot:

. . .-> Robot

-> Goal

Page 16: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Simulation OUTPUT on Serial Terminal

Fall-2016 16

Robot (R) traversing the environmentTowards Goal (G)

Wall (W) detected and Robot (R) travelling

Page 17: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Map OUTPUT on R-PI

Fall-2016 17

Grid Map generated on Raspberry Pi

Red plots are generated byRobot 1

Blue plots are generated byRobot 2

Yellow plots are generated byRobot 2 for Obstacles/Objects

Green plots are generated byRobot 1 for Obstacles/Objects

Page 18: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Introduced ‐> Raspberry Pi board to the system

Improvised ‐> an update algorithm for Mapping

Improved ‐> performance for navigation of robots

Better communication between the robots and the user station

Improvements over Previous Prototypes

Fall-2016 18

Page 19: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Hands‐on experience with Propeller Board of Education and Raspberry Pi 3 board and their on‐board functionalities

Revision of C, C++ programming concepts with use of Simple IDE

Research of available recursive algorithms and data structures for robot navigation

Studying the simpletools.h, fdserial.h , serial.h, simpletext.h, ping.h, SharpIR.h libraries

Configuring Xbee modules to work in a multipoint network

API and AT modes and use of Xbee module as a co‐ordinator, end device and router

Experience with and programming of wheel encoders, selecting motor drivers and motors and research of IMU sensors to get feedback from a mobile robot

Hands‐on experience of working with Python, MATLAB, OpenCV, VNCServer

What We Learnt

Fall-2016 19

Page 20: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Improve feedback-> Employing IMU sensor and Rotary encoders

instead of optical encoders to keep a track of odometry ofthe Robot

Better mapping techniques-> Employing algorithms and controllers to generate more accurate maps in

both 2D and 3D

Improved Control system-> Employing the use of filters and controllers in our system model to

establish error correction introduced due to environment

Future Scope and Limitations

Fall-2016 20

Page 21: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

Multi‐core functionality of the propeller boards can be used as a substitute for interrupts Local variables can be shared over multiple tabs by defining them as ‘extern’  To get readings from optical encoder while turning, make the wheel move with a PWM value 

high enough so it doesn’t slip and low enough so the optical encoder doesn’t skip a count Choose/Fix a castor in such a way that it doesn’t end up leading or influencing  the robot 

direction For multipoint communication over Xbee if you do not want to configure the Xbee modules in 

your code, using AT commands, every time you want to send data to a different address, configure the Xbee with DH = 0x00 and DL = 0xFFF which makes it send data to all modules in the same network

Motors receiving power from the development boards may cause the board to reset every time a lot of current is drawn and hence a different power supply or a supply strong enough for both the development board and motors should be used

Tips & Tricks Employed

Fall-2016 21

Page 22: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

http://www.societyofrobots.com/

http://learn.parallax.com/tutorials/

https://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf

https://www.stackoverflow.com

CLRS – Introduction to Algorithms

Class notes on Propeller Intro Lec5 To 8

Class notes on Raspberry Pi-Intro-Lec 11 to 12

References

Fall-2016 22

Page 23: ME-GY 6933 Advanced Mechatronicsengineering.nyu.edu/mechatronics/projects/ME7836/Fall... · 2017-03-10 · To get readings from optical encoder while turning, make the wheel move

THANK YOU