Skip to content

Instantly share code, notes, and snippets.

cd /opt/Softbank\ Robotics/Choregraphe\ Suite\ 2.5/lib/
sudo mv libz.so.1 libz.so.1.old
sudo ln -s /lib/x86_64-linux-gnu/libz.so.1
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)
echo "Bash version ${BASH_VERSION}..."
mkdir temp
for i in {0..10..1}
do
cp test$i.file temp/$i.file
done
@alexsleat
alexsleat / camtest.cpp
Created January 25, 2012 19:18
camtest.cpp
#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
namespace enc = sensor_msgs::image_encodings;
static const char WINDOW[] = "Image window";
@alexsleat
alexsleat / get-repo.sh
Created January 19, 2012 20:28
get-repo.sh
#!/bin/bash
cd /home/$(whoami)
git clone git@github.com:alexsleat/projectChimaera.git
echo "export ROS_PACKAGE_PATH=~/projectChimaera:\$ROS_PACKAGE_PATH" >> ~/.bashrc
. /home/$(whoami)/.bashrc
@alexsleat
alexsleat / fixwatermark.sh
Created January 12, 2012 16:28
AMD Unsupported hardware watermark
#!/bin/sh
DRIVER=/usr/lib/fglrx/xorg/modules/drivers/fglrx_drv.so
for x in $(objdump -d $DRIVER|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do
sed -i "s/$x/\x90\x90\x90\x90\x90/g" $DRIVER
done
#include <stdio.h>
#include <stdlib.h>
#include "ros/ros.h"
#include "std_msgs/MultiArrayLayout.h"
#include "std_msgs/MultiArrayDimension.h"
#include "std_msgs/Int32MultiArray.h"
#!/usr/bin/python
import sys #for cmd line argv
#take command line args as the input string
input_string = sys.argv
#remove the program name from the argv list
input_string.pop(0)
#convert to google friendly url (with + replacing spaces)
@alexsleat
alexsleat / fuzzyTime_num.py
Created November 13, 2011 14:25
Python Fuzzy Clock, more info at alexsleat.co.uk
#!/usr/bin/python
from time import gmtime, strftime
#Get minutes
time_min = strftime("%M", gmtime())
#Get hour, as int
time_hour = int(strftime("%H", gmtime()))
#round minutes to nearest 5, return as int