BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

C++代写 | Assignment 1: Utilising Abstraction for a Range of Sensor Classes

C++代写 | Assignment 1: Utilising Abstraction for a Range of Sensor Classes

本次代写是C++传感器测试的一个assignment

Assignment Specifics

Students are provided skeleton code in a1_skeleton folder that they need to use and develop from.

The physical sensors are collocated; the spatial separation of sensors can be disregarded. For the purpose of this
assignment assume that all sensor data is obtained instantaneously (disregard acquisition time).

A) Create a Base Sensor Class (called Ranger) and two derived Sensor Classes (Laser and Sonar) that contain:

  1. Pose Offset of Sensor (X,Y and angle relative to centre [Y axis] – anticlockwise positive)
  2. Field of View of Sensor
  3. Angular Resolution
  4. Number of Samples
  5. Sensing Type
  6. Data

The Ranger will need to inherit (use as base class) the RangerInterface header and implement its virtual functions
without changing the function declarations (signatures).

B) Each Sensor will need to

1. Initialise all the required variables to enable using the sensor
2. Enable obtaining all the hardware specific fixed parameters of the sensor
3. Enable setting configurable parameters of the sensor
4. Inform if the values to be set are sane, otherwise use previous values
5. Obtain sample sensor data at specific sensor angular resolution and within sensing range (Generated as
random numbers within sensor specifications, normal distribution: mean 5m standard deviation 6m).

C) The RangerFusion Class will need to

  1. Accept a STL container of Sensors
  2. Accept a STL container of Cells (cells are essentially squares)
  3. Determines the area to be covered by cone type sensors (as a union of sensing area). Solely for this task
    approximating the cone with a triangle is acceptable.
  4. Produce a fusion of sensor readings at the supplied cells, dealing with readings that are on the boundary of
    the sensing range (max range). Cell Fusion is discussed in subsequent pages of this document. For this task
    the cone-based sensors can NOT be approximated as a triangle.
  5. Return an STL container of raw unfused data (data must be that of raw data used for fusion)
  6. You will need to inherit (use as base class) the RangerFusionInterface header and implement its virtual
    functions without changing the function declarations (signatures)

D) Create a static library called ranger_lib, from the classes specified.

E) Create a Main that

  1. Initialises the sensors (for instance 1 Laser, 3 Sonars)
  2. Queries the fixed sensor parameters
  3. Sets sensor parameters (variable parameters, and offset)
  4. Asks the user for number of cells and generates them
  5. Reports the area to be covered by cone type sensors
  6. Continuously calls (each second) the RangerFusion class grabAndFuse method (which that invokes
    generating data and fusion) and prints to screen the status of the cells (free , occupied, unknown)
bestdaixie

评论已关闭。