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

Create ROS bag from Spectacular Log #347

Merged
merged 6 commits into from
Dec 2, 2024
Merged

Conversation

ewfuentes
Copy link
Owner

No description provided.

)

rgb_frame = frames.rgb_frame()
depth_frame = frames.depth_frame().astype(np.uint16)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
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)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
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,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
step=rgb_frame.shape[1] * 3,
step=rgb_frame.shape[1] * 3, # row length in bytes

frame_id='cam0'
)

rgb_frame = frames.rgb_frame()
Copy link
Collaborator

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

@ewfuentes ewfuentes merged commit f6fbd05 into main Dec 2, 2024
5 checks passed
@ewfuentes ewfuentes deleted the spectacular_to_rosbag branch December 2, 2024 19:07
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