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

[jsk_pr2_startup] Set png_level of compressedDepth #1932

Open
wants to merge 1 commit into
base: develop/pr2-noetic
Choose a base branch
from

Conversation

Kanazawanaoaki
Copy link
Contributor

@Kanazawanaoaki Kanazawanaoaki commented Jan 24, 2025

Currently, if we want to use the depth topic of pr2's kinect camera image outside of pr2, the Hz is low due to the compressedDepth png_level problem.

Referring to #1493, set the png_level and avoid unnecessary topics.

Before

$ rostopic hz /kinect_head/depth_registered/image_rect/compressedDepth 
[/kinect_head/depth_registered/image_rect/compressedDepth]
no new messages
average rate: 3.728
	min: 0.266s max: 0.271s std dev: 0.00213s window: 4
$ for f in $(rosparam list | grep png_level); do echo "$f: $(rosparam get $f)"; done | grep depth
/kinect_head/depth/image/compressed/png_level: 9
/kinect_head/depth/image/compressedDepth/png_level: 9
/kinect_head/depth/image_raw/compressed/png_level: 9
/kinect_head/depth/image_raw/compressedDepth/png_level: 9
/kinect_head/depth/image_rect/compressed/png_level: 9
/kinect_head/depth/image_rect/compressedDepth/png_level: 9
/kinect_head/depth/image_rect_raw/compressed/png_level: 9
/kinect_head/depth/image_rect_raw/compressedDepth/png_level: 9
/kinect_head/depth_registered/hw_registered/image_rect/compressed/png_level: 9
/kinect_head/depth_registered/hw_registered/image_rect/compressedDepth/png_level: 9
/kinect_head/depth_registered/hw_registered/image_rect_raw/compressed/png_level: 9
/kinect_head/depth_registered/hw_registered/image_rect_raw/compressedDepth/png_level: 9
/kinect_head/depth_registered/image/compressed/png_level: 9
/kinect_head/depth_registered/image/compressedDepth/png_level: 9
/kinect_head/depth_registered/image_raw/compressed/png_level: 9
/kinect_head/depth_registered/image_raw/compressedDepth/png_level: 9

After

$ rostopic hz /kinect_head/depth_registered/image_rect/compressedDepth 
subscribed to [/kinect_head/depth_registered/image_rect/compressedDepth]
average rate: 31.463
	min: 0.021s max: 0.040s std dev: 0.00569s window: 9
$ for f in $(rosparam list | grep png_level); do echo "$f: $(rosparam get $f)"; done | grep depth
/kinect_head/depth/image/compressedDepth/png_level: 5
/kinect_head/depth/image_raw/compressedDepth/png_level: 5
/kinect_head/depth/image_rect/compressedDepth/png_level: 5
/kinect_head/depth/image_rect_raw/compressedDepth/png_level: 5
/kinect_head/depth_registered/hw_registered/image_rect/compressedDepth/png_level: 5
/kinect_head/depth_registered/hw_registered/image_rect_raw/compressedDepth/png_level: 5
/kinect_head/depth_registered/image/compressedDepth/png_level: 5
/kinect_head/depth_registered/image_raw/compressedDepth/png_level: 5

@github-actions github-actions bot added the PR2 label Jan 24, 2025
@k-okada
Copy link
Member

k-okada commented Jan 26, 2025 via email

@Kanazawanaoaki
Copy link
Contributor Author

@k-okada
Okay, I also checked bandwidth as follows. Is this correct?
Is it likely that the size of each message is slightly larger and the speed of data transfer is greatly improved?

Before (png_level 9)

$ rostopic bw /kinect_head/depth_registered/image_rect/compressedDepth 
subscribed to [/kinect_head/depth_registered/image_rect/compressedDepth]
average: 269.08KB/s
	mean: 68.28KB min: 67.98KB max: 68.57KB window: 4
average: 272.44KB/s
	mean: 68.66KB min: 67.98KB max: 70.01KB window: 8

After (png_level 5)

$ rostopic bw /kinect_head/depth_registered/image_rect/compressedDepth
subscribed to [/kinect_head/depth_registered/image_rect/compressedDepth]
average: 2.77MB/s
	mean: 0.08MB min: 0.08MB max: 0.08MB window: 9

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

Successfully merging this pull request may close these issues.

2 participants