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

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

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