Difference between revisions of "OpenCV Installation"
From wikidb
(→ihr_opencv) |
(→ihr_opencv) |
||
Line 62: | Line 62: | ||
rosmake ihr_opencv | rosmake ihr_opencv | ||
</pre> | </pre> | ||
+ | |||
+ | Reindex the two oranges files. Otherwise, you'll get an error message that the two_oranges.bag file is unindexed. | ||
+ | |||
+ | <pre> | ||
+ | root@tabor:bags# cd /opt/ros/electric/stacks/iheart-ros-pkg/ihr_demos/ihr_demo_bags/bags | ||
+ | root@tabor:bags# rosbag reindex two_oranges.bag | ||
+ | two_oranges.bag 100% 19.8 MB 00:00 | ||
+ | two_oranges.bag 100% 19.8 MB 00:00 | ||
+ | </pre> | ||
From users space. | From users space. |
Revision as of 13:02, 13 May 2012
I Heart Robotics
I Heart Robotics installation instructions and tutorials.
usb_cam
Install the usb_cam drivers for ROS.
As root
cd /opt/ros/electric/stacks svn co https://bosch-ros-pkg.svn.sourceforge.net/svnroot/bosch-ros-pkg source ../setup.sh cp -r bosch-ros-pkg/trunk/stacks/bosch_drivers/usb_cam . cd usb_cam
Remove the <rosdep name="libswscale-dev"/> line from manifest.xml. A check of Synaptic shows libswscale-dev is there. However, the following step will fail if this line is present.
rosdep install usb_cam rosmake usb_cam
In user space create usb_cam.launch with the following content.
<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>
Then execute it.
roslaunch usb_cam.launch
ihr_opencv
Install the OpenCV vision library using packages from I Heart Robotics.
Install git-core with Synaptic.
Then install opencv as root.
cd /opt/ros/electric/stacks/ git clone git://github.com/IHeartRobotics/iheart-ros-pkg.git source ../setup.sh cd iheart-ros-pkg/ihr_demos/ihr_opencv/ rosdep install ihr_opencv rosmake ihr_opencv
Reindex the two oranges files. Otherwise, you'll get an error message that the two_oranges.bag file is unindexed.
root@tabor:bags# cd /opt/ros/electric/stacks/iheart-ros-pkg/ihr_demos/ihr_demo_bags/bags root@tabor:bags# rosbag reindex two_oranges.bag two_oranges.bag 100% 19.8 MB 00:00 two_oranges.bag 100% 19.8 MB 00:00
From users space.
eepp@tabor:~/ros_workspace/webcam$ roslaunch /opt/ros/electric/stacks/iheart-ros-pkg/ihr_demos/ ihr_demo_bags/launch/demo.launch