Use Asus Xtion Pro Life with USB 3.0 laptop

For being able to plug in an Asus Xtion Pro Life and run it’s drivers I needed to disable from my BIOS de USB 3.0 option.

I got an error like:

[ 3162.597428] usb 3-3: new high-speed USB device number 2 using xhci_hcd
[ 3162.617432] usb 3-3: New USB device found, idVendor=1d27, idProduct=0600
[ 3162.617440] usb 3-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 3162.617444] usb 3-3: Product: PrimeSense Device
[ 3162.617447] usb 3-3: Manufacturer: PrimeSense
[ 3162.617912] xhci_hcd 0000:00:14.0: Not enough bandwidth. Proposed: 1663, Max: 1607
[ 3162.617920] xhci_hcd 0000:00:14.0: Not enough bandwidth
[ 3162.617933] usb 3-3: can't set config #1, error -12

Another fix is to update the firmware of the Asus Xtion like is commented here: https://github.com/nh2/asus-xtion-fix
But I couldn’t take that option.

Now my Xtion runs with OpenNI and OpenNI2 drivers.

Tags: , ,

nVidia GT 740M on Ubuntu 12.04 with optirun

I have a brand new Lenovo E540 which uses hybrid graphics card (intel + nVidia 740M) and after a fresh install it wasn’t using the dedicated nVidia card.
For me the trick was to install Bumblebee.

I got the error:
Xlib: extension "GLX" missing on display ":0.0".
Error [RenderEngine.cc:641] Unable to create glx visual
Warning [RenderEngine.cc:92] Unable to create X window. Rendering will be disabled

When trying to run Gazebo, a robotics simulator widely used in ROS.

I just followed the official instructions from Bumblebee.

sudo add-apt-repository ppa:bumblebee/stable

Enable the Universe and Multiverse repositories (for bumblebee and nvidia packages respectively).
sudo apt-get update

Install Bumblebee using the default proprietary nvidia driver for 12.04 - 13.04 :
sudo apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic

Reboot

Then I tried glxspheres64. Got 60fps.
And then optirun glxspheres64. Got 215fps.

And now my Gazebo runs perfectly :)

UPDATE:

For some reason after rebooting randomly my configuration dissapeared. I had a loooooong fight to recover the configuration, what I did was:

Make sure:
sudo apt-get install xserver-xorg-core
sudo apt-get install xserver-xorg-video-intel
are installed
sudo apt-get install mesa-utils
for making the system detect the intel card. Or at least it worked for me.

Remove all nvidia stuff:
sudo apt-get remove nvidia-*

Add xorg-edgers ppa:
sudo add-apt-repository ppa:xorg-edgers/ppa

Add bumblebee ppa:
sudo add-apt-repository ppa:bumblebee/stable

Do an update of the repos:
sudo apt-get update

At this point if I reboot, my system catches up with the Intel 4600 card I have (going to system settings -> details I can see I’m running from it). Also if I execute glxspheres64 it runs.

Now I do:
sudo apt-get install nvidia-331 bumblebee bumblebee-nvidia virtualgl

And in a fresh install of ubuntu (for testing pourposes) this already made me be able to run optirun glxspheres64. But in my “dirty” installation I needed to add a xorg.conf file to /etc/X11 to make it work.
This file was generated doing:
Control+Alt+F1 to get into a shell.
Login with my user.
sudo services lightdm stop
sudo X -config
This generates a xorg.conf.new file.
I modified this file setting the option for my second card to get the nvidia driver. Doing:
lspci
I can see my gfx cards:
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev ff)
Where the first part is the BusID.

And there is a section that looks like:
Section "Device"
### Available Driver options are:-
### Values: : integer, : float, : "True"/"False",
### : "String", : " Hz/kHz/MHz",
### : "%"
### [arg]: arg optional
#Option "SWcursor" # []
#Option "kmsdev" #
#Option "ShadowFB" # []
Identifier "Card2"
Driver "modesetting"
BusID "PCI:1:0:0"
EndSection

So I changed Driver “modesetting” to Driver “nvidia”.
The full file can be found: http://pastebin.com/7TX0ceT0

Tags: , , , ,

How to git pull from multiple directories Lee AwesomeBytes en español!

To git pull from multiple directories we can do:

find ~me/projects/ -type d -name .git \
| xargs -n 1 dirname \
| sort \
| while read line; do echo $line && cd $line && git pull; done

Source: SixArm post about it!

Tags: , ,

Sorry, but this post is not available in English Lee AwesomeBytes en español!

Sorry, but this post is not available in English

Tags: , ,

