Skip to content

Instantly share code, notes, and snippets.

@moshanATucsd
moshanATucsd / get_ellipse.py
Created May 15, 2019 20:51 — forked from Gabriel-p/get_ellipse.py
Generate an ellipse through the MVEE method
import numpy as np
import numpy.linalg as la
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
# import time
# http://stackoverflow.com/questions/14016898/port-matlab-bounding-ellipsoid-code-to-python
# http://stackoverflow.com/questions/1768197/bounding-ellipse/1768440#1768440
@moshanATucsd
moshanATucsd / plot_confidence_ellipse.py
Created October 4, 2018 05:07 — forked from CarstenSchelp/plot_confidence_ellipse.py
A function to plot the confidence ellipse of the covariance of a 2D dataset. Uses matplotlib.
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
import matplotlib.transforms as transforms
def confidence_ellipse(x, y, ax, n_std=3, **kwargs):
"""
Create a plot of the covariation confidence ellipse op `x` and `y`
Parameters
@moshanATucsd
moshanATucsd / odom_to_path.py
Created August 16, 2018 03:05 — forked from kartikmohta/odom_to_path.py
ROS node which accumulates nav_msgs/Odometry messages into a nav_msgs/Path message
#!/usr/bin/env python
import rospy
from nav_msgs.msg import Odometry, Path
from geometry_msgs.msg import PoseStamped
class OdomToPath:
def __init__(self):
self.path_pub = rospy.Publisher('~path', Path, latch=True, queue_size=10)
self.odom_sub = rospy.Subscriber('~odom', Odometry, self.odom_cb, queue_size=10)