< All Topics
Print

NEPI Engine – Building from Source-Code

Introduction

This tutorial will walk you through cloning, deploying, and building the NEPI Engine File System from source code.

What you will need:

1) 1x NEPI-enabled device with internet access. This tutorial uses an edge-compute processor box that includes an NVIDIA Jetson Xavier NX embedded GPU with NEPI Engine software installed.

NOTE: See available off-the-shelf NEPI enabled edge-compute options at: https://numurus.com/products-nepi-enabled-hardware/

2) 1x PC with internet access and configured to access the NEPI device’s File System.

NOTE: This tutorial assumes you have already setup connections between your PC and nepi device as explained in the following tutorials:

https://nepi.com/nepi-tutorials/nepi-engine-connecting-and-setup/

https://nepi.com/nepi-tutorials/nepi-engine-user-storage-drive/ 

https://nepi.com/nepi-tutorials/nepi-engine-accessing-the-nepi-file-system/

Cloning and Deploying the NEPI File System

Cloning the NEPI Source-Code

!!! This step should be done on your LINUX PC

a) Install Git on your Linux PC if not installed by opening a terminal and typing:

sudo apt-get install git

b) Create a user account on github and configure your ssh credentials if not already done following these instructions:

Connecting to GitHub with SSH – GitHub Docs

c)  On your Linux PC with Git installed and ssh credentials configured and tested, open a terminal window and enter the following commands to clone the latest nepi_engine_ws and submodule source-code from the development branch: 

git clone git@github.com:nepi-engine/nepi_engine_ws.git
cd nepi_engine_ws
git checkout ros1_main
git submodule update --init --recursive

NOTE:  If you need the NEPI development branch, type:

git checkout ros1_develop
git submodule update --init --recursive

NOTE:  If you need to edit any of the NEPI repo’s submodules, follow the instructions below.  Otherwise, jump to the “Deploying NEPI Source-Code to the Device” section below.

a) All of the NEPI source-code is organized into different submodule repos located in the nepi_engine_ws’s “src” folder. From the top level “nepi_engine_ws” folder type :

cd src

ls

b) Make any changes to the source-code you want to make and save the changed files.

Updating NEPI Source-Code

!!! This step should be done on your LINUX PC

If you have already cloned the source-code and just want to update to the latest, follow these instructions

a) Open a terminal on your PC in the nepi_engine_ws top level project folder

b) Type the following:

git pull
git submodule update --init --recursive

Deploying NEPI Source-Code to the Device

!!! This step should be done on your LINUX PC

a) Deploy the source code to the NEPI device using the one of the deploy_nepi sh script located in the top level nepi_engine_ws cloned repo.

The _repos script will only deploy repos listed in the first line of the script.  Change as needed based on the repos you have modified

./deploy_nepi_repos.sh

NOTE:  The deploy_nepi_complete is only needed in the current system does not have NEPI already installed, or you want to rebuild the entire code-base for some reason.

b) If you have not done so yet, setup an NTP time server on  your PC to automatically sync the clock on your NEPI device following the instructions at:

https://nepi.com/nepi-tutorials/nepi-engine-configuring-ntp-time-syncing/

Building the NEPI Source Code on the Device

!!! This step should be done on your NEPI DEVICE in an ssh connected terminal

NOTE:  If you run into issues building, you may need to delete any old deployed NEPI deployments by typing the following and redeploying in the previous section:

sudo rm -r /mnt/nepi_storage/nepi_src/nepi_engine_ws

a) SSH into your NEPI device and stop all NEPI processes, build the file system, and restart NEPI processes by typing:

nepistop

nepibld

nepistart

NOTE: The NEPI default sudo password is “nepi

NOTE: you can use the bash aliases “nepistop” and “nepistart” listed above at any time during testing to not only stop and restart your NEPI environment to apply any changes, but also see the NEPI messages in real-time to identify any issues with the changes you made.

Navigating the NEPI File System

!!! This step should be done on your NEPI DEVICE in an ssh connected terminal

a) SSH into your NEPI device and take a look at your NEPI device’s pre-configured aliases by typing the following command:

nepi

NOTE:  nepi_aliases are located in the ~/.nepi_aliases file on your NEPI device

b) You can navigate to common NEPI folders using the following command line aliases within your ssh session.

  • Common Nepi File System Folders
aifs = /opt/nepi/ros/share/nepi_aifs
api = /opt/nepi/ros/lib/python3/dist-packages/nepi_api
apps = /opt/nepi/ros/share/nepi_apps
drivers = /opt/nepi/ros/lib/nepi_drivers
etc = /opt/nepi/ros/etc
lib = /opt/nepi/ros/lib
managers = /opt/nepi/ros/lib/nepi_managers
ros = /opt/nepi/ros
nfi = /mnt/nepi_storage/nepi_full_img
nfia = /mnt/nepi_storage/nepi_full_img_archive
python = /opt/nepi/ros/lib/python3/dist-packages/
rui = /opt/nepi/nepi_rui/src/rui_webserver/rui-app/src
sdk = /opt/nepi/ros/lib/python3/dist-packages/nepi_sdk
 
  • Common NEPI User Driver Folders
cfg = /mnt/nepi_storage/user_cfg
ai = /mnt/nepi_storage/ai_models
auto = /mnt/nepi_storage/automation_scripts
data = /mnt/nepi_storage/data
installs = /mnt/nepi_storage/installs
src = /mnt/nepi_storage/nepi_src
tmp = /mnt/nepi_storage/tmp
user = /mnt/nepi_storage/user_cfg
 

 

NEPI Customization

To learn more about NEPI File System and RUI development, see the following tutorials:  

NEPI File System Customization Tutorial

https://nepi.com/nepi-tutorials/nepi-engine-customizing-the-nepi-file-system/

NEPI Resident User Interface (RUI) Customization Tutorial

https://nepi.com/nepi-tutorials/nepi-engine-customizing-the-nepi-rui-system/

 

 

Table of Contents