Develop a Python script to simulate key models of robot navigation using object oriented programming.

Online tutoring services

Need help with this question or any other academic project? Click on the button below to to hire an expert cheap.

Develop a Python script to simulate key models of robot navigation using object oriented programming. Then, work through some written problems of robot navigation based on your studies of simulation and computer vision

Get Help With a similar task to - Develop a Python script to simulate key models of robot navigation using object oriented programming.

Login to view and/or buy answers.. or post an answer
Additional Instructions:

ITEC4270 Assignment 6 Robot Motion Planning Due 7/8 Dr. Jonathan Jenkins 1 Materials • Working Raspberry Pi with your devices, with Raspbian installed and ready to use • This writeup assumes the Raspberry Pi as prepared from the Canakit ultimate starter kit with Raspbian for all commands and references. Requirements 2 Files to Submit • lastnameFirstinitialA6.py a Python script • lastnameFirstinitialA6.docx a Word document for all written responses 1 3 Summary Develop a Python script to simulate key models of robot navigation using object oriented programming. Then, work through some written problems of robot navigation based on your studies of simulation and computer vision 2 4 Simulation of Robot Navigation with No Global Map and a Distance Sensor Adding a sensor to the robot fundamentally changes the ability of the robot to obtain information about its environment, but also the nature of the challenge of navigation. Now, implement an object oriented class to simulate a robot with a distance sensor which provides a data signal indicating the current distance to the destination object it is facing, if there is such an object in the path. Your robot must be able to find a path to the destination using the sensor information only, and the position of the destination is not known to the robot before or during the navigation. 4.1 Model Assumptions • The robot moves in a two dimensional space with horizontal and vertical integer dimen- sions, as seen from above. The x dimension increase to the right, and the y dimension increases downward. The robot can move one unit in positive/negative x direction, or one unit in positive/negative y direction. • The robot can rotate to face any one of four directions/angles 0, 90, 180, 270, with 0 degrees matching positive x direction and 270 dgrees matching positive y. • The robot has a distance sensor which provides a data signal indicating the current distance to the object ahead in the direction faced by the sensor, or a fixed ’default’ value if the sensor does not detect anything. – The sensor angle matches the robot angle – The distance sensor uses the same units as the navigational space. In reality, a range sensor (such as ultrasonic or sonar) will typically return a response based on the closest object in a ’cone’ of sensing, not a fixed direction, but our model can feasibly simulate it with one direction. • The robot has data on its own location throughout the search This can be accomplished with GPS in real scenarios 3 • The robot has no data about the location of the destination or any obstacles, except what it discovers via sensor data • There is no obstacle present in the navigational space 4.2 Implement Object-Oriented Python Classes in your Python Script 1. Define an object-oriented class to represent your Sensor-Based Robot, including: (a) A class data variable for the x,y position of the robot within the navigational space (b) A class data variable for the direction the robot is facing. See the model (c) A class data variable to hold the distance data value measured by the distance sensor based on its current position This number could be at most the maximum size vertically or horizontally in your two dimensional space (d) A class function to move the robot (and sensor) position by one distance unit in one of the four directions, positive or negative x, or positive/negative y (e) A class function to rotate the robot (and sensor) to a new angle/direction The amount of rotation is passed in as a parameter (f) A class function to update the distance sensor data value based on the current robot position and orientation and the destination position • This function should be called each time the robot’s position or direction/an- gle changes (since the robot moving or rotating could affect the distance measured or whether an object is sensed). See the model assumptions about the functioning of the sensor • Simulation: This function ’knows’ the position of the destination even though your robot does not. (g) A class function to navigate to the destination location by calling the class move/rotation functions (described above), using the sensor data only • The destination object is passed in as a parameter to this function. • The code must print out a message when it senses the destination, and when it reaches the destination, including the location found 4 Suggestion: Create some conditions that indicate what type of move is needed to increase the probability of sensing the destination. Write a loop to iter- ate robot moves one after another, and in your loop use your conditions to check which move is best (or a sufficiently workable choice) to approach the destination) (h) A class function that returns from the sensor the current distance data value between the robot and destination 4.3 Applying Object-Oriented Classes for Simulation Add code to your python script to apply your classes to simulate models of navigation 4.4 Simulation: Sensor Robot 1. Create sensor-based robot and destination object. 2. Place the sensor-based robot initial location at the center of the two dimensional space (halfway horizontally and vertically) . Try integer division, as in 5 //2 which results in 2) 3. Place the destination in exactly one randomly selected direction of the four directions relative to your robot: 0, 90, 180, 270 degrees of rotation. • Set the destination location to a randomized distance away from the robot, in the direction chosen. • The destination location is fixed when the search begins. This means that only robot rotation and motion in the single direction of the destination is needed to reach the destination. The robot actions are guided by the sensor data only 4. Use the robot’s sensor-based class navigation capabilities (no knowledge of destination position) to navigate to the destination. 5 5 Written Exercise We’ll introduce an obstacle to the ’no sensor’ global navigation model, drop your robot at a randomized location within the space, and put an obstacle somewhere within that space. You may want to think about the ’bug’ algorithms Observe the Following Assumptions • The robot moves in a two dimensional space with horizontal and vertical integer dimen- sions, as seen from above. The x dimension increase to the right, and the y dimension increases downward. The robot can move one unit in positive/negative x direction, or one unit in positive/negative y direction. • The robot has data on its own location throughout the search. The robot’s position is randomized, and is represented by a single x and y value within the navigational space • The destination is positioned at a randomized location within the navigational space • The robot obtains the position of the destination at the start of the navigation process • Obstacles may be present within the navigational space 1. Explain and write a repeatable set of steps, an algorithm, the robot can apply to find the goal in the presence of one obstacle, where the obstacle is placed at a randomized location within the space. The obstacle occupies one x,y location within the space, and the robot cannot occupy the same space as the obstacle. An algorithm is a raw, abstract set of steps that solves a problem, and can be imple- mented in any programming language. Think about what reliable, fixed action your robot should take in case it encounters the obstacle, so that it can continue its path to the destination 6 6 Written Exercise • Assume the robot and destination are initially placed anywhere in the navigational x,y space, so that there is no guarantee that rotating the robot will ’sense’ the destination at its initial position • All other assumptions match the sensor-assisted robot model described at 4 1. Explain your best approach to find the destination Suggestion: Think in terms of patterns or sequences of actions that will lead to sensing the destination 7 7 Written Exercise You are aware of the role of computer vision in allowing robots to sense their environments: the robot can take images as input using camera sensors, then analyze the images with algorithms, processing them to reveal features that lead to conclusions about what is present in the imaged environment. OpenCV provided a way to demonstrate how to process images to detect features that are relevant to a robot (but OpenCV also has many advanced processing functions such as filters that require some work to understand and use properly). See the images below 8 9 10 Given that computer vision allows the robot to detect features like color regions in images, observe the following assumptions: • An autonomous, wheeled robot, with only a camera sensor to guide it, is placed in one end of a ’hallway’ with walls on either side and one path ’forward’. • The walls of the main hallway are colored differently from each other • Every intersection in the hallway is marked with a light of a unique color on the ceiling, and turning left or right leads to a short hall. There are an unknown number of intersections • The floors and ceiling are colored differently from the walls. • The robot can move ahead/backward and rotate left or right • The robot has an image sensor facing the same direction of the robot main unit 11 • The goal is uniquely colored, and is positioned at the end of one of the halls reached from turns to the right or left. The robot has stored the goal color 7.1 Steps 1. Given a starting position at the end of a hallway, explain an algorithm (set of steps) for how the robot software can analyze the stream of images from the camera sensor (no other assistance) and use movements and rotations to guide itself to a goal down at the end of an arbitrary hall. • The algorithm must work regardless of the initial position or rotation angle of the robot. You may want to look through a camera viewfinder or draw diagrams of what the robot ’see’s to help develop a solution. Remember that the image is made up of an array of pixels (like rows and columns, each pixel with its own index to define its location), each pixel having its own set of color values (e.g. red, green, blue). Consider what condition will tell the robot to move forward, and what condition will tell the robot to rotate itself. You may want to consider properties of the colors in the images, like how much of the image they make up, angles between areas of color, etc.. 8 Submission • Submit using the submission folder in D2L. Zip the files if problems uploading are encountered • You are required to download or retrieve your submission after you submit it in order to check that your files are as you intend to be scored • Resubmission is possible within submission windows • Latest scoreable submission is scored 12

