ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

When pkg-config has to find your package, it looks for the right paths in the PKG_CONFIG_PATH variable. And the order of the paths in this variable actually matters. If you do:

export PKG_CONFIG_PATH=/opt/ros/fuerte/lib/pkgconfig:$PKG_CONFIG_PATH

You are giving priority to the packages of ROS, because it is found first in the list of paths.

You can use the same to override the ROS package and use the standalone OpenCV. After sourcing the file /opt/ros/fuerte/setup.sh you can add the path to the standalone OpenCV installation (note that I add the path in the left side of the variable):

export PKG_CONFIG_PATH=$HOME/bin/opencv/lib/pkgconfig/:${PKG_CONFIG_PATH}

If you want to change to ROS packages, just source /opt/ros/fuerte/setup.sh again.