Friday, October 11, 2013

GNU for ARM bare metal toolchain installation on Ubuntu 12.04 LTS

Hi all.
Here I'm writing about installation of GNU arm-eabi toolchain on Ubuntu 12.04.

1. Dependency install (x64 system, do this with care)

 First, you need to install dependencies below. If you are using 64-bit Ubuntu, you should install ia32-libs for using GNU-arm binary for 32-bit compatibility. Also, several utilities for the future use, install following packages.

sudo apt-get install python-serial python-argparse openocd \
    flex bison libncurses5-dev autoconf texinfo build-essential \
    libftdi-dev libtool zlib1g-dev genromfs ia32-libs git-core wget

2. Toolchain download 

I'm assuming that you will install toolchain in your home directory.
I prefer to download built binaries because there is no specific reason for
compiling compiler on the machine (also takes long time!).

You can select whatever version from https://launchpad.net/gcc-arm-embedded/
But this is know-to-work version in my case.

I'm using "axel" for faster download. It makes several download task simultaneously, utilizing multi session download.

sudo apt-get axel
cd ~
axel https://launchpad.net/gcc-arm-embedded/4.6/4.6-2012-q2-update/+download/gcc-arm-none-eabi-4_6-2012q2-20120614.tar.bz2
tar -vjxf gcc-arm-none-eabi-4_6-2012q2-20120614.tar.bz2
exportline="export PATH=$HOME/gcc-arm-none-eabi-4_6-2012q2/bin:\$PATH"
if grep -Fxq "$exportline" ~/.bashrc; then echo nothing to do ; else echo $exportline >> ~/.bashrc; fi
source ~/.bashrc

3.Installation check
$ arm-none-eabi-gcc --version

You should see following message.

arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.6.2 20120613 (release) [ARM/embedded-4_6-branch revision 188521]
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Friday, October 4, 2013

About Speeded Up Robust Features (SURF)

I recently started to implementing SURF for my visual SLAM project.
During exploration of algorithm implementation, I found many projects that well implements the original idea by Herbert Bay et al.
Whatever modern feature descriptor you are using, most scale-invariant feature descriptors output sequence of floating numbers that encodes given image patch.
Along with the vector of descriptors, scale, detected octave are also important variables for the feature.

In this article, I'll explain what is the *scale*.

The scale is a scalar variable describes the width of Gaussian kernel which roughly gives an idea of distance of feature.

In case the OpenCV, the scale can be obtained as follows.
The KeyPoint structure, let say kpt, has a member variable 'size' which the number represents the size of the patch. To obtain the filter size, use std::sqrt(kpt.size).

In the original paper, the smallest filter size is 9x9. So the scale will be

   scale = 1.2 * ( filter_size / 9 )

[Links]

  1. http://experienceopencv.blogspot.kr/2011/01/surf-detector.html
  2. http://www.computerrobotvision.org/2010/tutorial_day/tam_surf_rev3.pdf

Thursday, May 30, 2013

[git] Move git repository


$ git remote add <newreponame> <new_repository_URL>
$ git push <newreponame> master
$ git remote rm origin
$ vi .git/config (rename newreponame to origin).

That's all.

References
[1] http://stackoverflow.com/questions/1484648/how-to-migrate-git-repository-from-one-server-to-a-new-one

Tuesday, May 28, 2013

[git] Show all changed files between two commits/branches

It is useful to see only the name of the files changed.
But $ git diff, will give you a line-by-line result of changes.

Here is how.
$ git diff --name-only SHA1 SHA2
or
$ git diff --name-only <branch_name>

But this will be better
$ git diff --name-status

Good luck!

References
[1] http://stackoverflow.com/questions/1552340/git-show-all-changed-files-between-two-commits

Saturday, May 25, 2013

Brushless gimbal

This blog post describes bunch of information on brushless gimbal.
It will be updated when I found something.

Gimbal frame design
3D Printable : http://www.rcgroups.com/forums/showthread.php?t=1864420

News
Maxon motor : http://www.maxonmotor.com.au/maxon/view/application/PHOTOHIGHER-AB

Company
Photohigher : http://www.photohigher.co.nz/products/

Brushless motor operation principals

Brushless motor (synchronous motor) is interesting motor familiy.
But, the operation principal is bit hard to understand.
So I here describe some useful animation of those kind of motors for YOU.

Brushless Motor : This motor is designed to rotate permanent maget by commuting two leads.
http://educypedia.karadimov.info/library/4-pole-bldc-motor031102.swf


Synchronous Motor : This motor is designed to rotate permanent magnet by commuting
leads with sine wave.
http://educypedia.karadimov.info/library/Synchronous_Motor_Principle.swf







Lenz Law


References

Tuesday, May 21, 2013

Drones on KBS "World Today" show

Will drone ruin your backyard?
I'm also worrying about this technology can be used as a weapon or secret surveillance.
A couple of weeks ago KBS sent a crew from their "World Today" news show to the US to report on the current state of civilian drone technology. Andreas and I demoed both fixed wing and multirotor craft, and took them for an FPV ride. They also talked to 3DRobotics and the ever-awesome Roswell Flight Test Crew. Lawyers, Protesters, Law Enforcement and Activists are also featured, blessing the Korean population with their views on the current state of American dronism.
The broadcast is of course in Korean. This clip from "World Today" is used by permission of KBS.


Reference

[1] http://eastbay-rc.blogspot.com.au/2013/05/eastbay-rc-on-kbs-world-today-show.html

New PX4 build system HOWTO

PX4 team has updated build system to separate NuttX and PX4 apps.
If you check out recent PX4 code from repository, you can see changed PX4 build command by
$ make help
1. Build NuttX only
$ make archives
2. Build PX4IO and PX4FMU
$ make   (This will build PX4IO and PX4FMU too)
$ make px4fmu_default   (This will build only PX4FMU)
3. Upload firmware to the board
$ make upload px4fmu_default   (This will upload PX4FMU firmware)

[git] Working with git by forking

Github is very nice place to collaborate with other programmers.
This post describe how you update to recent code from original project to your project forked from main project.

1. Fork


Fork can be done by press "fork" in github website of target project.
The fork copies current state of target project to your account.
Assume that you have an account "youraccount" and target project name is "targetproject".
If you fork the target project, you can clone the project by following
$ git clone https://github.com/youraccount/targetproject.git
Actually, it was cloned by
$ git clone https://github.com/targetproject/targetproject.git 
So now you can modify the forked project whatever you want.

2. Update from original project


Sometimes original project maintainer adds some features to targetproject repository.
Update can be done as follows. First of all, add targetproject repository as a remote.

$ git remote add upstream http://github.com/targetproject/targetproject.git
This will add original repository as a remote in current (forked) repository.
You can check current remote repository by following.
$ git remote -v

3. Retrieve updated code from upstream

$ git fetch upstream (This will download the code updated.)
$ git branch -va       (This will shows available branches.)

4. Merge


First checkout master to make current branch to head of our forked project
$ git checkout master
This will merge original head to our master.
$ git merge upstream/master 

References


[1] https://help.github.com/articles/syncing-a-fork
[2] http://gun.io/blog/how-to-github-fork-branch-and-pull-request/