Skip to content

Instantly share code, notes, and snippets.

View PierrickKoch's full-sized avatar

Pierrick Koch PierrickKoch

View GitHub Profile
@PierrickKoch
PierrickKoch / wifibot.py
Created February 23, 2012 05:53
wifibot morse builder script
from morse.builder import *
# Append robot to the scene
robot = Robot('Wifibot.blend')
robot.name = 'wifibot'
# Append an actuator
motion = Actuator('v_omega')
motion.name = 'motion'
motion.translate(z = 0.3)
@PierrickKoch
PierrickKoch / segway2.py
Created February 27, 2012 05:29
Morse Segway with motion controller v2
from morse.builder import *
# Add the Segway RMP 400
robot = Robot('segwayrmp400')
# Add a motion controler (v,w)
motion = Actuator('v_omega')
motion.name = 'cmd_vel'
motion.translate(z = 0.3)
robot.append(motion)
#!/bin/sh
names="gama gama.wiki gama.models"
sec=$(date +%s)
for name in $names; do
echo "svn to git for $name"
cd ~/sandbox
mkdir tmp.${name}.old.git.${sec}
cd ~/sandbox/svn.${name}
svn cleanup
@PierrickKoch
PierrickKoch / replace.sh
Created April 4, 2012 04:47
new bge modules
#!/bin/sh
replace() {
old=$1
new=$2
files=$(grep "$old" . -lr --exclude="*.pyc" --exclude="*.blend" \
--exclude="$0" --exclude-dir="build" --exclude-dir=".git")
for f in $files; do
sed -i "s/import $old/import bge/g" $f
@PierrickKoch
PierrickKoch / rostest.sh
Created May 7, 2012 06:19
Test ROS topic
#!/bin/sh
testresult=$(mktemp)
roscore &
rospid=$!
sleep 5 # TODO find better way to wait roscore init (no flush stdout...)
echo "
###############################################################################
Start Testing
@PierrickKoch
PierrickKoch / Wander.java
Created May 24, 2012 04:15
Wander updated for ROSJava Revision: e417224a6150 (02-05-2012)
/*
* build as ../gradlew installApp
* run as ./build/install/proteus_java/bin/proteus_java proteus.Wander base_scan:=/beego/scan cmd_vel:=/beego/velocity
*/
package proteus;
import org.apache.commons.logging.Log;
import org.ros.message.MessageListener;
import org.ros.concurrent.CancellableLoop;
@PierrickKoch
PierrickKoch / wander.html
Created June 18, 2012 11:24
ros wander js (soluce)
<!doctype html>
<html>
<head>
<title>wander rosjs</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="ros.js"></script>
<script type="text/javascript">
(function () { // [onload]
Array.prototype.sum = function (begin, end) {
@PierrickKoch
PierrickKoch / web2png.py
Created July 19, 2012 04:50
Takes snapshot of full webpages using Webkit and Qt4
#!/usr/bin/env python
"""
Takes snapshot of full webpages using Webkit and Qt4
usage:
python web2png.py URL [FILE]
example:
python web2png.py http://python.org out.png
see:
http://riverbankcomputing.com/static/Docs/PyQt4/html/qwebview.html#load
@PierrickKoch
PierrickKoch / test.py
Created December 12, 2012 13:07
MORSE builder script to test memoryview with ROS camera and depth camera sensors
from morse.builder import *
# EDIT HERE
depth = False # edit {True, False} for {depth, video} camera
memoryview = False # edit {True, False} for {memoryview, bytes}
# Append ATRV robot to the scene
atrv = Robot('atrv')
# Append an actuator
@PierrickKoch
PierrickKoch / HOWTO.bash
Created December 12, 2012 13:26
HOWTO Install MORSE w/ Depth camera support for ROS Fuerte
# HOWTO Install MORSE w/ Depth camera support for ROS Fuerte
sudo apt-get install ros-fuerte-desktop-full python-rosinstall python-rosdep cmake
cd ~/work
wget http://python.org/ftp/python/3.3.0/Python-3.3.0.tgz
tar -xzvf Python-3.3.0.tgz
cd Python-3.3.0
./configure