-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Added support for snapshot of imu and pose. #7440
Conversation
common/model-views.cpp
Outdated
{ | ||
bool ret = false; | ||
auto motion = frame.as< motion_frame >(); | ||
if( 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.
- if (motion
frame) - the two lines can be merged into:
if (auto motion = frame.as< motion_frame >())
{
auto axes = motion.get_motion_data();
...
common/model-views.cpp
Outdated
{ | ||
bool ret = false; | ||
auto pose = frame.as< pose_frame >(); | ||
if( 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.
Same as above
common/model-views.cpp
Outdated
csv << "Timestamp (ms)," << std::fixed << std::setprecision( 2 ) | ||
<< frame.get_timestamp() << std::endl; | ||
csv << std::setprecision( 7 ) << "acceleration," << pose_data.acceleration << std::endl; | ||
csv << std::setprecision( 7 ) << "angular_acceleration," << pose_data.angular_acceleration << std::endl; |
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.
Each one of those is a vector-like structure - need to verify that they will be presented comma-separated x,y,z,w
.
Specify units at the beginning/end of each field
Please attach an actual pose CSV captured for motion and pose for review
common/model-views.cpp
Outdated
csv << "Frame Number," << frame.get_frame_number() << std::endl; | ||
csv << "Timestamp (ms)," << std::fixed << std::setprecision( 2 ) | ||
<< frame.get_timestamp() << std::endl; | ||
csv << std::setprecision( 7 ) << "x," << axes.x << std::endl; |
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.
Please put those three values in a single CSV line + add units
common/model-views.cpp
Outdated
} | ||
|
||
auto pose = last_frame.as< pose_frame >(); | ||
if (pose && pose.get_profile().stream_type() == RS2_STREAM_POSE) |
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.
The stream type check can be omitted - imo redundant
common/model-views.cpp
Outdated
@@ -3125,6 +3181,59 @@ namespace rs2 | |||
} | |||
} | |||
|
|||
auto motion = last_frame.as< motion_frame >(); | |||
if( motion | |||
&& val_in_range( motion.get_profile().stream_type(), |
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.
stream check can be omitted
common/model-views.cpp
Outdated
ss << "The frame attributes are saved into\n" << filename; | ||
else | ||
viewer.not_model->add_notification( | ||
{ to_string() << "Failed to save frame metadata file " << filename, |
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.
Failed to save TBD frame metadata file
common/model-views.cpp
Outdated
ss << "The frame attributes are saved into\n" << filename; | ||
else | ||
viewer.not_model->add_notification( | ||
{ to_string() << "Failed to save frame metadata file " << filename, |
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.
Same as above
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.
Looks good
Fix for RS5-8691