-
Notifications
You must be signed in to change notification settings - Fork 17
belief file csv output #483
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
Open
josephvanpeltkw
wants to merge
6
commits into
PTG-Kitware:master
Choose a base branch
from
josephvanpeltkw:dev/belief_file_out
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fafc277
add new script to output the belief file csv
josephvanpeltkw 0dd80f5
black formatting
josephvanpeltkw 5012bd3
add gsp to the latency tracker
josephvanpeltkw 3e99e35
black formatting changes
josephvanpeltkw 55e21ff
add missing param to R18 yaml and add rgba support for bag extraction
josephvanpeltkw 4ed06b7
add zed support back to docker
josephvanpeltkw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,7 +130,7 @@ def __init__(self): | |
| .string_value | ||
| ) | ||
| self.pv_image_frame_id = ( | ||
| self.declare_parameter("pv_image_frame_id", "PVFramesBGR") | ||
| self.declare_parameter("pv_image_frame_id", "/kitware/pv_image_detections_2d")#"PVFramesBGR") | ||
| .get_parameter_value() | ||
| .string_value | ||
| ) | ||
|
|
@@ -146,8 +146,11 @@ def __init__(self): | |
| self.msg_type_to_handler_map = {} | ||
| if self.extract_audio: | ||
| self.msg_type_to_handler_map[HeadsetAudioData] = self.handle_audio_msg | ||
| if self.extract_images or self.extract_depth_images: | ||
| self.msg_type_to_handler_map[Image] = self.handle_image_msg | ||
| self.log.info(f"---------- images: {self.extract_images}") | ||
| #if self.extract_images or self.extract_depth_images: | ||
|
|
||
| self.msg_type_to_handler_map[Image] = self.handle_image_msg | ||
|
|
||
| if self.extract_eye_gaze_data: | ||
| self.msg_type_to_handler_map[EyeGazeData] = self.handle_eye_gaze_msg | ||
| if self.extract_head_pose_data or self.extract_depth_head_pose_data: | ||
|
|
@@ -259,7 +262,7 @@ def parse_bag(self) -> None: | |
| self.num_total_msgs += 1 | ||
|
|
||
| if (self.num_total_msgs % 100) == 0: | ||
| self.log.info(f"Parsing message: {self.num_total_msgs}") | ||
| self.log.info(f"Parsing message: {self.num_total_msgs} type: {type(msg)}") | ||
|
|
||
| # Attempt to call the message handler for this message type | ||
| try: | ||
|
|
@@ -561,7 +564,8 @@ def handle_image_msg(self, msg: Image) -> None: | |
| Converts the PV images to RGB and saves them to disk. | ||
| Converts the depth images to 16-bit grayscale and saves them to disk. | ||
| """ | ||
| if msg.encoding in ["nv12", "rgb8", "bgr8"] and self.extract_images: | ||
| print(f"Image message received: {msg.encoding}") | ||
| if msg.encoding in ["nv12", "rgb8", "rgba8", "bgr8"]: # and self.extract_images: | ||
| self.num_image_msgs += 1 | ||
|
|
||
| if msg.encoding == "nv12": | ||
|
|
@@ -570,6 +574,9 @@ def handle_image_msg(self, msg: Image) -> None: | |
| else: | ||
| rgb_image = bridge.imgmsg_to_cv2(msg, msg.encoding) | ||
|
|
||
| if "rgb" in msg.encoding: | ||
| rgb_image = cv2.cvtColor(rgb_image, cv2.COLOR_BGRA2RGBA) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is L575 not outputting an RGB image already when the |
||
|
|
||
| # Save image to disk | ||
| timestamp_str = ( | ||
| f"{msg.header.stamp.sec:011d}_{msg.header.stamp.nanosec:09d}" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I would have expected this to just need to be
"pv_image_detections_2d", and the namespace under which the bag play happens does appropriate namespace prepending to messages emitted?