Skip to content

Instantly share code, notes, and snippets.

Avatar

Robin Chen RobinCPC

View GitHub Profile
View wine_setup.md

Install Wine with Mono & Gecko

Note: Install as normal user, need to add sudo on most of command

1. Setup PPA

sudo dpkg --add-architecture i386
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
# for Ubuntu 16.04
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'
@RobinCPC
RobinCPC / core_webgl_threejs_pcl.py
Last active Apr 1, 2020
Render point cloud in PythonOCC WebGL
View core_webgl_threejs_pcl.py
#! /usr/bin/env python
from OCC.Display.WebGl.flask_server import *
import random
import time
import os
@app.route("/")
@RobinCPC
RobinCPC / doxygen_deploy_issue.md
Last active Sep 3, 2021
Doxygen deploy in gh-pages and some page can't be seen (content security policy)
View doxygen_deploy_issue.md

In NexMotion API repo, some source file start with capital char (such as NexMotion.h). Doxygen will generate Corresponding html file with underscore (such as _nex_motion_8h.html).

By default, github pages attempt to use Jekyll handles file name with underscores differently, so cause some unsual content policy security error To prevent it, create a file called .nojekyll in the root of your repository / site folder.

# Need to create a .nojekyll file to allow filenames starting with an underscore
# to be seen on the gh-pages site. Therefore creating an empty .nojekyll file.
# Presumably this is only needed when the SHORT_NAMES option in Doxygen is set
@RobinCPC
RobinCPC / local_jupyter_ec2_remote.md
Last active Sep 3, 2021
Login local jupyter notebook through AWS EC2 instance by ssh reverse tunnel
View local_jupyter_ec2_remote.md

Open Inbound port (such as 19999) for jupyter notebook

open ssh reverser tunnerl from local (8888 for jupyter port) to ec2 (19999)

sudo ssh -i "ebs-test.pem" -N -R 19999:localhost:8888 ubuntu@ec2-34-XXX-YYY-ZZZ.us-west-2.compute.amazonaws.com

Set up Jupyter notebook to remote login

(base) C:\workspace\NexMotion-Python_API>jupyter notebook --generate-config
# Writing default config to: C:\Users\RobinChen\.jupyter\jupyter_notebook_config.py
@RobinCPC
RobinCPC / material_robomaker.md
Created Jun 10, 2019
Material about AWS robomaker
View material_robomaker.md

Getting Start: https://docs.aws.amazon.com/robomaker/latest/dg/getting-started.html

To Build with new robot application: For setting IAM role, policy, S3, please follow the link (srep 1-19) to get full acess (aws guide did not work well 04/17/2019): https://husarion.com/tutorials/other-tutorials/run-ros-tutorials-using-aws-robomaker/#setting-up-husarion-ros-tutorial-on-aws

For create develop environment, follow develop guide (step 3 just configure ENvironment): https://docs.aws.amazon.com/robomaker/latest/dg/gs-build.html

View babun-install.md

Babun Setup for Python Developers

Babun is “A Windows shell you will love!”

It's a turn-key CygWin distribution for developers and is very easy to install and maintain. For a Python developer, Babun allows working in an almost-POSIX environment – with some limitation, of course. This causes less friction when handling FOSS projects that are often biased towards a standard Linux environment, e.g. by using shell scripts for boot-strapping and things like that.

@RobinCPC
RobinCPC / ctag_vim_in_Windows.markdown
Last active May 14, 2020
How to use vim with ctags (tagbar plugin) in wondows systems
View ctag_vim_in_Windows.markdown

Frist, need to have vim and install tagbar plugin in windows system.

  • Simplely, I install git and use git bash with vim.
  • Construct vim setting in HOME directory (~/.vimrc).
	Could use `$ echo $HOME` to find out HOME directory set by git.

Second, add ctags in PATH which could find by git bash.

  • Download ctags.zip (pre-complied binary file inside) from ctags website.
  • Put ctags.exe in a directory, whose execution path is recognized in Windows (for me: GIT_DIR/usr/bin/).
@RobinCPC
RobinCPC / [ROS] Create_Workspace_and_Add_URDF.md
Last active Sep 28, 2021
Record how to create Catkin Workspace and add urdf package
View [ROS] Create_Workspace_and_Add_URDF.md

[ROS] Create Catkin Workspace and add urdf package

Assume you already install ros

  • Frist create package and add urdf
    $ mkdir catkin_ws_PMCurdf
 $ cd catkin_ws_PMCurdf/
@RobinCPC
RobinCPC / gdb_in_vim.md
Last active Jun 4, 2021
How to use GDB in Vim
View gdb_in_vim.md

How to use ConqueGDB in Vim

Install ConqueGDB in Vim

Debug C/C++:

@RobinCPC
RobinCPC / STL translation for ROS.md
Last active Apr 11, 2016
record how to create URDF from PMC step file
View STL translation for ROS.md

[ROS] How to transform PMC robot step file to STL for rviz

  1. load step to solidworks
  2. move joint rotation center to the origin of world
    • moving distance may depend on DH table
    • ROS will move parts to desired position according ot URDF file
  3. select needed parts (each joint may contain a lot of small part: screw or plate)
  4. save as... STL
  5. in advance option: