To complete this you will need:
- A computer
- Some programming experience
- Optional USB Webcam
The first step is going to be to install ROS. On Ubuntu, if you don't like reading instructions, you can try copy and pasting this and it might work. It may also cause your computer to catch on fire, but these are the risks you take when you refuse to read the instructions.
sudo apt-get install build-essential python-yaml cmake subversion wget
wget --no-check-certificate http://ros.org/rosinstall -O ~/rosinstall
chmod 755 ~/rosinstall
~/rosinstall ~/ros http://ros.org/rosinstalls/boxturtle_base.rosinstall
echo "source ~/ros/setup.sh" >> ~/.bashrc
rosdep install ros
rosmake install ros
rosdep install image_view
rosmake install image_view
Once you manage to get ROS installed you may want to spend some time going through the tutorials. They are well worth your time.
If you have a USB webcam that supports the uvc video class you can install one of the drivers.
svn co https://bosch-ros-pkg.svn.sourceforge.net/svnroot/bosch-ros-pkg
rosdep install usb_cam
To test the usb_cam driver create a launch file directory.
Next, create a launch file called ~/ros/launch/usb_cam.launch that contains the following.
<launch> <node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="screen" > <param name="video_device" value="/dev/video0" /> <param name="image_width" value="320" /> <param name="image_height" value="240" /> <param name="pixel_format" value="mjpeg" /> <param name="camera_frame_id" value="usb_cam" /> <param name="io_method" value="mmap"/> </node> <node name="image_view" pkg="image_view" type="image_view" respawn="false" output="screen"> <remap from="image" to="/usb_cam/image_raw"/> </node> </launch>
Launching the file should display images from the camera.
After that you can install the I Heart Robotics ROS Packages
git clone git://github.com/IHeartRobotics/iheart-ros-pkg.git
rosdep install ihr_opencv
The prerecorded video is stored in .bag files and can be viewed by running the launch file.
Next we will be showing how to convert the video from blue, green, red (BGR) to the hue, saturation, value (HSV) color-space.
Please post any problems with these instructions in the comments.