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
# Add in ~/.bashrc or ~/.bash_profile | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
RED="\[\033[01;31m\]" | |
YELLOW="\[\033[01;33m\]" | |
GREEN="\[\033[01;32m\]" | |
BLUE="\[\033[01;34m\]" | |
NO_COLOR="\[\033[00m\]" |
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 cv2 | |
import math | |
import os | |
video_files = next(os.walk('./'), (None, None, []))[2] | |
for video in video_files: | |
print(video) | |
cap = cv2.VideoCapture(video) | |
frameRate = cap.get(5) #frame rate |
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
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted | |
# deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted | |
# deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted |
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
export PX4_PATH=~/git_repo/PX4-Autopilot | |
export FLYING_CAR_PATH=~/flyingcar_ws/src | |
source $PX4_PATH/Tools/setup_gazebo.bash $PX4_PATH $PX4_PATH/build/px4_sitl_default | |
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$PX4_PATH | |
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$PX4_PATH/Tools/sitl_gazebo | |
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$FLYING_CAR_PATH |
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
" To install vundle: | |
" $git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
" $vim +PluginInstall +qall | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') |
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
#!/usr/bin/env python | |
# Author: [email protected] | |
# Modifier: Donghee Han, [email protected] | |
import rospy, math | |
from geometry_msgs.msg import Twist | |
from ackermann_msgs.msg import AckermannDriveStamped | |
from ackermann_msgs.msg import AckermannDrive |
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
// CAN Send Example | |
// | |
#include <mcp_can.h> | |
#include <SPI.h> | |
long unsigned int rxId; | |
unsigned char len = 0; | |
unsigned char rxBuf[8]; | |
char msgString[128]; // Array to store serial string |
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
# Typical setup to include TensorFlow. | |
import tensorflow as tf | |
# Make a queue of file names including all the JPEG images files in the relative | |
# image directory. | |
filename_queue = tf.train.string_input_producer( | |
tf.train.match_filenames_once("./images/*.jpg")) | |
# Read an entire image file which is required since they're JPEGs, if the images | |
# are too large they could be split in advance to smaller files or use the Fixed |