Skip to content

Instantly share code, notes, and snippets.

View harderthan's full-sized avatar
🕴️
I

brewmaster harderthan

🕴️
I
View GitHub Profile
@harderthan
harderthan / configure_file.CMakeLists.txt
Last active September 19, 2022 12:53
cmake configure_file() example
cmake_minimum_required(VERSION 3.16.3)
project(configure-file-example)
# Configure file, export the environment variable.
set(FOO_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/${PATH_YOU_WANT}")
configure_file(config/foo.h.in foo.h @ONLY)
# Libraries or excutables
# ...
@harderthan
harderthan / link_tutorial.xacro
Last active September 19, 2022 14:12
URDF Link Tutorial
@harderthan
harderthan / gist:ae37356501c65b0eb7f880ab58f8acf1
Created October 8, 2019 05:00
Xorg.conf file for TurboVNC
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 390.116 (buildmeister@swio-display-x64-rhel04-14) Sun Jan 27 07:47:55 PST 2019
Section "DRI"
Mode 0666
EndSection
#Section "ServerLayout"
# Identifier "Layout0"
# Screen 0 "Screen0"
@harderthan
harderthan / README.md
Created February 14, 2019 03:59
ROS Python Tutorial for Beginners
#include <opencv2/core/core.hpp>
#include <pcl/common/transforms.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <iostream>
void Processing(const Eigen::Affine3f &transformation_matrix, const pcl::PointCloud<pcl::PointXYZ> &origin_point_cloud, const cv::Mat &projection_matrix, const cv::Mat &cameraMat, const cv::Size &image_size, cv::Point2f &result, bool log_flag = true);
void Processing(const Eigen::Affine3f &transformation_matrix, const pcl::PointCloud<pcl::PointXYZ> &origin_point_cloud, const cv::Mat &projection_matrix, const cv::Mat &cameraMat, const cv::Size &image_size, cv::Point2f &result, bool log_flag){
// Transfrom Points with Parameters
pcl::PointCloud<pcl::PointXYZ> transform_point_cloud;
@harderthan
harderthan / gist:e30f3dbeb98d4e5e3b67ba9edd1d04b9
Created September 4, 2018 12:39
Draw Lane on The image with Opencv
// Draw Lane on The image
cv::Mat laneOverlay = drawImg(cv::Rect(0,0,drawImg.cols, drawImg.rows)).clone();
lane_polylines.push_back(cv::Point(topic_lane[0], topic_lane[1]));
lane_polylines.push_back(cv::Point(topic_lane[2], topic_lane[3]));
lane_polylines.push_back(cv::Point(topic_lane[6], topic_lane[7]));
lane_polylines.push_back(cv::Point(topic_lane[4], topic_lane[5]));
cv::fillConvexPoly(laneOverlay, lane_polylines, cv::Scalar(0, 255, 0), 8);
double alpha = 0.3;
cv::addWeighted(laneOverlay, alpha, drawImg, 1 - alpha, 0, drawImg);
@harderthan
harderthan / CMakeLists.txt
Last active July 30, 2018 07:57
TensorRT_with-ROS_CMakeLists
# by Kwanghoe, [email protected]
#-------------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8.3)
project(rt_example)
add_compile_options(-std=c++11)
#-------------------------------------------------------------------------------
# Find Cuda and Additional packages
if(VIBRANTE)
set(ARCH_DIR "aarch64-linux")
@harderthan
harderthan / CMakeLists_sample.txt
Last active November 27, 2018 02:10
CMakeLists 예제
cmake_minimum_required(VERSION x.x.x FATAL_ERROR)
# Project에 필요한 최소한의 cmake 버전을 명시
project(PackageName)
# Project 이름을 지정, 여기서 패키지 이름은 ${PROJECT_NAME} 변수에 저장
find_package(Library_Name REQUIRED)
# 추가할 Library Package를 지정
set(Var_Name Val)
@harderthan
harderthan / mount_nas.sh
Created April 4, 2018 02:03
Mount a Nas directory on ubuntu
export nas_path=$1
export username=$2
export password=$3
export target_path=$4
sudo mount -t cifs $nas_path -o username=$username,password=$password,rw,nounix,iocharset=utf8,file_mode=0644,dir_mode=0755,uid=1000,gid=1000,ver=1.0 $target_path