Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low frame rate and can't ptp sync #117

Closed
antun008 opened this issue Jun 21, 2022 · 12 comments
Closed

Low frame rate and can't ptp sync #117

antun008 opened this issue Jun 21, 2022 · 12 comments

Comments

@antun008
Copy link

antun008 commented Jun 21, 2022

I'm struggling with ptp synchronization in the a2A1920-51gcPRO basler camera in pylon-ros-basler. Do you have ready-made solutions? Because I would like to connect the camera to the lidar and do their ptp synchronization.
Additionally, How could I get more FPS in rgb8 format? My camera supports 51 FPS, and the most I could get was 15 fps, and when it is further divided into three channels, I get 5 hz per rgb channel. I’m also sending you the configuration we’re using and we really don’t know what the problem is. Could you give us some optimal configuration, where we could get at least 30-40 FPS? We are using software triggering and I know that software trigger reduce fps to half, but maybe with beyond compression we could get more fps

I tried to change in the pylon application that my camera creates a GigE Compression Beyond photo, because in the pylon-ros-camera application on github I could not find the execution of that command. After that the camera even has that command turned on, but as long as I don't run roslaunch pylon_camera pylon_camera_node.launch, after that command is turned off again. Obviously pylon and pylon-ros-camera are tearing each other apart. Why I’m writing about compression beyond at all, is because I’ve seen on your site that I can increase FPS that way.

For what purpouse I need use trigger_timeout and grab_timeout, and thus i need to change this (perhaps reduce or increase this paramteres).

Also, when i put mtu_size: 8192 into default.yaml file, it dosent change nothing, it stays 1500 as default
image

this is my yaml file:
device_user_id: ""
camera_info_url: file:///home/antek/programi/pylon/src/pylon-ros-camera/pylon_camera/config/ROS_19_6.yaml
image_encoding: "rgb8"
trigger_timeout: 800 # in ms !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
grab_timeout: 400 # in ms !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
grab_strategy : 0 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
white_balance_auto : 1
exposure: 1000.0 #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
frame_rate: 80
gige:
mtu_size: 3000

Can I use hardware triggering in pylon-ros-camera, maybe with this I can increase FPS?

If it doesn't work that way, please, could you send me some instructions, just to get more FPS.
I've been struggling with this for days. I'm desperate already and I read all issue before on this repository!:(

@antun008 antun008 changed the title Low frame rate and Low frame rate and can't ptp sync Jun 21, 2022
@farhad-dalirani
Copy link

use bayer rgb 8 instead of rgb.
Also do this:
#81

@antun008
Copy link
Author

antun008 commented Jun 23, 2022

But why also in mono8 format it gives me only a third of the predicted fps?
image

And can you tell me how to implement compression in ros pylon so that I could get more fps

@antun008
Copy link
Author

use bayer rgb 8 instead of rgb. Also do this: #81

I need just rgb8, not bayer

@antun008
Copy link
Author

@antun008
Copy link
Author

antun008 commented Jun 24, 2022

And I finally found the way how to use compression beyond in ros, here is settings:
image

I managed to use compression to increase the fps to 27,356, but now the problem is that it doesn't want to show me any photo, I'm just getting this noise (you can see in picture above). Do you know maybe what the problem is?

Additionally, I tried using "enable_current_params_publisher" to increase fps as well, by putting "false", but nothing happened to me. It didn't use that changed parameter at all, because when I type "rostopic list" in this lower terminal camera still Publish /pylon_camera_node / currentParams:
image

And I also trying to get software triggering in pylon viewer, but something is wrong, beacuse publishing is 0,1 fps.
image

@m-binev
Copy link

m-binev commented Jun 24, 2022

@antun008 Hi, the Compression Beyond feature is meant to get higher frame rates in case the available bandwidth is the bottelneck. When the compression on the camera is enabled, images are compressed in the camera first, and need to be decompressed in pylon then. This is not implemented in ROS yet, however, you could chekc the pylon C++ SDK sample "Utility_ImageDecompressor.cpp" to see how this works. I don't believe this will help you here though, because you don't seem to have GigE bandwidth issues.
As per the SW trigger, well, in pylon Viewer you have to continuously push Generate Software Trigger > Execute to get more frames)) this functionality in the piewer is for test purposes only. Regards.

@farhad-dalirani
Copy link

In your launch file, you use UserSet1. Did you configure it inside the pylon viewer application and then did you upload you setting in UserSet1 memory on the camera?

@antun008
Copy link
Author

In your launch file, you use UserSet1. Did you configure it inside the pylon viewer application and then did you upload you setting in UserSet1 memory on the camera?

Yes, I did it:)

@FrancoisPicardDTI
Copy link
Collaborator

Hello

The ROS2 pylon driver v1.1.0 (branch galactic) gives now access through services to PTP related parameters and commands, allowing to enable PTP synchronization, to issue scheduled or not action commands, to use the periodic signal camera feature for ACE2 and the synchronous free-run feature for ACE1.
Hope it can help with this issue!

@demuma
Copy link

demuma commented Jul 13, 2022

As discussed in #81, go to your launch file and set "enable_current_params_publisher" to false. Don't ask why, but that should do the trick!

@FrancoisPicardDTI
Copy link
Collaborator

I am closing the issue as it seems the issue is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants