This file contains hidden or 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
import numpy as np | |
def unwrap_theta(theta: float, prev_theta: float, range: float) -> float: | |
""" | |
Description | |
------------ | |
unwrap_theta removes a discontinuous jump in theta by comparing it to prev_theta. | |
If |theta - \prev_theta| < (range/2), then we don't do anything to theta, since it | |
is within the correct range of prev_theta. Otherwise, if |
This file contains hidden or 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
#include <iostream> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <linux/ioctl.h> | |
#include <linux/types.h> | |
#include <linux/v4l2-common.h> | |
#include <linux/v4l2-controls.h> | |
#include <linux/videodev2.h> | |
#include <fcntl.h> | |
#include <unistd.h> |
This file contains hidden or 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
cmake_minimum_required(VERSION 3.5.1) | |
project(matrix_demo) | |
find_package(catkin REQUIRED | |
rospy | |
roscpp | |
std_msgs | |
) | |
include_directories( |
This file contains hidden or 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
import wave | |
""" | |
Generator of frames of byte strings of an audio file. | |
Arguments: | |
path (string): .wav file path. | |
frame_length_sec (float): length of frame in seconds. Common values are in the range [0.01,0.05]. | |
frame_overlap (float): number between 0 (inclusive) and 1 (exclusive) representing the fraction of overlap between consecutive frames. Note | |
that the generator will get stuck if you input an overlap of 1. |