This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' https://github.com/GStreamer/gst-python/blob/master/examples/dynamic_src.py | |
Simple example to demonstrate dynamically adding and removing source elements | |
to a playing pipeline. | |
''' | |
import sys | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <functional> | |
#include <vector> | |
class StateMachine | |
{ | |
public: | |
StateMachine() = default; | |
~StateMachine() = default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from rclpy.node import Node | |
import rclpy | |
if __name__ == "__main__": | |
rclpy.init() | |
node = Node("node_w_params") | |
node.declare_parameter("param_a") | |
node.declare_parameter("group_a.param_b") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
sudo locale-gen en_US en_US.UTF-8 | |
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
sudo apt update && sudo apt install -y curl gnupg2 lsb-release | |
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - | |
sudo sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script is not executable :) Use it only for reference | |
# 30 GB: | |
truncate -s $((1024*30))M image.img | |
/sbin/mkfs -t ext4 -q image.img | |
mkdir ~/image_contents | |
sudo mount -o loop image.img ~/image_contents | |
sudo chown -R $USER:$USER ~/image_contents | |
sudo umount ~/image_contents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <QObject> | |
//See Gist Comment for description, usage, warnings and license information | |
#define AUTO_PROPERTY(TYPE, NAME) \ | |
Q_PROPERTY(TYPE NAME READ NAME WRITE NAME NOTIFY NAME ## Changed ) \ | |
public: \ | |
TYPE NAME() const { return a_ ## NAME ; } \ | |
void NAME(TYPE value) { \ | |
if (a_ ## NAME == value) return; \ | |
a_ ## NAME = value; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
set(searchPattern "AMENT") | |
message(STATUS "========== Listing variables w/ search pattern: ${searchPattern}") | |
get_cmake_property(_variableNames VARIABLES) | |
list(SORT _variableNames) | |
foreach (_variableName ${_variableNames}) | |
if (_variableName MATCHES .*${searchPattern}.*) | |
message(STATUS "${_variableName}=${${_variableName}}") | |
endif () | |
endforeach () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using static System.Math; | |
// Some helpers for converting GPS readings from the WGS84 geodetic system to a local North-East-Up cartesian axis. | |
// The implementation here is according to the paper: | |
// "Conversion of Geodetic coordinates to the Local Tangent Plane" Version 2.01. | |
// "The basic reference for this paper is J.Farrell & M.Barth 'The Global Positioning System & Inertial Navigation'" | |
// Also helpful is Wikipedia: http://en.wikipedia.org/wiki/Geodetic_datum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script provides coordinate transformations from Geodetic -> ECEF, ECEF -> ENU | |
and Geodetic -> ENU (the composition of the two previous functions). Running the script | |
by itself runs tests. | |
based on https://gist.github.com/govert/1b373696c9a27ff4c72a. | |
""" | |
import math | |
a = 6378137 | |
b = 6356752.3142 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################## | |
# CMake | |
############################################################################## | |
cmake_minimum_required(VERSION 2.8.0) | |
project(show_laser) | |
############################################################################## | |
# Catkin | |
############################################################################## |
NewerOlder