macs-lab / avt_camera

Acquire images from AVT camera using Vimba SDK. Convert to ROS image messages.
4 stars 1 forks source link

The issue of the launch file #4

Open yulan0215 opened 4 years ago

yulan0215 commented 4 years ago

When I logged the launch file it would show the problem: [ERROR] [1600172858.239007462]: failed to set OffsetX [ERROR] [1600172858.239762315]: failed to set OffsetY [ERROR] [1600172858.242280993]: failed to set AcquisitionFrameRateAbs feature Could you please tell me how to solve this problem? Thank you very much!

yulan0215 commented 4 years ago

And I used jetson nano to launch the camera

xiaohuits commented 4 years ago

It happens sometimes. Try using Vimba viewer to open and close the camera once, then try again using this ROS driver will probably solve the issue. If it still won't work, then just use the Vimba viewer to set the parameters. The ROS driver will use the last used parameter settings if it failed to set them.

yulan0215 commented 4 years ago

It happens sometimes. Try using Vimba viewer to open and close the camera once, then try again using this ROS driver will probably solve the issue. If it still won't work, then just use the Vimba viewer to set the parameters. The ROS driver will use the last used parameter settings if it failed to set them.

I am sorry I have another question: that I launched the launch.file but"receiving frame failed". Could you please let me know the issue? I checked the avt_triggering.cpp file and found the related part, the problem is: I could not find the exact problem in this part: void FrameReceived( const AVT::VmbAPI::FramePtr pFrame ) { VmbUchar_t *pImage = NULL; // frame data will be put here to be converted to cv::Mat VmbFrameStatusType eReceiveStatus ; if( VmbErrorSuccess == pFrame->GetReceiveStatus( eReceiveStatus ) ) { if ( VmbFrameStatusComplete == eReceiveStatus ) { // successfully received frame
if (VmbErrorSuccess == pFrame->GetImage(pImage)) { VmbUint32_t width=1600; VmbUint32_t height=1200; pFrame->GetHeight(height); pFrame->GetWidth(width); //ROS_INFO("received an image"); cv::Mat image = cv::Mat(height,width, CV_8UC1, pImage); cv::cvtColor(image, image, cv::COLOR_BayerBG2RGB); m_pCamera->QueueFrame(pFrame); // I can queue frame here because image is already transformed. pImagePublisher->PublishImage(image); } } else { // unsuccessfully received frame ROS_INFO("receiving frame failed."); } }

Could you please tell me how to solve this problem?

xiaohuits commented 4 years ago

It's info messages telling you that there are some frames being dropped. No need to worry about this unless you see too many frames dropped. In that case, restart the camera.

yulan0215 commented 4 years ago

It's info messages telling you that there are some frames being dropped. No need to worry about this unless you see too many frames dropped. In that case, restart the camera.

But I could not get the image in this case, the abc

yulan0215 commented 4 years ago

It's info messages telling you that there are some frames being dropped. No need to worry about this unless you see too many frames dropped. In that case, restart the camera.

And I could not receive any images.

xiaohuits commented 4 years ago

Then try to restart the camera, or using Vimba viewer to start the camera once before running this driver.

yulan0215 commented 4 years ago

Then try to restart the camera, or using Vimba viewer to start the camera once before running this driver.

I tried to use vimba viewer to start the camera but there is no image received.

xiaohuits commented 4 years ago

If you can't see images using vimba viewer, then I guess there is some problem with your camera connection. If you are using camera in the triggered mode, you will need to send trigger signals to get an image.

yulan0215 commented 4 years ago

If you can't see images using vimba viewer, then I guess there is some problem with your camera connection. If you are using camera in the triggered mode, you will need to send trigger signals to get an image. I am sorry I would like to ask you how can I do like that "If you are using camera in the triggered mode, you will need to send trigger signals to get an image" and how can I check the trigger mode of my camera? Thank you very much!

xiaohuits commented 4 years ago

Please see the readme

The camera can be triggered by sending a message (type std_msgs/String) to /trigger topic. The camera will acquire an image each time a trigger message is received.

In the launch file, there is a parameter called trigger_source. If it was set to Software, then the camera is running in triggered mode. Other options are FreeRun and FixedRate

yulan0215 commented 4 years ago

Please see the readme

The camera can be triggered by sending a message (type std_msgs/String) to /trigger topic. The camera will acquire an image each time a trigger message is received.

In the launch file, there is a parameter called trigger_source. If it was set to Software, then the camera is running in triggered mode. Other options are FreeRun and FixedRate

Acturlly everytime I launched the launch file via freerun. You mean I can launch my camera via the triggered mode launch file. Thx

yulan0215 commented 4 years ago

Please see the readme

The camera can be triggered by sending a message (type std_msgs/String) to /trigger topic. The camera will acquire an image each time a trigger message is received.

In the launch file, there is a parameter called trigger_source. If it was set to Software, then the camera is running in triggered mode. Other options are FreeRun and FixedRate

I launched the launch.file you told me but the problem is that I still could not get image via this launch.file. Is it the problem of the avt_triggering.cpp? Thank you very much!

xiaohuits commented 4 years ago

What error message do you have? It is hard for me to identify the problem without any information.