TechnoLabsz: Exploring New Technology
Welcome to TechnoLabsz, a hands-on blog covering OpenCV, robotics, programming, electronics projects, GNU/Linux, Arduino, computer tips, Python, hacking and mobile phones. Follow along and explore the latest tutorials and project write-ups.



Browse by Topic
Popular Posts






- How to easily install OpenCV on Raspberry Pi
- Eye blink detection using OpenCV in Ubuntu
- Published a Book: "Learning Robotics using Python"
- How to do OpenCV Haar training
- mbed: An embedded board based on ARM
- Cubieboard: A threat to Raspberry Pi
- C++ Tips: Pointer to a Function
- Configuring XAMPP and Setting WordPress, Drupal, Joomla and sNews
- OpenCV Face+Nose+Mouth+Eye concurrent detection
Arduino and ROS
In this post I connect ROS Electric with an Arduino board. The ROS Electric installation guide for Ubuntu is available at the ROS Electric Ubuntu installation page. Once ROS Electric is installed, follow the steps below.


- To work with Arduino, load the required programs onto the board. ROS provides an Arduino library: after installing ROS Electric, copy
ros_libfrom the ROS folder into the Arduino libraries folder. - Then load one of the sample programs from
ros_lib; a "hello world" program is shown here. - After uploading, load the ROS commands.
Update: for Arduino versions above 1.0, edit ArduinoHardware.h inside roslib and replace Wprogram.h with Arduino.h.
Labels: Robotics-Arduino, ROS, ROS and Arduino
Read More Comments Email This Edit Post Share by Email Share to Blog Share to X Share to Facebook Share to Buzz
How to Install ROS in Ubuntu
ROS Electric installation procedure for Ubuntu 10.04 (Lucid):
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu lucid main" > /etc/apt/sources.list.d/ros-latest.list'
Ubuntu 10.10 (Maverick):
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu maverick main" > /etc/apt/sources.list.d/ros-latest.list'
Ubuntu 11.04 (Natty):
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu natty main" > /etc/apt/sources.list.d/ros-latest.list'
Set up your keys
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
Installation
Make sure you have re-indexed the ROS.org server:
sudo apt-get update
ROS contains many libraries and tools. Four default configurations are provided to get you started, and you can also install ROS stacks individually.
- Desktop-Full Install (Recommended): ROS, rx, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception —
sudo apt-get install ros-electric-desktop-full - Desktop Install: ROS, rx, rviz and robot-generic libraries —
sudo apt-get install ros-electric-desktop - ROS-Base (Bare Bones): ROS package, build and communication libraries, no GUI tools —
sudo apt-get install ros-electric-ros-base - Individual Stack: install a specific ROS stack (replace underscores with dashes of the stack name) —
sudo apt-get install ros-electric-STACK, e.g.sudo apt-get install ros-electric-slam-gmapping
Environment setup
It is convenient to add the ROS environment variables to your bash session automatically each time a new shell is launched:
echo "source /opt/ros/electric/setup.bash" >> ~/.bashrc. ~/.bashrc
If more than one ROS distribution is installed, ~/.bashrc must only source the setup.bash for the version currently in use. To change the environment of the current shell only, type:
source /opt/ros/electric/setup.bash
Check this link for more info.
Read More Comments Email This Edit Post Share by Email Share to Blog Share to X Share to Facebook Share to Buzz
PyQt Tutorial: Introduction
PyQt offers an easier way to build user interfaces, combining the power of both Python and Qt.
What is Python?
- A high-level programming language
- An object-oriented programming language
- A scripting language
More on Python.
What is Qt?
Qt is a cross-platform application framework for GUI development. Qt stands for Qroll Tech; it was founded by Qroll Tech and is now owned by Nokia.
How PyQt Works
Qt is used to create the user interface file (.ui). After the UI file is made, it is converted into equivalent Python code. The code is generated using the pyuic compiler. After some modification, the Python code file can be run.
Requirements in Linux (Ubuntu)
- Qt 4 Designer or Qt4 Creator
- python-qt4: Python bindings for Qt4
- pyqt-tools: pyuic and pylupdate for Qt3
Example demo: a Hello World program using PyQt.




Read More Comments Email This Edit Post Share by Email Share to Blog Share to X Share to Facebook Share to Buzz
ROS and Urbi
ROS and URBI are two open-source robotic platforms and libraries. ROS stands for Robot Operating System, and URBI stands for Universal Real Time Interface.
ROS
ROS (Robot Operating System) provides libraries and tools that help software developers create robot applications. It offers hardware abstraction, device drivers, libraries, visualizers, message-passing, package management and more. See the ROS wiki for more details.
URBI
Urbi is an open-source software platform for controlling robots or complex systems in general. It includes a C++ component library called UObject that comes with a robot standard API to describe motors, sensors and algorithms. Alongside UObject, the urbiscript orchestration script language glues components together and describes high-level behaviors, somewhat like Python or LUA, but with embedded parallel and event-driven semantics that make the job easier. Urbi aims to help make robots compatible and to simplify writing programs and behaviors for them. Its potential applications go beyond robotics, since it has been used successfully in generic complex systems where parallel and event-driven orchestration across multiple agents is the rule. The latest Urbi 2.x versions integrate support for Willow Garage's ROS, so both systems can be used together. Urbi is open-source under the GNU AGPLv3 license; the source code is available in the Downloads section. For more details, see UrbiForge.



How to Program a Kinect Sensor Using Python in Ubuntu Linux
This post is for Kinect enthusiasts. Kinect is a motion sensing input device by Microsoft for the Xbox 360 game console; the sensor consists of an infrared camera and an array of microphones. It can be used for image processing. Here I show how to access data from the Kinect sensor. The platform is Linux, and programming can be done in Python, C, C++, ActionScript, C#, Java, JavaScript or Common Lisp. I chose Python because it is very easy to program in.
OpenKinect
OpenKinect is an open community of people interested in using the Xbox Kinect hardware with PCs and other devices. The community works on free, open-source libraries that enable the Kinect to be used with Windows, Linux and Mac. It consists of over 2000 members contributing time and code, with the mission of creating the best possible suite of applications for the Kinect. OpenKinect is a true open-source community. Its primary focus is currently the libfreenect software, and code contributed to OpenKinect is made available under an Apache20 or optional GPL2 license where possible. For more information, refer to the OpenKinect wiki.
Installation of OpenKinect
- Download the source code, available at the libfreenect GitHub repository.
- Extract the contents and open a terminal in that path.
- Type
cmake . - Run
make - Run
sudo make install - Install the Python wrapper, located in the
wrappers/pythonfolder.


