Month: April 2017

Robot Simulator with ROS integration

This is a nice open-source Robot simulator that you can use to simulate and test your robot before building it. Also it integrates with ROS:

http://www.coppeliarobotics.com

You can find more info here:

https://github.com/Nurgak/Virtual-Robot-Challenge

Advertisements

Using VirtualBox with 1366×768 resolution

Sometimes you are forced to use Windows just for some seconds to get the work done. Fortunately MS was kind enough to release a Trial Windows image that you can run legally for 90 days as explained here (in Portuguese) : https://acassis.wordpress.com/2013/02/27/baixando-e-rodando-uma-imagem-do-windows-no-virtualbox/

But my laptop is old and its resolution is only 1366×768 and this resolution doesn’t appear as an option in the emulated Windows on VirtualBox. Even in the advanced options this resolution is not present.

After some search in the Internet I discovered how to create new resolutions option on VirtualBox:

$ VBoxManage setextradata "IE9 - Win7" CustomVideoMode1 1366x768x32

Source: https://superuser.com/questions/443445/how-can-i-get-virtualbox-to-run-at-1366×768

How to remove trailing whitespaces and new blank line at EOF from patches

When applying a patch in the git (i.e. using “git am” command) you could to face these warning messages:

Applying: You patch name
.git/rebase-apply/patch:9360: trailing whitespace.
 *    notice, this list of conditions and the following disclaimer. 
.git/rebase-apply/patch:2456: new blank line at EOF.
+
.git/rebase-apply/patch:3382: new blank line at EOF.
+
.git/rebase-apply/patch:4323: new blank line at EOF.
+
.git/rebase-apply/patch:4905: new blank line at EOF.
+

It will be very boring to discover what are these files and fix each one.
Fortunately you can use git itself to fix it for you:

$ git apply --reject --whitespace=fix filename.patch

If you want you can use “git add” and “git commit” to create a new patch without these “trailing whitespaces” and “new blank lines”.

UPDATE: You can use “git am –reject –whitespace=fix filename.patch” then it will fix the blank lines and trailing whitespaces and you don’t need to run “git add” and “git commit”!

I found the solution here: http://stackoverflow.com/questions/14509950/my-diff-contains-trailing-whitespace-how-to-get-rid-of-it