Skip to content

Conversation

tajgr
Copy link
Collaborator

@tajgr tajgr commented Oct 14, 2021

  • png format for rgb and infrared images (jpeg default),
  • rgbd images with help of the rs.align

note: The reason for png is that my colleagues required some lossless format.
Moreover, the Multicam support individual resolution and depth_fps now. Some types of realsense cameras required different values (D455 or L515).

@tajgr tajgr requested review from jisa and m3d October 14, 2021 18:05
@m3d
Copy link
Member

m3d commented Oct 18, 2021

  • png format for rgb and infrared images (jpeg default),
  • rgbd images with help of the rs.align

can you add some motivation? the depth encoded as PNG is much bigger as far as I remember
p.s. is it still "work in progress"=draft, or ready for review?

@tajgr tajgr marked this pull request as ready for review January 6, 2022 14:24
@tajgr
Copy link
Collaborator Author

tajgr commented Jan 6, 2022

After a long time, i returned to this PR.
@m3d Thanks for comment. I have updated the description. Now it is ready for review.

img_data, depth_data = data
image = pygame.image.load(io.BytesIO(img_data), 'JPG').convert()
g_depth = decompress_depth(depth_data)
g_depth = decompress_depth(depth_data)/1000
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incompatible with virtual subt logs because there are different units (mm versus m). I think the mm (int16) are better choice . Or not?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is breaking change so I do not like it ... I actually do not like the RGBD bundle, but I understand it from "synchronized source" point of view. Yes it is not practical and the data are bigger (twice?)

@tajgr
Copy link
Collaborator Author

tajgr commented Jan 12, 2022

Sample log:
test-realsense-D400-220112_132945.log

$ python -m osgar.logger ../osgar_logs/test-realsense-D400-220112_132945.log
k name bytes | count | freq Hz
-----------------------------------------
0 sys 431 | 4 | 0.7Hz
1 app.rgbd_raw 6859742 | 49 | 8.9Hz
2 app.infra 0 | 0 | 0.0Hz

Total time 0:00:05.488617

self.rgbd = config.get("rgbd", False)
if self.rgbd:
assert self.depth_rgb, self.depth_rgb
bus.register('rgbd_raw:gz', 'infra')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not like this IF switch much - looks like different class should be used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be better this?
bus.register('depth:gz', 'color', 'infra', 'rgbd_raw:gz')
The IF switch will remain just in the depth_callback.

Copy link
Member

@m3d m3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jisa any comments to larger RGBD bundles? To be honest I do not really know :(.
I also do not have realsense to verify that the functionality is not broken. I see the motivation to keep synchronized RGBD but somehow I am not happy with it.

@m3d
Copy link
Member

m3d commented Feb 10, 2022

@tajgr - please create new "bundle", which will be depth uint16 in millimeters and RGB image (JPEG?). You can drop the camera to robot and robot absolute positions. This new structure will reflect only raw RGBD synchronized data from Realsense and can be easily converted to existing "ROS compatible RGBD bundle". OK? Thanks m.
p.s. lidarview can be then extended to support also this type of bundle

@tajgr
Copy link
Collaborator Author

tajgr commented Feb 18, 2022

Thanks. I created new bundle where dictionary is used. Yes, it is not exactly what you said.
My motivation is structure that could be more universal and more usable in the future. The bundle should always contains "data" and optionally "camera_pose" (maybe better sensor_pose) "robot_pose" or "metadata". The names should be firmly given. Is it ok for you @m3d ? If so i will complete it in Multicam.

@tajgr tajgr requested a review from m3d February 18, 2022 17:20
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