diff_months: 20

Mars Rover Mission Planning Assignment

Download Solution Now
Added on: 2022-11-09 12:12:04
Order Code: 474555
Question Task Id: 0
  • Country :


Overview: Mars Rover Mission Planning

In this assignment, you will develop part of the software that runs on-board a hypothetical Mars planetary rover. The rover will perform daily exploration and science activities on the surface of Mars. In order to navigate and plan paths across the hazardous terrain, the rover receives daily satellite imagery maps that are provided by a Mars-observing orbiter of the terrain over which the rover will operate. Your software modules will be responsible for receiving and decoding the map data (sent in a special binary format) and using this data to evaluate potential/proposed paths for the rover to take that are provided by the science team on Earth.

Overview of the rover's daily operating area

Each day, the rover operates in a 128m by 128m area of terrain. For planning purposes, data on the type of terrain and topography (changes in terrain height) are represented by a 128x128 grid (1m horizontal resolution) where each grid cell represents a 1x1m area. Grid coordinates (x, y) are used to specify a particular cell, where positive x is to the East, positive y is to the North, and the origin of the coordinate system (0, 0) is located at the bottom-left cell when looking at a map of the terrain.

At each map grid cell, there are two main variables of interest for path planning purposes:

  • Topographic height (m): height of the terrain at this cell. This is important for path planning as the rover will not be able to traverse across regions of high slopes (differences in height).
  • Terrain Type (0-3): The terrain at each site is broken up into four different categories, depending on di????culty in traversal by the rover, where type 0 terrain is the easiest to navigate, types 1 and 2 are increasingly difficult, and type 3 terrain is not traversable by the rover.

Grid cell coordinates are also used to specify the initial starting location of the rover at the beginning of each day and the location of "science goals": special locations that are of interest to the science team for the rover to investigate.

Satellite Map Communications

At the start of each day, an orbiting satellite communicates data on the map down to the rover using a customized binary format (in order to save bandwidth). The message begins with details of the rover's initial x and y location on the map (each 1-byte as an unsigned char representing the grid cell location of the rover). Data is then sent for the 128x128 grid map, with 1 byte per grid cell (16384 bytes total). The map is communicated row-by-row, such that the ????rst map byte is for grid cell (x=0, y=0), followed by (x=1, y=0), then (x=2, y=0) etc. until (x=127, y=0), then (x=0, y=1), etc.

Data for each grid cell is encoded in 8 bits as shown above. From Most Significant Bit (MSB) on the left:

  • The first 3 bits (0-2) contain the topographic height as an integer in meters
  • The next 2 bits (3-4) encode the terrain type (0-3) as an integer
  • The next bit (bit 5) is used to indicate if the grid cell is a science goal cell (1) or not (0).
  • The next bit (bit 6) is used to indicate if the rover is currently located in this cell (1) or not (0).
  • The LSB (bit 7) is used as a checksum/parity bit for the data in this grid cell.

Data corruption and the checksum/parity bit

Communications through the thin Martian atmosphere and the low-powered communication antenna on the rover mean that the map data communicated down to the rover is often corrupted by noise. The checksum/parity bit at the end of each data byte of the map serves as a simple error detection system. The parity bit encodes whether the sum of the other seven bits in each byte is either 0 or 1 (as a one-bit number). In other words, it indicates whether the number of '1's that occur in the remaining 7 bits is even (in which case the parity bit would be zero) or odd (in which case the parity bit should be 1).

Looking at the example shown above, there are three '1's in bits 0-6 (an odd number) hence the parity bit is '1'. If the noise was to ancient any single bit of the signal during communications (by sipping a single bit from 0 to 1 or from 1 to 0), then the parity bit would no longer match, and we could detect that the data for this byte had been corrupted by noise.

Receiving the map data

The first job your software implementation on the rover must perform is to decode the binary data (as shown above) for a given communicated map while detecting and correcting for errors that have occurred during message transmission. Binary map data is stored in files that are logged by the communications sub-system on the rover and can be opened and inspected by your code. Your code should receive/read binary data in the format shown above and determine:

  1. The (x, y) grid cell location of the rover.
  2. A list of (x, y) grid cell locations for each science goal
  3. A 2D array (preferably as unsigned char) of the topographic height in meters of each of the 128x128 grid cells
  4. A 2D array (preferably as unsigned char) of the terrain type (0-3) of each of the 128x128 grid cells

For the rover's initial location, you should use the grid cell data, assuming a cell is found containing the rover, which has not been corrupted by noise. In the situation in which no such cell is found, you should use the "backup" rover position (x, y) provided at the start of the satellite-sent data.

Science goal locations should only be accepted if it is determined (via the parity bit) that they are error-free.

For grid cells affected by noise/errors, the data in these cells (topographic height and terrain type) should be rejected and a new estimate of these values determined using a 3x3 mode filter. To perform this filtering operation, you should add all non-corrupted cells within a 3x3 grid centered on the given value, and determine a new estimate based on the most commonly occurring value (for both the topographic height and terrain type). Where there are two or more equally most commonly occurring values, the smallest of these values should be chosen.

Consider the 3x3 grid of data shown below (one for topography, one for terrain type), centered around the same cell, which has be determined to be erroneous (based on parity bit):

To determine the new values at this center cell, we consider all non-corrupted surrounding cell values and the most commonly occurring values. In this example, for type there are two '0's, two '1's, and three '2's, so the new estimated terrain type would be '2'. For the topographic, there are two '4's and two '5's and hence the smaller of these values (4) would be chosen as the new estimate for the topographic height at the center cell).

Evaluating potential rover paths provided by the science team:

The second main job your software should perform is to use the "reconstructed" map data you have to evaluate potential rovers' paths to take on the map. Paths are communicated by the science team and provided as a sequence of rover driving commands in ASCII format, starting from the rover's initial position and orientation (the rover is always positioned at the start of the day to be facing due North (along the positive y-direction)).

Each command is separated by a newline and consists of a "direction" and "distance". There are ????ve possible command directions/types:

  • "Forward": provided in the form "forward distance". The rover should move in a forward direction (based on its current heading (North/South/East/West) for distance meters, where distance is an integer.
  • "backward": provided in the form "backward distance". The rover should move in a backward direction (based on its current heading (North/South/East/West) for distance meters, where distance is an integer.
  • "left": provided in the form "left amount". The rover should turn on the spot to the left (changing its heading), where the amount represents the relative angle to turn through, measured in degrees.
  • "right": provided in the form "left amount". The rover should turn on the spot to the left (changing its heading), where the amount represents the relative angle to turn through, measured in degrees.
  • "end": provided as a single keyword to indicate there are no further trajectory commands

For example, consider the proposed path specified as:

forward 2 right 90 forward 5 left 90 forward 2 end

If the robot's original grid location was (x=0, y=0) at the start of the day, then the final cell location would be (x=5, y=4), and the path taken would look like this:


The job of your code is to take the proposed path and map and determine (a) whether or not the path is feasible, and if it is feasible (b) determine the total energy required to complete this path by the rover.

A path is considered infeasible if (a) it traverses any type 3 terrain, (b) it traverses from one cell to the next in which the "slope" of the topography is greater than 1.5m per cell (slope 1.5), where the slope is measured as the absolute difference in topographic heights (in meters) between the adjacent cells, or (c) it takes the rover outside the 128x128m operating area.

In the situation in which the path is feasible, the power required by the rover to complete the path is a function of (a) the terrain type traversed and (b) the slope of the terrain. Each grid cell traversed requires 1 power unit for type 0 terrain, 2 power units for type 1 terrain, and 4 power units for type 2 terrain. The power required to move across sloped terrain is 10 power units per 1m change in topographic height.

Determining if a feasible path exists

The final task that your code must perform is to determine if a feasible path exists from the rover's current position to a designated science objective location. Your code does not necessarily have to provide what the path is, rather you must determine if there exists some feasible path through the map.

One way to perform this task is to treat the cells in the map grid as connected nodes in a graph, where each grid cell is connected to cells in the four cardinal directions around it (north/south/east/west), except for cells at the edge of the map, which will be connected to only three ot two other cells. Starting from the rover's initial cell, traversing this graph using either a depth-first or breadth-first search should allow you to determine whether the given destination cell is reachable.

Visualizing the Map

The science team has helpfully provided a bit of code you can use to visualize your reconstructed maps and proposed paths (see further details in the code challenge description). Once you have "reconstructed" your map data from the noisy communicated binary data, and determined the grid cells traversed by your path, you can pass it to the function "save_map_bmp" which outputs a graphical representation of the map data in a BMP image file template that looks like:

where the map to the left shows the topography (shaded from dark (low elevations) to light (high elevations)), and the map to the right shows the terrain type. Science goals/rover start locations and proposed path are also overlaid on the map. The terrain map also indicates areas of high slope which would make traversal across these pixels/cells feasible.

Program input format

Your program should be run using the command line form:



Grid cell (x=8, y=117)
Topo height: 2m
Terrain type: 2


This Engineering Assignment has been solved by our Engineering Expert at Exam Question Bank. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing Styles. Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turn tin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.


  • Uploaded By : Katthy Wills
  • Posted on : November 09th, 2022
  • Downloads : 0
  • Views : 216

Download Solution Now

Can't find what you're looking for?

Whatsapp Tap to ChatGet instant assistance

Choose a Plan


80 USD
  • All in Gold, plus:
  • 30-minute live one-to-one session with an expert
    • Understanding Marking Rubric
    • Understanding task requirements
    • Structuring & Formatting
    • Referencing & Citing


30 50 USD
  • Get the Full Used Solution
    (Solution is already submitted and 100% plagiarised.
    Can only be used for reference purposes)
Save 33%


20 USD
  • Journals
  • Peer-Reviewed Articles
  • Books
  • Various other Data Sources – ProQuest, Informit, Scopus, Academic Search Complete, EBSCO, Exerpta Medica Database, and more