Top-level repository for nepi-engine development
You are in a ROS 1 branch. These is specifically for ROS 1 development.
If and only if you intend to run the ROS 2 variant of nepi-engine, switch to that branch now:
$ git checkout ros2_main
At that point, follow the instructions in the top-level README to deploy code, build on the target hardware, etc.
Generally, it will be a big headache to try to work on both branches from the same repository folder, so if you need to work on both, we recommend that you clone this repository twice and checkout different ROS-specific branches in each of the copies.
There are two options for the location of the source repositories:
- Source repository cloned on a Linux development host (virtual machine is fine)
- Source repository cloned on target hardware
Generally, we recommend option 1 if you are going to be inspecting or modifying nepi-engine source code extensively, since it allows you to use your standard development environment and tools (editors, IDEs, etc.), which may not be available in the nepi-engine target filesystem.
Option 2 is convenient if you intend only to build the nepi-engine from source, not modify or inspect source, and your target hardware has a readily available internet connection (to allow initial cloning from GitHub). It is also a viable option if your target hardware and filesystem has a sufficient development environment.
In either case, source code is built on the target hardware from specific locations on the filesystem. Scripts are provided to deploy the source properly as later in this README.
If you intend only to deploy and build a production-ready nepi-engine on target hardware, ros1_main is the right branch:
$ git checkout ros1_main
If you would like to deploy and build the latest bleeding-edge version of nepi-engine or if you intend to add or modify nepi-engine source code, you should use the ros1_develop branch as a starting point:
$ git checkout ros1_develop
This top-level nepi_engine_ws repository makes extensive use of git submodules. The following step ensures that the submodules are cloned and set to the proper commit.
$ git submodule update --init --recursive
See individual submodule READMEs (as available)
This repository includes a shell script to deploy source code to the proper subdirectories on the target. The script works whether run from a development host with network connectivity to the target or run directly from the target (e.g., after repository clone and setup directly on the target hardware filesystem).
$ ./_deploy_nepi_engine_source.sh_
The deploy_nepi_engine_source.sh script relies on some environment variables that should be set in your .bashrc or via your own setup script prior to running it.
- NEPI_REMOTE_SETUP: Indicates whether running from development host or directly on target (1 = Dev. Host, 0 = From Target. Set to 0 automatically when on a prepared NEPI target filesystem)
- NEPI_TARGET_IP: Target IP address/hostname (for remote operations, as applicable)
- NEPI_TARGET_USERNAME: Target username (as applicable)
- NEPI_SSH_KEY Private SSH key for SSH/Rsync to target (as applicable)
- NEPI_TARGET_SRC_DIR: Directory to deploy source code to (except nepi_rui, which must be located at /opt/nepi/nepi_rui as described in that submodule's README). The usual location is on the NEPI user partition (/mnt/nepi_storage) at _/mnt/nepi_storage/