Skip to content

Instantly share code, notes, and snippets.

################################################################################
# Base
# - a borg image containing all the dependencies for simulation tooling.
# Does the following:
# - The image is based off a parameter containing the ubuntu version.
# - Installs base deb requirements (DEBS_DEVEL).
# - Adds a user called 'zen' and adds this users to the sudoers group.
# - Adds login shells for debugging & development.
# - Installs Rust toolchain for specified rust version (RUST_VERSION).
# - Installs Rust autocompletion for bash.
@stonier
stonier / generic-Makefile
Last active January 23, 2023 13:09
Generic Makefile
################################################################################
# Shell Environment
################################################################################
SHELL:=/bin/bash
PWD:=$(shell pwd)
################################################################################
# Variables
################################################################################
# use with e.g. 'make one PACKAGE=py_trees'
@stonier
stonier / Fallback Chooser
Created February 8, 2021 03:09
Fallback Chooser - when a long running chooser fails, fall back to the next option (just as it would on a first execution)
#!/usr/bin/env python
import functools
import py_trees
"""
This includes a suggestion of modification in tick method definition of Chooser
composite (in 'py_trees' python package).
I think Chooser should work as a 'fallback' plan of higher priority siblings
@stonier
stonier / snorriheim-Makefile
Last active June 10, 2021 00:15
Snorriheim Makefile
################################################################################
# Environment
################################################################################
SHELL:=/bin/bash
PWD:=$(shell pwd)
################################################################################
# Variables
################################################################################
# use with e.g. 'make one PACKAGE=py_trees_ros'
@stonier
stonier / setup.bash
Last active January 23, 2023 03:16
Runtime colcon setup script
#!/bin/bash
###########################
# Colours
###########################
export BOLD="\e[1m"
export CYAN="\e[36m"
export GREEN="\e[32m"
export YELLOW="\e[33m"
@stonier
stonier / ignition-Makefile
Last active December 9, 2020 16:51
ignition-Makefile
# use with e.g. 'make one PACKAGE=py_trees_ros'
PACKAGE?=maliput_multilane
COLCON_ARGS=--symlink-install --event-handlers console_direct+
COLCON_QUIET_ARGS=--symlink-install --event-handlers
# OR make a single tarball or binary
# COLCON_ARGS=--merge-install --event-handlers console_direct+
# COLCON_QUIET_ARGS=--merge-install --event-handlers
PWD = $(shell pwd)
@stonier
stonier / venv-trip.bash
Last active November 22, 2020 15:33
venv-trip.bash
#!/bin/bash
# Script for building the minimal trip development environment
NAME=trip
##############################################################################
# Configuration
##############################################################################
#!/bin/bash
################################################################################
# Environment
################################################################################
UBUNTU_DISTRO=`lsb_release -cs`
if [ ${UBUNTU_DISTRO} == "focal" ]; then
ROS_DISTRO=foxy
elif [ ${UBUNTU_DISTRO} == "bionic" ]; then
################################################################################
# Environment
################################################################################
SHELL:=/bin/bash
PWD:=$(shell pwd)
# Complicated - this makefile's dir, remove the trailing slash
WORKSPACE_ROOT:=$(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
################################################################################
#!/bin/bash
PWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
konsole -e /bin/bash --init-file ${PWD}/setup.bash