Skip to content

Instantly share code, notes, and snippets.

View drofp's full-sized avatar
📺
e-waste harvesting

Don Robert Pornaras drofp

📺
e-waste harvesting
  • Google LLC
  • San Jose, CA
  • 00:47 (UTC -08:00)
View GitHub Profile
@drofp
drofp / localization-launch.launch
Created July 29, 2018 21:19
Because Mitchell is too lazy to write a launch file.
<launch>
<include file="$(find velodyne_puck_decoder)/launch/velodyne_puck_decoder_nodelet.launch">
<node name="segmenter_node" pkg="segmenter_node.cc" type="node_camera.py" output="screen"> </node>
</launch>
@drofp
drofp / GpsUtils.cs
Created August 6, 2018 23:00 — forked from govert/GpsUtils.cs
Convert WGS-84 geodetic locations (GPS readings) to Cartesian coordinates in a local tangent plane (Geodetic to ECEF to ENU)
using System;
using System.Diagnostics;
using static System.Math;
// Some helpers for converting GPS readings from the WGS84 geodetic system to a local North-East-Up cartesian axis.
// The implementation here is according to the paper:
// "Conversion of Geodetic coordinates to the Local Tangent Plane" Version 2.01.
// "The basic reference for this paper is J.Farrell & M.Barth 'The Global Positioning System & Inertial Navigation'"
// Also helpful is Wikipedia: http://en.wikipedia.org/wiki/Geodetic_datum
@drofp
drofp / ros_odometry_publisher_example.py
Created August 8, 2018 04:47 — forked from atotto/ros_odometry_publisher_example.py
Publishing Odometry Information over ROS (python)
#!/usr/bin/env python
import math
from math import sin, cos, pi
import rospy
import tf
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3
@drofp
drofp / overloaded.py
Created October 6, 2018 04:35 — forked from greezybacon/overloaded.py
Python overloaded method decorator
class overloaded(object):
"""
Simple (well, simple is relative) tool to allow for overloaded methods
in Python. Overloaded methods are methods with the same name that
receive different types of arguments. Statically typed languages such as
C++ support overloaded methods at compile time; however, dynamically
typed languages such as Python cannot support such methods, because no
type hints can be specified in the function definition.
This class operates as a decorator and allows for a cascaded design of
@drofp
drofp / Github Webhook Tutorial.md
Created October 6, 2018 07:17 — forked from jagrosh/Github Webhook Tutorial.md
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
# Append this to get coloring in Ubuntu terminal, including git branch label+color
# NOTE: The last line (unset ...) may not be necessary
# Show git branch name
force_color_prompt=yes
color_prompt=yes
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
@drofp
drofp / usb_cam-test.launch
Created November 11, 2018 23:59
To get usb_cam to work with darknet_ros
<launch>
<node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/video1" />
<param name="image_width" value="640" />
<param name="image_height" value="480" />
<param name="pixel_format" value="yuyv" />
<param name="camera_frame_id" value="camera/rgb" />
<param name="io_method" value="mmap"/>
<remap from="/usb_cam/image_raw" to="/camera/rgb/image_raw"/>
</node>
@drofp
drofp / test_geodesy_module.py
Created December 2, 2018 11:50
Attempt at test suite in ros
#!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import unittest
@drofp
drofp / GraphPanel
Created December 8, 2018 11:45 — forked from roooodcastro/GraphPanel.java
A simple Swing component to draw a Graph over a regular JPanel. Features a grid, customizable amount of hatch marks, axis labels,checking for minimum and maximum value to label correctly the Y-axis and customizable padding and label padding. Based on "Hovercraft Full Of Eels"'s answer on StackOverflow (http://stackoverflow.com/questions/8693342/…
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.RenderingHints;
import java.awt.Stroke;
import java.util.ArrayList;
@drofp
drofp / manual-uninstall-paragon-ntfs.sh
Created March 11, 2019 06:29 — forked from guycalledseven/manual-uninstall-paragon-ntfs.sh
Manually remove Paragon NTFS v15 leftovers MacOS
# after appcleaner does his magic, do this
sudo rm -rf "/Library/Application Support/Paragon Software/"
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/