Skip to content

Conversation

@chataign
Copy link

Added output_rate_hz parameter to control the output rate (ie. images processed and published) vs the camera poll rate (frame_rate). On most cameras the poll rate indirectly controls device properties such as exposure and affects the imagery. This change allows users to downsample the publication rate without affecting the quality of the imagery.

output_rate_hz=0 disables the feature

@jack-oquin
Copy link
Member

I'd be grateful if you'd copy the indentation style of the rest of the file, when making modifications.

No particular style is better than any other, but consistency is good for readability.

francois added 2 commits May 23, 2016 15:01
Conflicts:
	src/nodes/driver1394.cpp
	src/nodes/driver1394.h
@chataign
Copy link
Author

chataign commented May 23, 2016

Hi, I just fixed the indents and cleaned up the code I added. Let me know if you have any issues reviewing this code.

While looking at the code I noticed that a new image message (sensor_msgs::Image) is instantiated at each call to poll(), which means that the image buffer will be reallocated for every single frame. This seems quite inefficient given that the image dimensions only change occasionally, and so the memory could be reused. Is this a known issue or could I look into it?

Regards,
Francois

@jack-oquin
Copy link
Member

If I remember correctly, the reason is that the Image message gets passed to ROS on the publish() call, which takes ownership the message. After that, the driver is not supposed to modify it.

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

Successfully merging this pull request may close these issues.

2 participants