Skip to content

Instantly share code, notes, and snippets.

View YuehChuan's full-sized avatar

YuehChuan YuehChuan

  • Taiwan
  • 21:21 (UTC +08:00)
View GitHub Profile
@YuehChuan
YuehChuan / CMakeLists.txt
Created April 21, 2021 13:55 — forked from tdenewiler/CMakeLists.txt
ROS Synchronization Example
cmake_minimum_required(VERSION 2.8.3)
project(sync_example)
find_package(catkin REQUIRED COMPONENTS message_filters roscpp sensor_msgs)
catkin_package(
CATKIN_DEPENDS message_filters roscpp sensor_msgs
)
include_directories(${catkin_INCLUDE_DIRS})
@YuehChuan
YuehChuan / imagenet_normalization.py
Created November 10, 2020 07:29 — forked from pmeier/imagenet_normalization.py
Calculation of ImageNet z-score parameters
import argparse
import multiprocessing
from math import ceil
import torch
from torch.utils import data
from torchvision import datasets, transforms
class FiniteRandomSampler(data.Sampler):
def __init__(self, data_source, num_samples):
@YuehChuan
YuehChuan / PyTorch 入門最速傳說.ipynb
Created July 10, 2020 07:53 — forked from remorsecs/PyTorch 入門最速傳說.ipynb
本文目標是讓沒寫過 PyTorch 的讀者成為 PyTorch 新手 (?)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@YuehChuan
YuehChuan / vsb-fault-detection.md
Created December 11, 2019 22:17 — forked from roblesch/vsb-fault-detection.md
VSB Power Line Fault Detection Notes
@YuehChuan
YuehChuan / test_spinner.cpp
Created June 26, 2018 17:41 — forked from bgromov/test_spinner.cpp
Demonstrates the use of AsyncSpinner and custom callback queue in ROS
#include <ros/ros.h>
#include <ros/spinner.h>
#include <ros/callback_queue.h>
#include <std_msgs/Empty.h>
#include <std_msgs/Bool.h>
boost::shared_ptr<ros::AsyncSpinner> g_spinner;
bool g_enable = false;
@YuehChuan
YuehChuan / pytorch-on-duckiebot.md
Created October 12, 2017 05:04 — forked from fgolemo/pytorch-on-duckiebot.md
Installing/compiling PyTorch on Duckiebot - tutorial v1

How to install PyTorch on the Duckiebot

PyTorch is a Python deep learning library that's currently gaining a lot of traction, because it's a lot easier to debug and prototype (compared to TensorFlow / Theano).

To install PyTorch on the Duckietbot you have to compile it from source, because there is no pro-compiled binary for ARMv7 / ARMhf available. This guid will walk you through the required steps.

Step 1: install dependencies and clone repository

First you need to install some additional packages. You might already have installed. If you do, that's not a problem.

@YuehChuan
YuehChuan / pytorch-on-duckiebot.md
Created October 12, 2017 05:04 — forked from fgolemo/pytorch-on-duckiebot.md
Installing/compiling PyTorch on Duckiebot - tutorial v1

How to install PyTorch on the Duckiebot

PyTorch is a Python deep learning library that's currently gaining a lot of traction, because it's a lot easier to debug and prototype (compared to TensorFlow / Theano).

To install PyTorch on the Duckietbot you have to compile it from source, because there is no pro-compiled binary for ARMv7 / ARMhf available. This guid will walk you through the required steps.

Step 1: install dependencies and clone repository

First you need to install some additional packages. You might already have installed. If you do, that's not a problem.

@YuehChuan
YuehChuan / zeromq-vs-redis.md
Created July 20, 2017 12:25 — forked from hmartiro/zeromq-vs-redis.md
Comparison of ZeroMQ and Redis for a robot control platform

ZeroMQ vs Redis

This document is research for the selection of a communication platform for robot-net.

Goal

The purpose of this component is to enable rapid, reliable, and elegant communication between the various nodes of the network, including controllers, sensors, and actuators (robot drivers). It will act as the core of robot-net to create a standardized infrastructure for robot control.

Requirements:

# Python3.5 (Raspbian 8 comes with Python3.4)
cd ~ #or somewhere
sudo apt-get purge python3
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz
tar -xvf Python-3.5.2.tar.xz
cd Python-3.5.2
./configure
make
sudo make install

RTAI installation for ubuntu 14.04

Preparation

download and unzip

cd /usr/src
curl -L https://www.rtai.org/userfiles/downloads/RTAI/rtai-4.1.tar.bz2 | tar xj
curl -L https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.10.32.tar.xz | tar xJ
curl -L http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.32-saucy/linux-image-3.10.32-031032-generic_3.10.32-031032.201402221635_amd64.deb -o linux-image-3.10.32-generic-amd64.deb