<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Object Classification |</title><link>https://www.ugr.es/~cvrlab/tags/object-classification/</link><atom:link href="https://www.ugr.es/~cvrlab/tags/object-classification/index.xml" rel="self" type="application/rss+xml"/><description>Object Classification</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Fri, 27 Apr 2018 00:00:00 +0000</lastBuildDate><image><url>https://www.ugr.es/~cvrlab/media/icon_hu_138e5d72c01fd19a.png</url><title>Object Classification</title><link>https://www.ugr.es/~cvrlab/tags/object-classification/</link></image><item><title>Visuoimitation - Baxter imitates movements looking at an operator</title><link>https://www.ugr.es/~cvrlab/projects/baxter_visuoimitation/</link><pubDate>Fri, 27 Apr 2018 00:00:00 +0000</pubDate><guid>https://www.ugr.es/~cvrlab/projects/baxter_visuoimitation/</guid><description>&lt;p&gt;The objective of the system is to control a baxter robot using the kinect V2 and tis body structure extraction modules (body tracking) under the ROS (Robot Operating System) framework. Modules will be developed to make an interface between the robot and the Kinect body pose estimation so that the robot can imitate the movements of the operator in real time. The system is developed in Ubuntu through the use of libraries usch as libfreenect2, openNI-2, and NITE2 becasue the ROS framework is developed for Ubuntu.&lt;/p&gt;
&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;The project has been tested with the 14.04 STL Ubuntu distribution. Also, for the current project ROS indigo was installed. In case you need to install this ROS version, you need first:&lt;/p&gt;
&lt;p&gt;Configure the source.list file&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ sudo sh -c 'echo &amp;quot;deb http://packages.ros.org/ros/ubuntu \$ (lsb\_release -sc) main&amp;quot;&amp;gt; /etc/apt/sources.list.d/ros-latest.list'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Configure the keys&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ sudo apt-key adv --keyserver hkp: //ha.pool.sks-keyservers.net: 80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Installation&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ sudo apt-get update sudo apt-get install ros-indigo-desktop-full
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Before using ROS, update rosdep to install all the required dependencies&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ sudo rosdep init
$ rosdep update
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Configure the environment for compilation&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ echo &amp;quot;source /opt/ros/indigo/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc
$ source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Installing Gazebo for simulation: First we decided to use catkin&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace
$ cd ~/catkin_ws
$ catkin_make
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Configure the environment&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ echo &amp;quot;source ~/catkin_ws/devel/setup.bash&amp;quot; &amp;gt;&amp;gt; ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Install Gazebo&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ sudo apt-get install -y gazebo2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Donwload all the code for ROS indigo ad build Gazebo&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd ~/catkin_ws/src
$ git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git -b indigo-devel
$ cd ~/catkin_ws/
$ catkin_make
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Install the Baxter package to use it with the simulator now&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cd ~/ros_ws/src
$ wstool init .
$ wstool merge https://raw.githubusercontent.com/RethinkRobotics/
$ baxter_simulator/master/baxter_simulator.rosinstall
$ wstool update
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Compile the package&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ source /opt/ros/indigo/setup.bash
$ cd ~/ros_ws
$ catkin_make
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Run Baxter for the simulator&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ roslaunch baxter_gazebo baxter_world.launch****
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="workstation-setup"&gt;Workstation Setup&lt;/h2&gt;
&lt;p&gt;The required steps to setup your workstation are described in the tutorial from rethink robotics®. This include the installation of Ubuntu, ROS, the Baxter SDK and the first connection to the robot. The direct connection from the Baxter to your workstation also requires a
.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; Example: Network Connection-&amp;gt;Add-&amp;gt;Ethernet
Connection name: Baxter
IPv4 Settings: Method: Manual
Address: 169.254.0.10, Netmask: 255.255.0.0, Gateway: 0.0.0.0
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="gazebo-optional"&gt;Gazebo (optional)&lt;/h2&gt;
&lt;p&gt;Gazebo is a powerful simulation tool for robots. It allows to use already existing robots like the Baxter or to create own one. It is very useful for people who have not the possibility to work with a physical robot.
.&lt;/p&gt;
&lt;p&gt;It is more comfortable to have a separate workspace for the physical robot and the visual one in the simulation. It is for example not necessary to change everytime the baxter.sh file. The tutorial from the
explains the steps and it is a good way to get in touch with gazebo.&lt;/p&gt;
&lt;p&gt;If MoveIt is already installed the packages must be copied from the workspace ros_ws in the src folder from ros_gazebo_master. But to use the simulation from this website don&amp;rsquo;t modify the following line from baxter_world.launch.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;arg name=&amp;quot;world_name&amp;quot; value=&amp;quot;$(find baxter_gazebo)/worlds/baxter.world&amp;quot;/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="robot-arm-calibration"&gt;Robot arm calibration&lt;/h2&gt;
&lt;p&gt;The calibration of the arms is recommended to get precisely results. There are two different calibration routines which are very well described on the website from rethink robotics.
.&lt;/p&gt;
&lt;h2 id="examples-and-code"&gt;Examples and code&lt;/h2&gt;
&lt;p&gt;The main objective of the project is described in the initial section of this page. The following videos show first and example of the setup with the code running, and the Baxter simulation in Gazebo imitating the movements of the operator. The next video shows a successful example of the robot imitating the operator movements.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/KZcqivsb1dM?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;The next video shows a successful example of the robot imitating the operator movements.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/V6VbvJ-t0vg?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="contact"&gt;Contact&lt;/h2&gt;
&lt;p&gt;Granada
Cristina Garrido
&lt;/p&gt;</description></item><item><title>Object classification with the Baxter robot</title><link>https://www.ugr.es/~cvrlab/projects/baxter_conveyor/</link><pubDate>Wed, 27 Apr 2016 00:00:00 +0000</pubDate><guid>https://www.ugr.es/~cvrlab/projects/baxter_conveyor/</guid><description>&lt;p&gt;This project shows the development of various classification tasks in static and dynamic environments with the Baxter robot. This robot will separate two groups of objects with different colours, positions and sizes, using the Robot Operating System (ROS Kinetic) on Ubuntu 16.04 LTS, MoveIt! and the OpenCV library for the computer vision, based on the colour filter made by
. Check the
.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;/h2&gt;
&lt;h2 id="workstation-setup"&gt;Workstation Setup&lt;/h2&gt;
&lt;p&gt;To set the workstation, the tutorial from
, in this site you can find the installation of Ubuntu, the ROS specific version for that Ubuntu version, the Baxter SDK and the instructions for establishing the first comunication with the robot, which requires an Ethernet connection.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Example: Network Connection-&amp;gt;Add-&amp;gt;Ethernet
Connection name: Baxter
IPv4 Settings: Method: Manual
Address: 169.254.0.10, Netmask: 255.255.0.0, Gateway: 0.0.0.0
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="moveit"&gt;MoveIt&lt;/h2&gt;
&lt;p&gt;
is used for the motion planning, manipulation and collision checking.&lt;/p&gt;
&lt;p&gt;Moreover the package
by Michael Ferguson needs to be installed.&lt;/p&gt;
&lt;h2 id="robot-arm-calibration"&gt;Robot arm calibration&lt;/h2&gt;
&lt;p&gt;It is recommended to calibrate Baxter&amp;rsquo;s arms for getting more precise results.
there are two different calibration routines which are very well described.&lt;/p&gt;
&lt;h2 id="colour-of-the-objects"&gt;Colour of the objects&lt;/h2&gt;
&lt;p&gt;The object recognition can only work if the colours of the objects are known. The colours are defined in the baxter_img.cpp file as low and high HSV values. The best way to get the color values from an object which should be detected is to take pictures with the Baxter camera from it on the workspace in different positions and with different illuminations.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ rosrun image_view image_view image:=/cameras/right_hand_camera/image
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command opens a window with a stream of images from Baxter&amp;rsquo;s right hand camera and allows to save images by right-clicking on the display window.
Then the images can be analyzed with the
. Open a new terminal and execute the python file from the location where it is saved.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ python hsvThresholder.py frame0000.jpg
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="tasks-overview"&gt;Tasks Overview&lt;/h2&gt;
&lt;p&gt;There are two main classification tasks using a paddle and a wedge as tools, the first one is used in static classification and the other one in dynamic. Both of them are made out of cardboard and it is common that sometimes the objects weight more than the tools, resulting on difficulties at the time of classifying. The clustering algorithm used is K-means with k = 2, it separates the objects by colour and position. This algorithm gives us the centroids of both groups so that we can get the middle point.&lt;/p&gt;
&lt;h3 id="static-environment-classification"&gt;Static environment classification&lt;/h3&gt;
&lt;p&gt;Baxter classifies objects on the top of a table, setting them aside.&lt;/p&gt;
&lt;p&gt;The project must be added in the src folder from the workspace and can be launched after it is built from a sourced terminal.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/wTfLTKC_PFo?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Open a new terminal:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ source /opt/ros/kinetic/setup.bash
$ source ros_ws/devel/setup.bash
$ cd ros_ws/
$ ./baxter.sh
$ catkin_make
$ roslaunch classif classification.launch
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="dynamic-environment-classification-using-a-wedge"&gt;Dynamic environment classification using a wedge&lt;/h3&gt;
&lt;p&gt;For making this classification, the speed of the objects on the conveyor belt has to be calculated. Then, the Baxter robot will predict where the objects are to separate them.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/crF7NCy9WJw?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;The project must be added in the src folder from the workspace and can be launched after it is built from a sourced terminal.
Open a new terminal:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ source /opt/ros/kinetic/setup.bash
$ source ros_ws/devel/setup.bash
$ cd ros_ws/
$ ./baxter.sh
$ catkin_make
$ roslaunch dyn_wedge dyn_wedge.launch
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="dynamic-environment-classification-using-a-paddle"&gt;Dynamic environment classification using a paddle&lt;/h3&gt;
&lt;p&gt;For making this classification, the speed of the objects on the conveyor belt has to be calculated. Then, the Baxter robot will predict where the objects are to separate them. In this case, the tool used is a paddle, so it will be necessary to predict the position twice, as it can be seen in the video.&lt;/p&gt;
&lt;p&gt;The project must be added in the src folder from the workspace and can be launched after it is built from a sourced terminal.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/BypfZhM5Lto?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Open a new terminal:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ source /opt/ros/kinetic/setup.bash
$ source ros_ws/devel/setup.bash
$ cd ros_ws/
$ ./baxter.sh
$ catkin_make
$ roslaunch dyn_classif dyn_classif.launch
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="packages"&gt;Packages&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;classif&lt;/strong&gt;. It includes the classification in a static environment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;dyn_classif&lt;/strong&gt;. Classification in a dynamic environment using a paddle.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;dyn_wedge&lt;/strong&gt;. Classification in a dynamic environment using a wedge.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;pick_and_place&lt;/strong&gt;. Adapted pick and place program for executing it in the Baxter robot.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The files included by this packages are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;baxter_img.cpp: This C++ program identifies the objects in the image, visualizes them and calculates the middle point between the two groups of objects, sending them to the control file.&lt;/li&gt;
&lt;li&gt;file.py: It is the control file, it subscribes to the &amp;ldquo;clasificacion&amp;rdquo; or &amp;ldquo;detected_objects&amp;rdquo; topic and plans the trajectories and execute them to separate or pick the objects.&lt;/li&gt;
&lt;li&gt;file.launch: This launch file runs all the required nodes to accomplish the task.&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>