Skip to content

Instantly share code, notes, and snippets.

Sensor Connectivity :: v1

Sensor -> Station

TCP Session diagram

HEADER DATA1 DATA2 DATA3 ... DATAN
 Computer 1                                                                                             Computer 2
--------------------------------------------------------------------------------------+    Ethernet    +--------------------------------------------------------------------------------------------
      ROS topic        +-----------------+       ROS topic       +-----------------+  |     TCP/IP     |  +-----------------+       ROS topic                             +----------------------+
(A) /signing/demand => | Signer ROS node | => /sending/demand => | PubSub ROS node | ==// IPFS topic //== | PubSub ROS node | => /incoming/demand ======================> | -+                   |
                       +-----------------+                       |                 |  |                |  |                 |                      +-----------------+    |  | Repeater ROS node |
(B) /incoming/offer <=========================================== |                 |  |                |  |                
@akru
akru / polkadot_nixos.md
Created July 13, 2018 13:03
Polkadot instance on NixOS
~ $ nix-channel --add https://hydra.aira.life/project/aira/channel/latest aira
~ $ nix-channel --update                                                      
unpacking channels...
created 5 symlinks in user environment
~ $ nix-env -i polkadot
~ $ polkadot 
@akru
akru / parity_local_queue_cleanup.sh
Created July 10, 2018 14:53
Cleanup Parity transaction queue
#!/bin/sh
# Parity should be runned with --rpcapi=all flag
CMDS=$(curl -s --data '{"method":"parity_localTransactions","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545 | jq -c '.result | keys[] | {"method":"parity_removeTransaction","params": [.] ,"id":1,"jsonrpc":"2.0"}')
for C in $CMDS; do
curl -s --data "$C" -H "Content-Type: application/json" -X POST localhost:8545
done

Raspberry Pi 3 AIRA testing

Initial

  1. AIRA installed by instruction;
  2. Run and work over week.

Results

Short: no crash but slow-working.

Keybase proof

I hereby claim:

  • I am akru on github.
  • I am akru (https://keybase.io/akru) on keybase.
  • I have a public key whose fingerprint is 6FE0 A69B 33F7 3E65 3889 3CF3 0D0A 7FA6 7911 873E

To claim this, I am signing this object:

@akru
akru / PS2_RC.ino
Created February 29, 2016 09:25
PS2 Controller to RC PWM signal converter based on Arduino Pro Mini
#include <PS2X_lib.h>
#include <Servo.h>
#define CLK_PIN A3
#define CMD_PIN A2
#define DAT_PIN A1
#define ATT_PIN A0
#define CH1_PIN 3
#define CH2_PIN 5
@akru
akru / StateSpace.hs
Last active August 29, 2015 14:24
Discrete State-Space example
{-# LANGUAGE FlexibleContexts #-}
module Numeric.LinearAlgebra.StateSpace
(StateSpace(..), runStateSpace, c2d) where
import Numeric.LinearAlgebra
import Data.List (mapAccumL)
data StateSpace a = SS
{mA :: a, mB :: a, mC :: a, mX :: a}
@akru
akru / Burningship.hs
Created December 7, 2014 12:12
Burning Ship drawer
module Main where
import Codec.Picture
import Data.Complex
maxIterations = 2000
paletteScaler = 2000
width = 1920
height = 1080
@akru
akru / Mandelbrot.hs
Last active August 29, 2015 14:10
Mandelbrot set drawer
module Main where
import Codec.Picture
import Data.Complex
maxIterations = 2000
paletteScaler = 2000
width = 1920
height = 1080