Hi,
I am making some set of nodes for which I want grab images from a camera(usb) only at certain times and I need very strict timings to do evaluation. I have created a service to return a sensor_msgs::Image img
as a response. But I keep getting
error: no match for ‘operator=’ in ‘res->perception_srvs::GetRawImageResponse_<std::allocator<void> >::img = sensor_msgs::CvBridge::cvToImgMsg(const IplImage*, std::string)(std::basic_string<char, std::char_traits<char>, std::allocator<char> >(((const char*)"passthrough"), ((const std::allocator<char>&)((const std::allocator<char>*)(& std::allocator<char>())))))
`
when doing res.img = cv_bridge_converter.cvToImgMsg(current_img)
with current_img being an IplImage.
I have checked the polled_camera package as option, but it still does not give me the flow I need. Publishing the images for me will be an overkill, I just need to move them around at very few and specific instances.
Here is my code snippet for this piece
`// some code`
camera >> current_img;
try
{
IplImage img = current_img;
res.img = cv_converter.cvToImgMsg(&img, "passthrough");
}
catch (sensor_msgs::CvBridgeException e)
{
ROS_ERROR("CvBridge conversion exception, [%s]", e.what());
}
// some more code
Originally posted by makokal on ROS Answers with karma: 1295 on 2011-02-26
Post score: 0