-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create ROS bag from Spectacular Log #347
Conversation
) | ||
|
||
rgb_frame = frames.rgb_frame() | ||
depth_frame = frames.depth_frame().astype(np.uint16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depth_frame = frames.depth_frame().astype(np.uint16) | |
depth_frame = frames.depth_frame().astype(np.uint16) # foxglove expects uint16 depth, doubles arr size |
encoding='mono16', | ||
is_bigendian=False, | ||
step=depth_frame.shape[1] * 2, | ||
data=depth_frame.flatten().view(np.uint8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data=depth_frame.flatten().view(np.uint8) | |
data=depth_frame.flatten().view(np.uint8) # ros expects list of uint8. View doesn't change size |
width=rgb_frame.shape[1], | ||
encoding='bgr8', | ||
is_bigendian=False, | ||
step=rgb_frame.shape[1] * 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
step=rgb_frame.shape[1] * 3, | |
step=rgb_frame.shape[1] * 3, # row length in bytes |
frame_id='cam0' | ||
) | ||
|
||
rgb_frame = frames.rgb_frame() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be worth renaming bgr_frame
No description provided.