Robotics 101: Sharpening The Tools -- Shorthands For Environment Setups
Abstract: After month and month working in robotics, I realize that a good knowledge of tooling could save a lot of time when developing things. However, getting to know use what tool and how to setup the tool without anyone's help could be a pain. The tutorials online, at most of the time are written for advanced users. I found out that this is not because of the person that wrote the instructions intend to do it but the lack of explaining things base on the reader also requires a talent.
The goal of this blog is to make things easy and can be a reference for myself. It is a shorthand for the quick setup so if you are expecting something in detail, please don't waste your time on this page.
The items are listed unordered
Emacs Placing all files in one directory
If you don’t want to clutter up your file tree with Emacs’ backup files, you can save them to the system’s “temp
” directory:
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
Install OpenCV with non-free lib
mkdir opencvtemp
cd opencvtemp
git clone https://github.com/opencv/opencv_contrib.git
git clone https://github.com/opencv/opencv.git
cd opencv
git checkout 3.1.0
cd ../opencv_contrib/
git checkout 3.1.0
mkdir -p ../opencv/build
cd ../opencv/build
cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..
make -j5
sudo make install
-j5 means the number of cores used to compile
Heroku CLI
$ heroku login
Existing Git repository
For existing repositories, simply add the heroku
remote
$ heroku git:remote -a <heroku-robot-server>
Tips: for a normal remote head, just use git:remote -a <repourl>
then you can push the same repo to different locals, for example, one is on heroku and the other one is on GitHub.
Git Checkout the master to a certain commit
git reset --hard <commit number>
I found it is very hard that if you want to roll back on git, for example, if you want to delete some commits. Though the force push or revert will help on the GitHub
http://samwize.com/2014/01/15/how-to-remove-a-commit-that-is-already-pushed-to-github/
Use Pycharm to debug ROS python
This is insense http://my.phirobot.com/blog/2013-12-ros_ide_for_python_pycharm.html
modify this launch file
subl ~/.local/share/applications/jetbrains-pycharm-ce.desktop
If you install the professional one:
subl ~/.local/share/applications/jetbrains-pycharm.desktop
the term to: based on your install folder
Exec=bash -i -c "/home/user/applications/pycharm-community-2016.3/bin/pycharm.sh" %f
and done.
Sublime Regular Expression Search
use this to search pin number settings
pin([*\s][*5])