Difference between revisions of "Building a Webcam Display"

From wikidb
Jump to: navigation, search
(Package Setup)
(For Indigo)
 
(9 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
* [http://wiki.ros.org/ROS/Tutorial InstallingandConfiguringROSEnvironment]
 
* [http://wiki.ros.org/ROS/Tutorial InstallingandConfiguringROSEnvironment]
 
* [http://wiki.ros.org/ROS/Tutorials/CreatingPackage Creating a Package]
 
* [http://wiki.ros.org/ROS/Tutorials/CreatingPackage Creating a Package]
 +
* Quigley, Gerkey & Smart chapter 2
 
* [http://wiki.ros.org/image_transport/Tutorials Image Transport Tutorials]
 
* [http://wiki.ros.org/image_transport/Tutorials Image Transport Tutorials]
  
 
== Build the Workspace ==
 
== Build the Workspace ==
=== For Jade ===
+
=== For Jade (or Indigo) ===
I did the following in the Jade environment - when bashrc had the following.
+
The following is done in the Jade environment (bashrc had the following).  
 
   source /opt/ros/jade/setup.bash
 
   source /opt/ros/jade/setup.bash
  
Line 23: Line 24:
 
   . ~/catkin_ws/devel/setup.bash
 
   . ~/catkin_ws/devel/setup.bash
  
=== For Indigo ===
+
To move to Indigo I started with a clean directory and made appropriate modifications, e.g.:
 +
    mkdir -p ~/catkin_ws_indigo/src
  
Experiment - setup.bash add this workspace to ROS_PACKAGE_PATH in a particular shell. I did the above the Indigo environment - when bashrc had the following.
+
=== .bashrc For Indigo ===
  source /opt/ros/indigo/setup.bash
+
  
 +
Experiment - setup.bash add this workspace to ROS_PACKAGE_PATH in a particular shell. I did the above in the Indigo environment - when bashrc had the following.
 +
  source /opt/ros/indigo/setup.bash
 +
 
 
   echo $ROS_PACKAGE_PATH
 
   echo $ROS_PACKAGE_PATH
 
       /opt/ros/indigo/share:/opt/ros/indigo/stacks:/home/eepp/ros_packages
 
       /opt/ros/indigo/share:/opt/ros/indigo/stacks:/home/eepp/ros_packages
Line 33: Line 37:
 
   echo $ROS_PACKAGE_PATH
 
   echo $ROS_PACKAGE_PATH
 
       /home/eepp/catkin_ws_indigo/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks
 
       /home/eepp/catkin_ws_indigo/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks
 +
 +
also added the following to .bashrc
 +
  source /home/eepp/catkin_ws_indigo/devel/setup.bash
  
 
== Package Setup ==
 
== Package Setup ==
Line 42: Line 49:
 
In <tt>~/catkin_ws/src/follow</tt>
 
In <tt>~/catkin_ws/src/follow</tt>
  
* [[Camera Display CMakeLists.txt v1]]  
+
* [[CMakeLists.txt v1]]  
 
* [[Camera Display package.xml]]
 
* [[Camera Display package.xml]]
  
Line 58: Line 65:
 
TBD: clean up the next line
 
TBD: clean up the next line
  
 +
  roscore
 
   rosrun usb_cam usb_cam_node ~video_device "/dev/video0"
 
   rosrun usb_cam usb_cam_node ~video_device "/dev/video0"
 
   rosrun follow camera_display
 
   rosrun follow camera_display
 +
 +
 +
[[Image:CameraDisplayView.png]]

Latest revision as of 12:51, 29 February 2016

Tutorials

Build the Workspace

For Jade (or Indigo)

The following is done in the Jade environment (bashrc had the following).

  source /opt/ros/jade/setup.bash
  mkdir -p ~/catkin_ws/src
  cd ~/catkin_ws/src/
  catkin_init_workspace 
  cd ..
  catkin_make
  . devel/setup.bash 
  echo $ROS_PACKAGE_PATH
  cd src/
  catkin_create_pkg follow std_msgs rospy roscpp
  cd ..
  catkin_make
  . ~/catkin_ws/devel/setup.bash

To move to Indigo I started with a clean directory and made appropriate modifications, e.g.:

   mkdir -p ~/catkin_ws_indigo/src

.bashrc For Indigo

Experiment - setup.bash add this workspace to ROS_PACKAGE_PATH in a particular shell. I did the above in the Indigo environment - when bashrc had the following.

 source /opt/ros/indigo/setup.bash
 
 echo $ROS_PACKAGE_PATH
     /opt/ros/indigo/share:/opt/ros/indigo/stacks:/home/eepp/ros_packages
 . devel/setup.bash 
 echo $ROS_PACKAGE_PATH
     /home/eepp/catkin_ws_indigo/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks

also added the following to .bashrc

 source /home/eepp/catkin_ws_indigo/devel/setup.bash

Package Setup

TBD: First pass - all these files need to be cleaned up.

In ~/catkin_ws/src/follow

In ~/catkin_ws/src/follow/src

Build

  cd ~/catkin_ws
  catkin_make

Test

TBD: clean up the next line

 roscore
 rosrun usb_cam usb_cam_node ~video_device "/dev/video0"
 rosrun follow camera_display


CameraDisplayView.png