Skip to content

Instantly share code, notes, and snippets.

import cv2
import os
import glob
#
image_folder = './Saved'
video_name = 'video.avi'
fourcc = cv2.VideoWriter_fourcc(*'MP4V')
images = []
for img in sorted(glob.glob(os.path.join(image_folder, "*"))):
FROM ros:melodic-ros-core-bionic
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
python3 python3-dev python3-pip \
cmake \
git \
ca-certificates \
@yun-long
yun-long / kalman.py
Created July 9, 2019 08:08
A simple Kalman Filter example
"""
Just A simple example of the Kalman Filter for State Estimation.
Predict:
x_i = a * x_{i-1}
p_i = a * p_{i-1} * a
Update:
@yun-long
yun-long / tf_callback.cpp
Last active June 10, 2019 11:49
tfCallback
/*
A call back function for retriving ROS Transformation. The code hasn't been tested yet.
*/
template <typename T>
void DynamicMotionPrimitives<T>::tfCallback(const tf2_msgs::TFMessage::Ptr & msg)
{
//geometry_msgs::TransformStamped world_to_uav;
bool found_transform = false;
@yun-long
yun-long / quadrotor_dynamics.py
Last active June 4, 2019 13:44
A simple Quadrotor simulation with a PD controller
"""
A simple quadrotor simulatior. The code should self-explanatory.
Reference: Quadcopter Dynamics, Simulation, and Control. by Andrew Gibiansky.
Download: chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/http://andrew.gibiansky.com/downloads/pdf/Quadcopter%20Dynamics,%20Simulation,%20and%20Control.pdf
"""