34 #include <opencv2/video/video.hpp> 40 pnh_.
param<std::string>(
"video_url",
video_url_,
"rtsp://admin:A123456789@192.168.1.64/live.sdp?:network-cache=300");
56 ROS_WARN_STREAM(
"Could not load camera info, using an uncalibrated config.");
65 cap_.open(video_url_);
89 out_msg.
image = frame;
91 sensor_msgs::CameraInfo camera_info;
96 sensor_msgs::Image rosimg;
125 int main(
int argc,
char **argv)
camera_info_manager::CameraInfoManager camera_info_manager_
void publish(const sensor_msgs::Image &image, const sensor_msgs::CameraInfo &info) const
bool refreshSrvCallback(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
sensor_msgs::CameraInfo getCameraInfo(void)
#define ROS_INFO_ONCE(...)
image_transport::CameraPublisher camera_pub_
bool loadCameraInfo(const std::string &url)
std::string camera_info_url_
uint32_t getNumSubscribers() const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
bool validateURL(const std::string &url)
int main(int argc, char **argv)
CameraPublisher advertiseCamera(const std::string &base_topic, uint32_t queue_size, bool latch=false)
image_transport::ImageTransport image_transport_
ros::ServiceServer refresh_service_server_
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
#define ROS_WARN_STREAM_DELAYED_THROTTLE(rate, args)
#define ROS_WARN_STREAM(args)
#define ROS_INFO_STREAM(args)
bool getParam(const std::string &key, std::string &s) const
#define ROS_ERROR_STREAM(args)
ROSCPP_DECL void spinOnce()
sensor_msgs::ImagePtr toImageMsg() const
bool setCameraName(const std::string &cname)