This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Created on 6/5/15 | |
@author: sampfeiffer | |
create_drc_web.py contains... | |
""" | |
__author__ = 'sampfeiffer' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Created on 6/9/15 | |
@author: sampfeiffer | |
top_subprocess.py contains... | |
""" | |
__author__ = 'sampfeiffer' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@author: Sammy Pfeiffer | |
Plot current weights | |
''' | |
import rospy | |
from std_msgs.msg import Float64MultiArray | |
import matplotlib.pyplot as plt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Created on 6/16/15 | |
@author: Sammy Pfeiffer | |
try_get_topic_class.py contains a little test | |
demonstrating that get_topic_class from rostopic | |
does not give the original name of a topic given a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Created on 6/16/15 | |
@author: sampfeiffer | |
test_get_original_topic.py contains... | |
""" | |
__author__ = 'sampfeiffer' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Created on 6/19/15 | |
@author: sampfeiffer | |
exponential_array_creator.py contains... | |
""" | |
__author__ = 'sampfeiffer' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import rospy | |
from sensor_msgs.msg import LaserScan | |
import numpy as np | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKGREEN = '\033[92m' | |
WARNING = '\033[93m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Created on 7/29/15 | |
@author: sampfeiffer | |
shirt_color.py contains... | |
""" | |
__author__ = 'sampfeiffer' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import Image, ImageEnhance | |
def reduce_opacity(im, opacity): | |
"""Returns an image with reduced opacity.""" | |
assert opacity >= 0 and opacity <= 1 | |
if im.mode != 'RGBA': | |
im = im.convert('RGBA') | |
else: | |
im = im.copy() |