Skip to content

Instantly share code, notes, and snippets.

View awesomebytes's full-sized avatar

Sam Pfeiffer awesomebytes

View GitHub Profile
@awesomebytes
awesomebytes / publisher_test.py
Created December 3, 2014 11:16
Simple header publisher
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 03/12/14
@author: Sam Pfeiffer
A simple publisher of Header messages
with seq numbers increasing.
@awesomebytes
awesomebytes / subscriber_tests.py
Created December 3, 2014 11:16
Subscriber tests for a publisher with queue 1
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 03/12/14
@author: Sam Pfeiffer
"""
import rospy
#!/bin/bash
PIP_PKG=$1
if [ -z $PIP_PKG ]; then
echo "Usage is $0 python_pkg_name"
exit -1
fi
INSTALL_DIR=`mktemp -d`
cd $INSTALL_DIR
DEB_NAME="pal-python-"`echo $PIP_PKG | sed s/_/-/`
@awesomebytes
awesomebytes / look_hand.py
Created May 8, 2015 14:54
look at own hand tiago
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 5/8/15
@author: sampfeiffer
look_hand.py contains...
"""
__author__ = 'sampfeiffer'
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 5/22/15
@author: sampfeiffer
sphere.py contains...
"""
__author__ = 'sampfeiffer'
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Based on the version made:
Created on April 2 15:20:00 2014
This one is created 21/05/15
@author: Sam Pfeiffer
"""
from moveit_commander import RobotCommander, PlanningSceneInterface #, roscpp_initialize, roscpp_shutdown
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 5/25/15
@author: sampfeiffer
interactive_grasp_tester.py contains...
"""
__author__ = 'sampfeiffer'
How to get uris to download debians of packages (including already installed ones):
apt-get --print-uris -y download LIBRARYNAME
With:
apt-cache depends LIBRARYNAME
You'll get all the libraries that depends on.
Example:
apt-get --print-uris -y download libgps20
def msg_to_list(message):
"""
Given a message, e.g.: Vector3(x=0.0, y=0.0, z=0.0)
returns the list of it's slots, e.g.: [0.0, 0.0, 0.0]
:param message: some message that we want it's slots into a list
:return: the slots as a list
"""
output_list = []
for slot in message.__slots__:
output_list.append(message.__getattribute__(slot))
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 6/5/15
@author: sampfeiffer
create_drc_web.py contains...
"""
__author__ = 'sampfeiffer'