Skip to content

Instantly share code, notes, and snippets.

View liamstask's full-sized avatar

Liam Staskawicz liamstask

View GitHub Profile
@liamstask
liamstask / listener.cpp
Created March 30, 2016 02:04
fast-rtps subscriber issue
bool Listener::init(Participant *p)
{
// set up subscription for Latency msgs
SubscriberAttributes sa;
sa.topic.topicKind = NO_KEY;
sa.topic.topicDataType = "TestTopicType";
sa.topic.topicName = "HelloTopic";
// sa.qos.m_reliability.kind = BEST_EFFORT_RELIABILITY_QOS;
sa.qos.m_reliability.kind = RELIABLE_RELIABILITY_QOS;

RTPS - what is it?

RTPS (Real Time Publish Subscribe) is a spec that describes a pub/sub based messaging system and wire protocol. It can run on any transport capable of delivering datagrams (delimited, uncorrupted packets), so UDP is a good fit.

RTPS concepts

An RTPS system consists of a network of participants (there is no master node). A participant is a grouping of topic publications and subscriptions - it usually corresponds one to one with a process.

Topics

void P_1_1_2_01App::setup()
{
savePDF = false;
segmentCount = 360;
radius = 300;
ofSetWindowShape(800, 800);
}
void P_1_1_2_01App::draw()
{
drungus:project liam$ brew install -v glfw3 --universal
==> Downloading http://downloads.sourceforge.net/project/glfw/glfw/3.0.3/glfw-3.0.3.tar.bz2
Already downloaded: /Library/Caches/Homebrew/glfw3-3.0.3.tar.bz2
tar xf /Library/Caches/Homebrew/glfw3-3.0.3.tar.bz2
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file CMakeLists.txt
Hunk #1 succeeded at 373 with fuzz 1 (offset 16 lines).
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/glfw3/3.0.3 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DGLFW_USE_CHDIR=TRUE -DGLFW_USE_MENUBAR=TRUE -DGLFW_BUILD_UNIVERSAL=TRUE -DBUILD_SHARED_LIBS=TRUE .
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/glfw3/3.0.3 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DGLFW_USE_CHDIR=TRUE -DGLFW_USE_MENUBAR=TRUE -DGLFW_BUILD_UNIVERSAL=TRUE -DBUILD_SHARED_LIBS=TRUE .
drungus:googlecode liam$ brew install hg -v
==> Downloading http://mercurial.selenic.com/release/mercurial-2.7.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/mercurial-2.7.1.tar.gz
tar xf /Library/Caches/Homebrew/mercurial-2.7.1.tar.gz
brew: PYTHONPATH=/usr/local/Cellar/mercurial/2.7.1/lib/python2.7/site-packages:/usr/local/Cellar/mercurial/2.7.1/libexec/lib/python2.7/site-packages
==> make PREFIX=/usr/local/Cellar/mercurial/2.7.1 install-bin
make PREFIX=/usr/local/Cellar/mercurial/2.7.1 install-bin
python setup.py build
running build
running build_mo
@liamstask
liamstask / main.go
Created November 11, 2015 01:27
gb test repro
package main
func main() {
println("main")
}
@liamstask
liamstask / middleman s3 deploy
Created February 19, 2014 17:59
a script for deploying a middleman site to s3. any gzip'd files have their extension removed so that s3 can serve them directly without another server required to perform content negotiation.
#!/usr/bin/env python
import os, shutil, subprocess
SITE = 'build/'
BUCKET = 's3://mybucket.com/'
CMD = ['s3cmd', '-c', os.path.expanduser('~/.s3cfg-myconfig'), 'sync', '--acl-public', '--reduced-redundancy']
CACHE_10_WEEKS = "Cache-Control: max-age=6048000"