Skip to content

Instantly share code, notes, and snippets.

View moriarty's full-sized avatar

Alex Moriarty moriarty

View GitHub Profile
@moriarty
moriarty / diff
Created January 29, 2016 01:12
UnderDev RoboCup RefBox Diff
diff --git a/src/libs/protobuf_clips/communicator.h b/src/libs/protobuf_clips/communicator.h
index 8bca07f..d2d769d 100644
--- a/src/libs/protobuf_clips/communicator.h
+++ b/src/libs/protobuf_clips/communicator.h
@@ -63,7 +63,7 @@ class ClipsProtobufCommunicator
ClipsProtobufCommunicator(CLIPS::Environment *env, fawkes::Mutex &env_mutex);
ClipsProtobufCommunicator(CLIPS::Environment *env, fawkes::Mutex &env_mutex,
std::vector<std::string> &proto_path);
- ~ClipsProtobufCommunicator();
+ virtual ~ClipsProtobufCommunicator();
@moriarty
moriarty / asus_ac56_lsusb-v.out
Created January 26, 2016 17:57
Asus AC56 USB wifi lsusb -v output
Bus 003 Device 009: ID 0b05:17d2 ASUSTek Computer, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
13:57:45.774480 TriggeredConveyorBelt: DETECTED PLATE: NO_PLATE
13:57:46.098968 TriggeredConveyorBelt: DETECTED PLATE: NO_PLATE
13:57:46.425638 TriggeredConveyorBelt: DETECTED PLATE: NO_PLATE
13:57:46.750732 TriggeredConveyorBelt: DETECTED PLATE: NO_PLATE
13:57:47.075578 TriggeredConveyorBelt: DETECTED PLATE: NO_PLATE
13:57:47.646121 TriggeredConveyorBelt: DETECTED PLATE: FAULTY_PLATE
13:57:47.687523 TriggeredConveyorBelt: DETECTED PLATE: FAULTY_PLATE
13:57:47.774259 TriggeredConveyorBelt: DETECTED PLATE: FAULTY_PLATE
13:57:47.855565 TriggeredConveyorBelt: DETECTED PLATE: FAULTY_PLATE
13:57:47.896288 TriggeredConveyorBelt: DETECTED PLATE: FAULTY_PLATE
@moriarty
moriarty / gdb cfh debugging
Created November 3, 2015 14:30
debugging cfh with gdb
(gdb) run
Starting program: /home/rockin/rockin-refbox/bin/llsf-refbox
Traceback (most recent call last):
File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
15:26:46.818769 RefBox: Using CLIPS rules from: /home/rockin/rockin-refbox/rockin/clips/
[New Thread 0x7ffff1618700 (LWP 13597)]
select twist.data from TwistROSMessage as twist
where twist.data.linear.x > 0
select cmd.data from CmdVelEvent as cmd
where cmd.data.linear.x > 0
select data from StringROSMessage(topic='chatter/String2')
where data != '0'
select * from pattern[ every [1] (a=AButtonEvent -> b=BButtonEvent)]
@moriarty
moriarty / gist:dd33dfd57e1a51b020a3
Created June 2, 2015 12:31
Colour Sensor Event R increasing
String epStatement = "select * from ColorSensorEvent "
+ " match_recognize ( "
+ " measures A as c1, B as c2 "
+ " pattern (A B) "
+ " define "
+ " A as A.r > 10.0 , "
+ " B as (A.r < B.r) ) ";
@moriarty
moriarty / gist:1ba8c4a112f6bab4eae1
Created May 24, 2015 11:09
MAS Group ROS Indigo on Arch Linux
alex@moriarty-xmg:../src$ wstool
workspace: /home/alex/workspace/ros/indigo/robocup/src
Localname S SCM Version-Spec UID (Spec) URI (Spec) [http(s)://...]
--------- - ---- ------------ ----------- ---------------------------
youbot-manipulation V git hydro 5eb6b10cd5bd (0140b2c00642) github.com/svenschneider/youbot-manipulation.git
youbot_diagnostics V git hydro-devel 7a566dd954d8 (7e7861604986) github.com/mas-group/youbot_diagnostics.git
youbot_simulation git hydro-devel 1223bf999b95 github.com/mas-group/youbot_simulation.git
youbot_description git hydro-devel 3de35462caab github.com/mas-group/youbot_description.git
youbot_driver_ros_interface V git hydro-devel a3dcdc090633 (837ffceeb9a7) github.com/mas-group/youbot_driver_ros_interface.git
@moriarty
moriarty / gist:acd6971d89429ba60b12
Last active August 29, 2015 14:21
Learning and Adaptivity In Class Assignment READ DATA
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Alex Moriarty
"""
import numpy as np
import sklearn
from sklearn import tree
from sklearn.externals.six import StringIO
import pydot
4.53931 1.61412 -1.44282 3.06248 2.94969 platform_middle
3.78521 1.40886 -1.86213 3.54030 2.93517 platform_pre
4.53931 1.29317 -0.963919 2.85246 2.94982 platform_middle_intermediate
@moriarty
moriarty / navigation_stress_test.py
Created April 8, 2014 16:10
Ros Navigation Stress Test
#!/usr/bin/env python
import rospy
import geometry_msgs.msg
import random
import std_srvs.srv
GOAL_POSE = {'C1': [3.950146, 0.849521, 0.000],
'S4': [3.734791, -0.454118, 0.000],
'S3': [3.297905, 0.179620, 3.141592],