Skip to content

MacOS user build guide

Kamila Y edited this page May 30, 2021 · 26 revisions

Introduction

On this page, you will find all the necessary resources and information that will enable you to run the SmartRover™ frontend app and SMCE-gd emulator sketch to experience the Mars environment and sensation of driving a rover on our neighboring planet. This page would help you to solve all your questions regarding the installation of each and every software needed to start exploring and we will try to reference other relevant libraries and dependencies to expand the resources further.

1. Install SMCE-gd Emulator (Courtesy Of ItJustWorks™)

Step 1.1: Get a package Manager

Recommendation is to use Homebrew as a package Manager

Homebrew can be installed by invoking the following command on the Terminal app

bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Now you can install the dependencies.

Step 1.2: Install Dependencies

Use the following commands in the Terminal app

brew install --cask cmake

brew install arduino-cli

# brew install openssl # Uncomment this one if your Apple-provided LibreSSL fails to work with SMCE

Step 1.3: Install a C++ compiler

If you have not any C++ compiler installed, we recomment you to install AppleClang as it is the default compiler by CMake. You can install AppleClang, by invoking the following command in a Terminal:

xcode-select --install

Note: The software is no longer available for macOS Catalina or earlier. So you should instead download the latest stable (non-beta) package from the Apple Developer Downloads page .

Step 1.4: Install SMCE-Godot

Once done, go to SMCE-gd emulator's releases page, and download the latest .dmg installer. Run it, disregarding the security warning, and drag and drop the SMCE-Godot app into the Applications folder.

2. Get terrain mod and The rover model

2.1 Get mod-package.zip from our release v1.0.0. and unzip it.
2.2 Add the mars.pck from terain_mod to the following folder:
Finder> Go> press and keep option key > Library folder shows up, open it > Application Support> 
find Godot> then app_userdata> SMCE> mods and put the 
   downloaded mars.pck inside the mod folder. 

the complete path will be like the following,

   /Users/something/Library/Application\ Support/Godot/app_userdata/SMCE/mods/mars.pck

3. Install Smart Rover Front End App

To install the latest version of the Smart Rover Frontend app, go on our Releases page, and download the latest .dmg. Then open it disregarding the Gatekeeper warning, finally, drag and drop the SmartRover app into the Applications folder. If your mac still does not allow you to open the app, check the guides to safely open apps on Mac .

4. Get Arduino Sketch File

To get the latest version of the SmartRover sketch to run on the SMCE-gd, please visit our Releases page. Arduino sketch will be listed as one of the release assets and named like "SmartRover_vx.x.x-sketch.zip" with reference to the current release version. After you download and save the zip file into your computer, please extract it so that you have the "SmartRover/SmartRover.ino" structure intact.

From the SMCE-gd emulator, you can navigate the above folder you have extracted and select ino sketch file to compile. That's it.

5. Install MQTT

MQTT protocol enables bi-directional communication between the SmartRover emulator and the Frontend app so that you can receive telemetry data and camera stream and send driving commands from the control pad or console terminal. For the best performance, it is recommended to install a local MQTT broker on your computer and configure both the emulator and the frontend to connect to "localhost". Or for a more realistic experience of a "delayed" communication between the SmartRover, Mars Orbiter, and the Earth, you can choose and use from numerous online MQTT brokers.

Option 1. Install or choose an online MQTT broker

Option 2. Install Mosquitto local broker

We have used and tested with a local installation of the open-source Mosquitto broker.

Instructions to install Mosquitto broker in macOS

6. PostgreSQL

PostgreSQL is used for data management.

6.1 Install PostgreSQL

To get the installer go to the official download page.

Run the installer and follow the instructions. Further support can be found here.

6.2 Configure settings

To setup the database:

6.2.1 Run the following command to Configure the $PATH variable

sudo mkdir -p /etc/paths.d && echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp

6.2.2 Download the Sample Database from here.

and unzip the downloaded file.

6.2.3 Load the sample database:

psql postgres < path/to/SmartRover-sample-db.sql
Note:
  • It is important that you have unzipped the file and also, provided the right path.
  • postgres is the default database. But, you also can create a new database and call it "SmartRover" for instance. Then you can replace postgres in the above command with the name you choose.

7. Finally:

You can use pgAdmin to edit, query, and save your data easily.

In pgAdmin start a new server with these instructions.

In the Connection tab, enter the following settings to connect to the local server initialized by Postgresapp:

Host:

Port:

Username:

Password:

Role:
Clone this wiki locally