Error opening file (/tmp/buildd/ros-hydro-opencv2-2.4.6-3precise-20140303-2216/modules/highgui/src/cap_ffmpeg_impl.hpp:537)
Hi,
This is my first post here so hopefully I will provide you with the right information.
I am running ROS Hydro on Ubuntu 12.04 through a virtual machine.
ROS seems to be working ok, I built my workspace using catkin and ROS is recognizing and compiling packages when I run catkin_make. I went through all of the tutorials without a problem.
When I try to run one of my nodes using rosrun sb_vision LineDetector.cpp I am getting this error: Error opening file (/tmp/buildd/ros-hydro-opencv2-2.4.6-3precise-20140303-2216/modules/highgui/src/cap_ffmpeg_impl.hpp:537)
I have deleted all of the source code that had anything to do with OpenCV and commented out things dealing with OpenCV in the CMakeLists but it still has this problem.
I have sb_vision as a package and in it's src section there is Line_Detector.cpp, I have also included the CMakeLists.txt in sb_vision below. Other folders in sb_vision are: include, catkin, catkin_generated, cmake, CMakeFiles, devel, gtest,msg, test_results and package.xml.
Line_Detector.cpp
:
#include "ros/ros.h"
#include "std_msgs/String.h"
#include <sstream>
int main(int argc, char **argv)
{
//Initialize ROS
ros::init(argc, argv, "Line_Detector");
ros::NodeHandle n;
ros::Publisher chatter_pub = n.advertise<std_msgs::String>("chatter", 1000);
ros::Rate loop_rate(10);
int count = 0;
while (ros::ok())
{
std_msgs::String msg;
std::stringstream ss;
ss << "hello world " << count;
msg.data = ss.str();
ROS_INFO("%s", msg.data.c_str());
chatter_pub.publish(msg);
ros::spinOnce();
loop_rate.sleep();
++count;
}
return 0;
}
Here is my CMakeLists.txt, I have tried commenting and uncommenting anything to do with OpenCV
CMakeLists.txt
:
cmake_minimum_required(VERSION 2.8.3)
project(sb_vision)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
find_package(OpenCV REQUIRED)
add_message_files(
FILES
Num.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES sb_vision
CATKIN_DEPENDS message_runtime roscpp rospy std_msgs
# DEPENDS system_lib
)
include_directories(
${catkin_INCLUDE_DIRS}
)
include_directories(
${OpenCV_INCLUDE_DIRS}
)
add_executable(Line_Detector src/Line_Detector.cpp)
#target_link_libraries( Line_Detector ${OpenCV_LIBS} ${catkin_LIBRARIES})
add_dependencies(Line_Detector sb_vision_generate_messages_cpp)
Any help would be much appreciated. If I can clarify anything or provide you with any more information I will happily do so. Thank you.