Category Archives: Linux

Check if NetworkManager is running on Ubuntu / Debian

Usually you should be using NetworkManager by default (Ubuntu 14.04), just in case you want to be sure, use this command to verify:

dpkg --get-selections | grep network-manager

In case there is some output like:

network-manager					install

it is installed, if there is nothing returned, you are probably using a different network managing daemon.

It would be possible that network manager is installed but inactive. Lets check if its running the hard way:

ps aux | grep network-manager

If thats returning something different than itself, you can be sure using the NetworkManager in Ubuntu / Debian.

Save a list of installed packages on Ubuntu / Debian

In case your laptop crashes during your thesis writing it would be nice to have a list of which packets have been installed.

In Ubuntu / Debian or other some other distros there is a tool called dkpg which offers a small command that can be very helpful:

dpkg --get-selections | grep -v deinstall

Saving that list in your backup routine (e.g. of your /home/ dir) every hour using crontab (linux scheduled tasks)

crontab -e
#follow the dialog and add this line to your crontab
0 1 * * * dpkg --get-selections | grep -v deinstall > ~/packages.txt

Set vim filetype by its file extension

For my project I am constantly edition ROS .launch files, which are some kind of xml.

If I want to use syntax highlighting for better readability, I used to type :set filetype=xml . Which works, but gets kinda annoying in case you’ve got to type it multiple times a day.

In case you want to open .launch files with xml syntax by default, create a file in your .vim-folder:

mkdir $HOME/.vim/ #create the folder in case it doesn't exist yet
vim $HOME/.vim/filetype.vim #open it in vim

Change into insert mode (press i) and paste following code into it:

if exists("did_load_filetypes")
  finish
endif
augroup filetypedetect
  au! BufNewFile,BufRead *.launch setf xml
augroup END

Thats’s it, after that your vim will change:

before and default

before and default

after edits or set filetype=xml

after edits or set filetype=xml

Rasberry Pi Robot with ROS, Xtion and working base_controller teleop

Before I dismantle my little [amazon &title=Raspberry Pi&text=Raspberry Pi] Robot #1 , I wanted to have a little video of its base_controller working together with the turtlebot teleop. It uses the geometry/Twist messages to transmit moving information like a lot of ROS Robots do.

Youtube Video

As you see there is a little acceleration control implemented which makes the robot start smoothly and stop after gently after no key is pressed anymore. In case of emergency its possible to hit e.g. the space bar for a instant full stop.

This robot isn’t very fast – but the next one will be. So this was a successful ROS-learning robot which I can recommend to everyone who wants to know how ROS Robots work.
Its a bit hard to get all of the source compiled on the small arm cpu, and there are nearly no precompiled packages – but it takes away all the fear from compiling errors in the future 🙂