00001 /* 00002 License: BSD 00003 https://raw.github.com/robotics-in-concert/rocon_devices/license/LICENSE 00004 */ 00005 00006 #include <ros/ros.h> 00007 #include <rocon_rtsp_camera_relay/rocon_rtsp_camera_relay.hpp> 00008 00009 int main (int argc, char** argv) 00010 { 00011 ros::init(argc, argv, "rtsp_camera_relay"); 00012 ros::NodeHandle pnh("~"); 00013 std::string video_stream_url, user, password; 00014 00015 pnh.getParam("video_stream_url", video_stream_url); 00016 00017 rocon::RoconRtspCameraRelay rtsp(pnh); 00018 ROS_INFO("Rtsp Camera : Initialising.."); 00019 if(!rtsp.init(video_stream_url)) 00020 { 00021 ROS_ERROR("Rtsp Camera : Failed to initialise stream"); 00022 return -1; 00023 } 00024 00025 ROS_INFO("Rtsp Camera : Initialised"); 00026 rtsp.spin(); 00027 ROS_INFO("Rtsp Camera : Bye Bye"); 00028 00029 return 0; 00030 }