Design the data and functions

Assignment Help MATLAB Programming
Reference no: EM133310475

Problem 1: A Generalised Program for Simulating the Operation of Vehicles

785_Differential drive model.jpg

Figure 1: (a) Differential drive model, (b) bicycle model

In this problem, you are going to write a code that will simulate two types of vehicles: i) a mobile robot, and ii) an autonomous bicycle. The mobile robot has two DC motors. The bicycle has one DC motor at the back and a stepper motor in the front for steering. The movement of the mobile robot and the bicycle are based on differential drive model and bicycle model, respectively. Figure 1 presents the model and equations for each type of the vehicle.

Your solution should have a C++ code and a MATLAB code. Your C++ code should include:

1) A motor class that has public/private data and functions for implementing the motion of DC and stepper motors. You will design the data and functions (including constructor(s) and destructor(s)) of this class and decide whether they should be public or private.

2) A robot class and a car class that has public/private data and functions for implementing corresponding models using the motor class. They should also inherit certain data and functions from a vehicle class. You will design the data and functions (including constructor(s) and destructor(s)) of each class and decide whether they should be public or private.

3) An iofile class that can read and write comma separated values (CSV) files. Again, you will design the data and functions (including constructor(s) and destructor(s)) of this class and decide whether they should be public or private.

4) Asking user to specify the configuration filename that contains the following information (as a CSV file): the type of the vehicle, DC motor rpm, stepper motor step angle (if applicable), wheel radius, trackwidth (if applicable), wheel base (if applicable). You will design the format and order of the information in the file. Your code should read the configuration file using the iofile class you have created.
5) Using the parameters provided in the configuration file, moving the vehicle from (5,
5) position to (5, 25). All coordinates are in meters. The starting orientation of the vehicle is 0 degrees. The vehicle should first rotate itself towards the target and then move straight towards the target.

6) Using the iofile class, writing the pose (position and orientation) of the vehicle at each iteration into a CSV file. Each line should contain: position-x, position-y, orientation.

Your MATLAB code should include:

7) Reading the pose CSV file and plotting the position (as x-y plot) and orientation (as angle) separately.

Problem 2: A Geometric Transformation Tool for Laser Scanner Distance Sensors

1735_mobile robot with a distance sensor.jpg

Figure 2: A mobile robot with a distance sensor

Distance sensors provide information about the environment. Laser scanners can sweep the environment and provide a distance measurement at a certain angle value.

Your solution should have a Python code and a MATLAB code. Your Python code should include:

1) A laserscan module (as .py file) that reads and writes laser scan data in polar (distance measurements and measurement angles) or cartesian (x, y) coordinates. It can use csv module to read and write CSV files. It should be able to transform the laser data from polar to cartesian coordinates and vice a versa. In addition, it should also do filtering on laser scan by setting lower/upper limits on measurement angles.

2) Reading "laserscan.csv" file which contains a laser data in cartesian coordinates. In order to remove the unreliable laser data because of the long standoffs (Figure 2), it should filter out the measurements in (-π/2, -π/4) and (π/4, π/2).

Your MATLAB code should include:

1) Reading the filtered laser scan data from the CSV file and plotting the laser scan.

Reference no: EM133310475

Questions Cloud

City of anytown has zoning ordinance : Suppose that the city of Anytown has a zoning ordinance that strictly requires homes to be set back at least 25 feet from all public roadways.
How would you collect more information about ian trauma : Identify and describe the events that constitute Ian's clear case of complex trauma.How would you collect more information about Ian's trauma?
Lights are disturbing company theater : What sort of legal claim might Dave's Drive-In try to bring against the owners of the residential properties whose lights are disturbing the company's theater?
What is value of professional nurses conducting surveys : what is the value of professional nurses conducting these health surveys and interviews within the long-term care system to improve resident care outcomes?
Design the data and functions : Design the data and functions (including constructor(s) and destructor(s)) of this class and decide whether they should be public or private
Al Qaeda terrorist cell : An Al Qaeda terrorist cell, spurred by the new messages from Osama bin Laden from beyond the grave, bombs the House chamber
Why do they often worsen during breastfeeding : Explain how the nurse can evaluate Tess's vaginal bleeding after childbirth and state what the nurse will teach Tess Tess and Luis were introduced to the reader
Explain the type of work performed laborer in each union : Explain the concept of "Right to Work". Identify three states that have "right to work" laws. Does New York have "right to work" laws?
Task of designing series of flyers : You are given the task of designing a series of flyers that explain effective coping mechanisms for mental illness and support services

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Demand constraint project

Represents the penalization for the demand in e-vehicle that cannot be met. This term must be considered per time step lets assume that demand at time step

  Describe the controller design problem

Design a proportional controller Gc(s), to meet the specifications. Can you meet all three specifications? If not, then explain - propose a controller Gc(s) to control the vertical height, Y(s), of rowdy. The figure 2 shows the block diagram of the..

  Create a function for calculating british pound

What is the name of the dependant variable and what is the name of the independent variable - Create a function for calculating british pound to danish kroner.

  Matlab – discrete time simulation

MATLAB – Discrete time simulation, solve  Discrete time syetm problem,  DT kalman filter problem,  Steady state DT kalman filter problem

  Write a matlab program to accept a non-empty set of numbers

Organizing numbers is of great importance in todays world and calculating the mean of a set of data/numbers is often necessary.

  Write a function that takes a square matrix

Write a function that takes a square matrix, say A, that is odd as an input. This function must add up the edge elements of the matrix

  Step response of the position servo system

Use MATLAB to plot the step response of the position servo system for values of the gain K=0.5, 1.0, 2.0 below is possible data code

  Write matlab program that prompts user for load impedance

Write a Matlab program that prompts the user for the following: Generator parameters, line characteristic impedance, line length, and load impedance

  A good way to structure this program

A good way to structure this program is to read in each "number" as a string of characters, look at the first character to determine what kind of number it is (hex, binary, decimal), and then call an appropriate function to convert the string into..

  Print out the number of elements

Solve the problem using MATLAB Make a variable ts that has 30 elements and goes from 0 to 2 pi

  Write a matlab script m-file to play a guessing game the

write a matlab script m-file to play a guessing game. the user will try to guess a number between 1 and 100. your

  Write a matlab function

Write a Matlab function [P,L,U] = ColumnCroutLU(A) to perform the column- wise Crout method given by equations (3) and (4), overwriting the matrix

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd