October 4, 2022

0

How does the Curiosity Rover operates

As of 2012, the Red planet is being explored by a robot called Curiosity. We came across the question, how does a rover get controlled over a distance of millions of kilometers? Well, we were able to figure out how it is controlled, what programming language it is based on, and how the computer is set up within the rover.

The Mars Rover mission

Curiosity landed on Mars on August 6, 2012. The rover was sent to Mars to find out whether life ever existed on the planet. It landed on Gale's crater. Millions of years ago, the crater was a sea. The robot studies the minerals that remained at the bottom of the used-to-be sea.

The rover weighs in at 900 kg and moves at a speed of 144 meters per hour. It is equipped with cameras, a set of tools for research over a distance, and a kit of meteorological equipment. 

Within the first month, the robot detected traces of an ancient lake. In 2014, the rover detected methane traces in the atmosphere, which could indicate signs of life on Mars.

Since 2012, the rover covered over 25 km. The past 10 years it has been busy studying the Martian soil, trying to find evidence of life forms. 

Scientists from NASA claim that life on Mars is a possibility, although no hard evidence exists.

The rover’s system

A rover is a closed autonomous system. You might be surprised by the rover’s processor specs:

– Processor frequency – 133 MHz

– 128 Mb RAM

Any modern smartphone supersedes these specs by far. 

Here is its full characteristics:

The main processor is made by BAE Systems Electronic Solutions, and costs a staggering $200 000. 

Software and code

The rover’s code is written using C++, as well as C. Previously, scientists used C++ to create autonomous algorithms, including, but not limited to stereovision, map construction, route planning and visual odometry. However, until 2000, C++ wasn’t used for rovers and everything was developed using C. During development, programmers noted that the risks of rewriting the current C++ code to C are much higher than using C++. And so, C++ became the main programming language of rovers.

The software controlling the rover’s movement was also written using C++. Graphics are added to the movement information and this is sent to the researchers’ devices.

The code composes 150 modules. These modules transmit data to other modules via an array of messages with a minimal number of blocks. The OS shell consists of 2.5 million lines of code. We assume that testing scripts are written using Python (non-disclosed information).

With every mission to Mars the amount of code only increased. For example, the amount of code of the Mars Science Laboratory mission was more than in all the preceding missions combined. There is a lot of coding in the rover, and the reason is that the code is developed for a specific mission. During the course of the mission some programmes are run only once, like landing. One coding error and the whole machine will crash during landing. 

The rover’s chipset is designed for durability. The insides are programmed in such a way that the BSOD can occur only once every 15 years. In space, reliability supersedes speed. The shell is created to withstand insane radiation levels, in which a computer on Earth would get fried within seconds.

The rover is equipped with two identical computers. The second is there in case the first one crashes. In this sense NASA relies on Joe Armstrong’s words, «In order to have a reliable system, you need to have 2 computers.».

The rover uses the VxWorks operating system. This is a rather classic core. We suppose the core contains less than 10 kilolines of code. In other words, the core has basically no errors. The essential part is that it is isolated and reliable. That is why different parts of the rover are isolated and operate independently of each other.

Certain components inside the rover have copies. They are designed in such a way that if a component malfunctions, its copy will substitute it, without allowing the whole system to fail. 

How does the rover get controlled from Earth

The key feature of controlling the rover is distance. The minimum distance between Mars and Earth is 55.76 million km, while the max reaches 401 million km. Radio signals take around 22 minutes to reach Mars, and another 22 to return. The rover contacts Earth only once a day. It spends the rest of its time in isolation. 

Most of the activities the rover does are preprogrammed back on Earth. This means the rover rarely makes decisions on its own. In critical situations the rover halts and awaits orders from Earth.

To see where the rover is traveling it is equipped with several stereo cameras that draw a 3D image. The people controlling the rover see the 3D image, which helps them navigate it. 

A special software is used to recreate a virtual environment and a model of the rover.  In this virtual environment commands are modeled before sending them to the rover. This additional step is done to guarantee that nothing adverse will happen after sending through the commands.

This is what a modeled unit of the rover looks like after everything has been put together. The grey surface is the simulated environment, while the orange lines are the rover’s tracks:

Conclusion

The rover uses C and C++ tried and tested by time. The essential part of its software is reliability and longevity, rather than speed.

Did you like the article? Share it by using the «Copy article» button at the beginning of the article.

_____________________

Let’s create something grand.

Call us on 8 800 201 1486 or email us — hello@rocky.rocks

  • Author

    Pavel Mikhaylichenko

  • Share

Similar articles

Blog
How to survive the crisis and increase the effectiveness of employee training
Blog
Minigames from the New York Times. Why do they need the edition and how they were created
Blog
How the metaverse works: its potential for marketing