This repository contains high-level development tools for Sunswift embedded and DDS projects. It is separated into host/ and target/. host/ contains the dev tools we are using during development time on our host machines. target/ contains scripts that should be run on the target (NVIDIA Drive THOR computer). It is intended to be a submodule in the SR-Mjolnir repository.
It includes:
srpkg: DDS package creation and management toolsrbuild: Build tool for compiling and deploying DDS packagessrlaunch: Tool for starting nodessrdds: (WORK IN PROGRESS) Tool for managing active nodes
To make srpkg and srbuild available globally:
export PATH="$PATH:<absolute_path_to_repo>/sunswift-dev-tools/host"I recommend adding this to your .bashrc
srpkg is a tool for creating and managing DDS packages. It must be run from within the repository.
To create a new DDS package in the current working directory:
srpkg create <package_name>This will create a new directory with the following structure:
<package_name>/
├── .srpkg # Package metadata file
├── src/ # Source files (.cpp)
├── include/ # Header files (.hpp)
├── param/ # Parameter files (JSON)
├── param/param.json # Default parameter template
├── CMakeLists.txt # Build configuration template
└── README.md # Package documentation
The package will be created in your current working directory.
These commands may be used from anywhere in the repository
# Show information about a specific package
srpkg info <package_name>
# List all packages in the repository
srpkg listsrbuild is a wrapper around CMake that simplifies building DDS packages and targets. It must be run from within the repository, but can be used from anywhere within, not necessarily root.
srbuild automatically creates or overwrites root level build/ and deploy/ directories. It builds all objects, libraries and binaries into build/ (don't bother touching this, it's needed for CMake), then installs all runtime files into deploy/ for easy deployment (use this).
SR-Mjolnir/
├── build/ # CMake-required files
├── deploy/
│ ├── bin/ # Node executables
│ ├── param/
│ └── tools/ # srlaunch, srdds
└── ...
To build and install all available targets in the repository:
srbuild allTo build only specific packages or libraries:
srbuild target node1 node2 ...This automatically builds dependencies if required.
To delete the build directory:
srbuild cleanBy default, srbuild uses 8 parallel jobs for compilation. You can customize this:
srbuild all --jobs 4
srbuild target package1 -j 16Run srlaunch from the deploy/tools directory only. The version in the submodule repo is for version control.
cd deploy/tools
./srlaunch all
./srlaunch target node1 node2Then just Ctrl-C to shut down all nodes gracefully. It's that easy guys.
-
Create a new DDS package:
cd /path/to/repo/src srpkg create my_dds_node -
Add your source code to
my_dds_node/src/and headers tomy_dds_node/include/ -
Fill out the template CMakeLists.txt
-
Add
add_subdirectory(relative/path/to/my_dds_node)to src/CMakeLists.txt to enable the build -
Build the package:
srbuild target my_dds_node # or srbuild all -
Launch the node:
# in deploy/tools ./srlaunch target my_dds_node # OR ./srlaunch all
- Both tools must be run from within the SR-Mjolnir repository
srpkgcreates packages in the current working directorysrbuildoperates on the entire repository build systemsrlaunchis used from the deploy directorysrddsis currently work in progress
Ryan Wong || z5417983