Skip to content

Instantly share code, notes, and snippets.

View peter-moran's full-sized avatar

Peter Moran peter-moran

View GitHub Profile
@peter-moran
peter-moran / dnsmasq.conf
Last active April 5, 2017 05:06
Erle Copter as a router w/ shared wifi and ethernet network
# /etc/dnsmasq.conf
expand-hosts
domain=local
# Define range of IP's to be assigned
dhcp-range=10.0.0.2,10.0.0.10,24h
# Define router IP
dhcp-option=option:router,10.0.0.1
@peter-moran
peter-moran / gstreamer_fps_test.cpp
Last active October 8, 2021 04:22
Example code for displaying (and finding FPS of) gstreamer video in OpenCV.
/*
Example code for displaying (and finding FPS of) gstreamer video in OpenCV.
Created by Peter Moran on 7/29/17.
Usage
-------
After compiling, run this program with the following arguments. All are optional, but must be used cumulatively.
`./gstreamer_test <width> <height> <fps> <window_size> <display_video>`
For example, to display 1080p video at 30 fps and calculate the true fps over a 15 sample running window, run:
@peter-moran
peter-moran / gstreamer_view.cpp
Last active June 9, 2022 18:44
Bare-bones C++ script for viewing gstreamer video from the CSI port of the Nvidia Jetson TX2.
/*
Example code for displaying gstreamer video from the CSI port of the Nvidia Jetson in OpenCV.
Created by Peter Moran on 7/29/17.
https://gist.github.com/peter-moran/742998d893cd013edf6d0c86cc86ff7f
*/
#include <opencv2/opencv.hpp>
std::string get_tegra_pipeline(int width, int height, int fps) {
return "nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)" + std::to_string(width) + ", height=(int)" +
@peter-moran
peter-moran / disp.rviz
Created September 28, 2017 20:23
Rviz config for viewing Udacity dataset with lidar
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /PointCloud21
Splitter Ratio: 0.784387
Tree Height: 775
# @brief Downloads and Includes cmake-conan
# @param VERSION -- The cmake-conan release version to get. Commit codes
# also applicable.
# @option INSTALL -- Specifies if cmake-conan should be installed to the user's home directory.
# This allows cmake-conan to only be downloaded once, rather than every
# time the build directory is cleaned.
# @note Browse release versions at: https://github.com/conan-io/cmake-conan/releases
# @note cmake-conan is a CMake wrapper for the Conan C and C++ package manager.
# It allows cmake to automatically configure and launch `conan install` as
# part of cmake configuration. It will take CMake current settings (os,