All posts by Admin

Install ROS Kinetic on Ubuntu

If you haven’t heard of ROS before it is an acronym for Robot Operating System by the Open Source Robotics Foundation.

ROS provides libraries and tools to help software developers create robot applications. It provides hardware abstraction, device drivers, libraries, visualizers, message-passing, package management, and more. ROS is licensed under an open source, BSD license.

Kinetic is the tenth ROS distribution release and is short for “Kinetic Kane”.  It was released May 23rd, 2016.

 

Ubuntu install of ROS Kinetic

Debian packages are available for several Ubuntu platforms, listed below. These packages are more efficient than source-based builds and are our preferred installation method for Ubuntu. Note that there are also packages available from Ubuntu upstream. Please see UpstreamPackages to understand the difference.

Ubuntu packages are built for the following distros and architectures.

Distro amd64 i386 armhf
Ubuntu 15.10 (Wily Werewolf) X X
Ubuntu 16.04 LTS (Xenial Xerus) X X X

If you need to install from source (not recommended), please see source (download-and-compile) installation instructions.

Installation

 

Configure your Ubuntu repositories

 

Configure your Ubuntu repositories to allow “restricted,” “universe,” and “multiverse.” You can follow the Ubuntu guidefor instructions on doing this.

Setup your sources.list

 

Setup your computer to accept software from packages.ros.org. ROS Kinetic ONLY supports Wily (Ubuntu 15.10), Xenial (Ubuntu 16.04) and Jessie (Debian 8) for debian packages.

Mirrors

Source Debs are also available

 

Set up your keys

 



  •  

 

Installation

First, make sure your Debian package index is up-to-date:



  •  

There are many different libraries and tools in ROS. We provided four default configurations to get you started. You can also install ROS packages individually.

In case of problems with the next step, you can use following repositories instead of the ones mentioned above ros-shadow-fixed

  • Desktop-Full Install: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception


    • or click here

    Desktop Install: ROS, rqt, rviz, and robot-generic libraries


    • or click here

    ROS-Base: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.


    • or click here

    Individual Package: You can also install a specific ROS package (replace underscores with dashes of the package name):



    • e.g.

       

To find available packages, use:

Initialize rosdep

Before you can use ROS, you will need to initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.

 

Environment setup

 

It’s convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:

 

If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.

If you just want to change the environment of your current shell, instead of the above you can type:

 

Getting rosinstall

rosinstall is a frequently used command-line tool in ROS that is distributed separately. It enables you to easily download many source trees for ROS packages with one command.

To install this tool on Ubuntu, run:

Build farm status

The packages that you installed were built by the ROS build farm. You can check the status of individual packages here.

License

Installation how to modified from ROS wiki.  Content licensed under Creative Commons Attribution 3.0

Open Multiple Images with OpenCV in Python

Building on our previous example of opening a single image, this guide will explain how to open multiple images. The easiest way to load multiple images is to put all the images into a single folder and loop through the directory opening each one.

This guide doesn’t introduce any new OpenCV functions you shouldn’t already be familiar with from the previous example, but we will include new packages os and os.path to make a list of images to process.

The code

A note on OpenCV image support from the OpenCV docs (http://docs.opencv.org/2.4/doc/tutorials/introduction/display_image/display_image.html)

Note OpenCV offers support for the image formats Windows bitmap (bmp), portable image formats (pbm, pgm, ppm) and Sun raster (sr, ras). With help of plugins (you need to specify to use them if you build yourself the library, nevertheless in the packages we ship present by default) you may also load image formats like JPEG (jpeg, jpg, jpe), JPEG 2000 (jp2 – codenamed in the CMake as Jasper), TIFF files (tiff, tif) and portable network graphics (png). Furthermore, OpenEXR is also a possibility.

Boilerplate code

 

Open an Image with OpenCV in Python

The following code will get you started to load and display an image with OpenCV and Python.

OpenCV functions used:

The code

 

Boilerplate code

 

Where to next?

Install OpenCV 3.x with Python 2.7 on Ubuntu

Updated: 10/11/2016

How to Install OpenCV 3.x and Python 2.7+ on Ubuntu

Step 1:

Open a terminal window and update the apt package manager lists and upgrade any currently installed packages:

Step 2:

Install developer tools:

Step 3:

Install packages to open image formats including JPEG, PNG, TIFF, and others:

Step 4:

Install the GIMP toolkit (GTK+) which OpenCV uses to build GUIs:

Step 5:

Install packages to open video formats:

Step 6:

Install libraries that optimize various routines in OpenCV:

Step 7:

Install pip, a package manager for Python:

https://pip.pypa.io/ is the official pip website

Step 8:

Install Python 2.7 development tools:

Step 9:

Install numpy because OpenCV stores images as NumPy arrays

This post follows, updates and adds to the instructions from Py Image Search here: http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/

MLBD Machine Learning is Fun! Part 3: Deep Learning and Convolutional Neural Networks

Here we follow along with the 3rd part of Adam Geitgey’s excellent introductory series Machine Learning is Fun! “Deep Learning and Convolutional Neural Networks”

For the original article, click here.

The example presented is an object recognition classifier to determine whether or not something is a bird.  To complete this tutorial you will need:

  • TFLearn
  • TensorFlow
  • Python 2.7
  • Birds and not birds data set

 

Original test script

Machine Learning by Doing

Machine learning by doing is a series following the best machine learning tutorials and examples posted around the internet and ensuring they are 100% repeatable.  Clearly defined version numbers for programming languages and packages, links to data sets and explanations of some of the lesser known functions we will encounter.

These examples are some of the best found on the web, but it is incredibly frustrating to find you are missing one small piece to re-create their results.

For the first post we follow along with Adam Geitgey in Part 3 of his “Machine Learning is Fun!” series.

Capitalized Case JavaScript code

 

Code adapted from stackoverflow.com ‘Convert string to title case with javascript‘ users Greg DeanBill the Lizard  licensed under cc by-sa 3.0

Delimiters

A delimiter is a sequence of one or more characters used to specify the boundary between separate, independent regions in plain text or other data streams. An example of a delimiter is the comma character, which acts as a field delimiter in a sequence of comma-separated values.

Common delimiters:

  • Tab
  • Colon
  • Semicolon
  • Comma
  • Space
  • Pipe
  • Hyphen

Delimiters in Excel

Excel uses delimiters in the Text to Columns function.  The options are tab (    ),  semicolon (;), comma (,), space ( ), or other which is an input field for a single custom character.

Intro paragraph from Wikipedia https://en.wikipedia.org/wiki/Delimiter

 

TensorFlow on Windows

TensorFlow is an open source (Apache 2.0) software library for Machine Intelligence created by Google

Windows 7

The two options are:

  • Run in Docker
  • Run in a Linux Virtual Machine (VM)

Windows 10

With the introduction of the Windows Subsystem for Linux (WSL) Windows 10 users have an additional option:

  • Run on Win 10
  • Run in Docker
  • Run in a Linux VM

 

Can you turn advanced custom fields into a standalone plugin?

The short answer is no, not completely standalone.

You can make a plugin from the output of the Advanced Custom Fields’ export to PHP option, but it still requires that the site have the full Advanced Custom Fields plugin installed.

There is a way to hide the ACF plugin’s user interface by defining define( ‘ACF_LITE’, true ); before including the acf.php file.

For simple custom fields, you might be better off defining them through native WordPress code https://codex.wordpress.org/Custom_Fields