Most used GIT commands (at least for me :) )

git log
Shows the log of all previous commits of the selected branch

git log –stat
Shows some statistics about the commits of the active branch

git log –graph
Shows information about the branch history of a branch or commit

checkout COMMITID
Jumps to the selected commit with the given ID

Jumps to the selected commit with the given ID

Compares commit with ID COMMITID1 against commit with ID COMMITID2

git add FILENAME
Stages the named file

git commit
Commits the staged files to the repository

git commit -m “MESSAGE

Adds the message to the staged commit

git show COMMITID
Compares a commit against its parent

git branch
Shows all branches of the current repository

git branch BRANCHNAME
Created new branch in the repository with the given name

git branch -d BRANCHNAME
Deletes the branch with name BRANCHNAME from the repository

Merges the branches with name BRANCHNAME1 and BRANCHNAME2

git reset –hard
Throws all uncomitted changes away

git remote add REMOTENAME GITURL

git remote -v
Outputs additional information to the remotes

Pushed the changes to the remote

Pulls the changes from the remote

git fetch
Updates the origin/master branch from the remote repository

git pull origin master
Same as: 1. git fetch origin 2. git merge master master/origin

NVIDIA driver and Ubuntu: How to fix blackscreen after kernel update!

If you use the Nvidia driver and updated your kernel, it’s possible that you run into a blackscreen after boot.
There are two solutions to solve this issue:

Solution 1:
1. Boot into GRUB by pressing “shift” during boot.
2. Edit the starting command by pressing “e“.
3. Add “nomodeset” before “quiet splash“.
4. Press “Ctrl-x” to boot.
You should now see the GUI and be able to reinstall the Nvidia driver correctly.
5. Disable lightdm and reinstall the Nvidia driver.

Solution 2:
If the solution above didn’t work for you, try these steps:
1. Boot into GRUB by pressing shift during boot.
2. Chose the recovery mode.
3. Choose “root” to go into the root shell
4. To leave read only mode enter “mount -o remount,rw /”
5. Remove all installed nvidia packages using “sudo apt-get remove –purge nvidia-*”
6. Continue following the stept mentioned at solution 1.

NVIDIA and libfreenect2: How to fix undefined reference to ‘clReleaseDevice’ and ‘clRetainDevice’

Because AMD and Nvidia provide different versions of the OpenCL header, the following error can occur compiling a program using libfreenect2 and a Nvidia GPU.

/usr/local/lib/ undefined reference to `clReleaseDevice'
/usr/local/lib/ undefined reference to `clRetainDevice'

This error can be fixed by installing:

sudo apt-get install ocl-icd-opencl-dev

After the installation, the undefined reference should be fixed.

Update: If the problem occurs compiling a catkin package, it might be solved by reinitializing the catkin workspace.

RaspberryPi: Autoconnect to WLAN (WPA2)

In most applications in robotic it’s necessary to get rid of the ethernet cable to move the raspberry free and battery powered. Luckily the Raspberry PI supports a variety of USB-WLAN-Sticks like the TP-Link TL-WN821N. In this tutorial I describe how you setup the WLAN connection that the RPi auto connects to your WLAN after you switch on the power.
Continue reading