Related Questions

Similar orders to Develop a Python script to simulate key models of robot navigation using object oriented programming.
33
Views
0
Answers
Python code using While Loop to calculate accrued interest *DUE 9/20/21 10:00 PM CDT*
*DUE 9/20/21 10:00 PM CDT* I will attach a word document of the full question along with a sample of what it should look like. What I mostly need help with is the calculations and correctly setting up the loop. I know how to format and how the end result should look. Write a Python program that calculates the value of an investment with interest compounding annually. The program should allow the user to enter the beginning balance and the interest rate. This interest rate should be entered as a decimal number. It should stop when the balance has tripled. It should also display when the balance has doubled....
24
Views
0
Answers
Using Python ML models and/or text mining models to address an interesting research question
See attached file. I need the code written with explanation on how to present the project. Would be great if they could write the explanation paper so that I can make my own edits. I will do the final powerpoint presentation myself provided that I get enough explanations in the paper. Any simple topic for research is fine, as long as it's decent. The topics covered in this course are: webscraping, twitter API, Machine learning (linear models, random goresst, logistic regression, and evaluation), unsupervised learning (K-means), Transfer deep learning, text mining, sentiment analysis. So just something that uses some of those skills. My preference is maybe sentiment analysis, such as analyzing the lyrics of many rap songs to answer the question of sexism. Please contact me for more discussion about this....
20
Views
0
Answers
Need help with writing Python Programming Code
Please create basic program based on below question. 1. Create a function that takes an integer as an argument and returns: - True for numbers that can be divided by 5;- integer multiplied by 2 for numbers that cannot be divided by 5....
20
Views
0
Answers
Python Question - longest run in data.
Question and data attached in file. Need step by step as to why it is done. Coding must be done on python, advice or tips are welcome if not able to complete...