How to see temperature of i7 cpu in ubuntu 10.04 Lee AwesomeBytes en español!

Thanks to this post I’ve discovered how to be able to know the temperature of my cores in my i7 CPU.
First we need to download the last version of lm-sensors: http://dl.lm-sensors.org/lm-sensors/releases/

Then we need to extract and compile:
sudo make user
sudo make user_install

Then we can execute:
sudo sensors-detect

For me it found:

Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `coretemp':

Then this should work:
sudo modprobe coretemp

And if it worked we can do:
sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +55.0°C (high = +84.0°C, crit = +100.0°C)

coretemp-isa-0002
Adapter: ISA adapter
Core 1: +55.0°C (high = +84.0°C, crit = +100.0°C)

coretemp-isa-0004
Adapter: ISA adapter
Core 2: +55.0°C (high = +84.0°C, crit = +100.0°C)

coretemp-isa-0006
Adapter: ISA adapter
Core 3: +55.0°C (high = +84.0°C, crit = +100.0°C)

If we want the driver to load at the boot we need to add to /etc/rc.local a command line that should like this:
modprobe coretemp

Lastly we can add to our gnome panel the widget of hardware sensor monitor (sudo apt-get install sensors-applet).

Tags: , , ,

How to use Dynamixel’s SDK in MATLAB 2012 in Linux Lee AwesomeBytes en español!

A workmate needed to work with some dynamixel motors and he was more confortable communicating with them via MATLAB. The MATLAB website instructions teach how to do it in Windows. Specifically they say that you must search for the file dynamixel.dll which we do not need in Linux.

In Linux we need a shared library (.so) not a DLL.
To obtain it we need to compile the SDK as a shared library:
We need to download the SDK.
Extract it and enter the src folder.
Now we compile it:
make
gcc -shared -o dynamixel.so dynamixel.o dxl_hal.o

From here we can follow the instructions of the website we said before, but we may need to take into account a little difference:
The default port in the example is:
DEFAULT_PORTNUM = 3; //COM3
We need to find which one is the port for us, having the USB2Dynamixel plugged in we can do:
ls /dev/ | grep ttyUSB
So we can see which one is, probably the 0.

Just in case, the compiled project (with dynamixel.so):

DXL_SDK_LINUX_v1_01_with_dynamixel.so_

Tags: , ,

Computer aplications for a delta robot (via ROS) Lee AwesomeBytes en español!

pic of a delta robot

In this project we were given a delta robot implemented with Dynamixels and we programmed two applications over ROS for it (in python).
The final objective was to make Light Painting with it.
Project done by Toni Gabás and Sam Pfeiffer.

Project info (spanish): Informe delta Sam Pfeiffer y Toni Gabás
Project presentation (spanish): Slides
Github: https://github.com/awesomebytes/delta_robot

Videos:
Passive mode:

Painting mode:

Results:


Tags: , , ,

Installing Bumblebee for using gazebo and rviz on asus 1215n Lee AwesomeBytes en español!

I installed ubuntu 11.04 (natty) as a fast solution for the problems I found with 11.10 and in this version I found problems with the drivers of the graphics card to be able to run gazebo and rviz. I found the next error when trying to run gazebo:

Xlib: extension “GLX” missing on display “:0.0″.
Insufficient GL support

To solve the problem it’s enough to install Bumblebee following the instructions of: https://launchpad.net/~bumblebee/+archive/stable

sudo apt-get purge nvidia-current
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee

sudo usermod -a -G bumblebee $USER

Reboot and to try if it works they recommend running for 30s: glxspheres
Then compare it with optirun running: optirun glxspheres

In my case I can see how I go from 10fps to 31fps!

When running gazebo without optirun I found the following error:
XRequest.137: BadDrawable (invalid Pixmap or Window parameter) 0×4400002

But using optirun this error does not show up. And we win some fps.

Tags: , , , ,

Installing ROS electric and ROS diamondback on Ubuntu Oneiric (11.10) Lee AwesomeBytes en español!

The thing is that I installeds first on Ubuntu 11.10 ROS electric using their instructions, then I needed to install ROS diamondback.

I tried to use their instructions to install it from the repositories and I found this problem:

sudo apt-get install ros-diamondback-desktop-full
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
ros-diamondback-desktop-full : Depends: ros-diamondback-ros-tutorials (= 0.2.4-s1312445230~lucid) but it is not going to be installed
Depends: ros-diamondback-geometry-tutorials (= 0.1.3-s1312445373~lucid) but it is not going to be installed
Depends: ros-diamondback-slam-gmapping (= 1.2.3-s1312435634~lucid) but it is not going to be installed
Depends: ros-diamondback-ros (= 1.4.9-s1312417708~lucid) but it is not going to be installed
Depends: ros-diamondback-visualization (= 1.4.1-s1312432000~lucid) but it is not going to be installed
Depends: ros-diamondback-vision-opencv (= 1.4.3-s1312425872~lucid) but it is not going to be installed
Depends: ros-diamondback-perception-pcl (= 0.10.0-s1312427042~lucid) but it is not going to be installed
Depends: ros-diamondback-rx (= 1.4.2-s1312430459~lucid) but it is not going to be installed
Depends: ros-diamondback-image-pipeline (= 1.4.2-s1312437407~lucid) but it is not going to be installed
Depends: ros-diamondback-simulator-gazebo (= 1.2.8-s1312440157~lucid) but it is not going to be installed
Depends: ros-diamondback-diagnostics-monitors (= 1.4.0-s1312439740~lucid) but it is not going to be installed
Depends: ros-diamondback-simulator-stage (= 1.2.5-s1312437801~lucid) but it is not going to be installed
Depends: ros-diamondback-image-common (= 1.4.1-s1312425748~lucid) but it is not going to be installed
Depends: ros-diamondback-common-tutorials (= 0.1.2-s1312463072~lucid) but it is not going to be installed
Depends: ros-diamondback-ros-comm (= 1.4.7-s1312424712~lucid) but it is not going to be installed
Depends: ros-diamondback-visualization-common (= 1.4.2-s1312430681~lucid) but it is not going to be installed
Depends: ros-diamondback-physics-ode (= 1.4.1-s1312430103~lucid) but it is not going to be installed
Depends: ros-diamondback-driver-common (= 1.2.3-s1312425659~lucid) but it is not going to be installed
Depends: ros-diamondback-executive-smach (= 1.0.2-s1312435548~lucid) but it is not going to be installed
Depends: ros-diamondback-common-msgs (= 1.4.0-s1312425065~lucid) but it is not going to be installed
Depends: ros-diamondback-image-transport-plugins (= 1.4.1-s1312426755~lucid) but it is not going to be installed
Depends: ros-diamondback-robot-model (= 1.4.0-s1312427974~lucid) but it is not going to be installed
Depends: ros-diamondback-visualization-tutorials (= 0.2.2-s1312464635~lucid) but it is not going to be installed
Depends: ros-diamondback-geometry (= 1.4.2-s1312425346~lucid) but it is not going to be installed
Depends: ros-diamondback-documentation (= 1.4.1-s1312464754~lucid) but it is not going to be installed
Depends: ros-diamondback-executive-smach-visualization (= 1.0.1-s1312459854~lucid) but it is not going to be installed
Depends: ros-diamondback-laser-pipeline (= 1.2.0-s1312429600~lucid) but it is not going to be installed
Depends: ros-diamondback-common (= 1.4.3-s1312425161~lucid) but it is not going to be installed
Depends: ros-diamondback-diagnostics (= 1.4.0-s1312425553~lucid) but it is not going to be installed
Depends: ros-diamondback-navigation (= 1.4.1-s1312429823~lucid) but it is not going to be installed”

I started trying to correct it and I followed the next (failed) steps:
So I tried to install it from source with this instructions. In a step (in the package geometry) I got asked for an user and password, I just hit Enter and everything went fine.

Changed the path where to install as by default is ~/ros but I found it nicer to be in /opt.

This lasted… one hour. And I got an error in the end, so I wasn’t happy.

So I found this link: http://answers.ros.org/question/2505/installing-ros-diamondback-on-ubuntu-1110-oneiric
Where a good soul explains how to install it. I find it ugly, but works!

Oh, and finally I need to be sure that I am using the correct version of ROS putting in my .bashrc the line:

source /opt/ros/diamondback/setup.bash

(or the one that is correct in that moment, electric, or diamondback).

Tags: , ,

Light painting with a homemade robot arm Lee AwesomeBytes en español!

This is my last finished project. It’s a homemade robot arm with a RGB LED in the terminal element so we can paint with it. In the end of the post I’ll link to the PDF of the project and the powerpoint I used in class (in spanish) to present it. When I have time I’ll upload some videos.

We built the robot in our association AESS and I programmed a simulator in python of the arm that implements the inverse kinematics and the needed stuff to paint an image or the points that we need.

PDF: http://awesomebytes.com/wp-content/uploads/2011/12/Documentacion-Brazo-LED.pdf
Powerpoint: http://awesomebytes.com/wp-content/uploads/2011/12/PresentacionBrazoSammyPfeiffer.pdf

Tags: , , ,