Skip to content

added gyro and accel graph #13849

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

Merged
merged 5 commits into from
Apr 2, 2025

Conversation

Noy-Zini
Copy link
Contributor

GyroAccel-graph

@Noy-Zini Noy-Zini requested a review from Nir-Az March 13, 2025 13:24
@Nir-Az
Copy link
Collaborator

Nir-Az commented Mar 16, 2025

Can you send a build on team so I can play with? and add the new UI screenshot this this PR description? Tnx

@Noy-Zini Noy-Zini force-pushed the Accel-and-Gyro-Graphs branch from 7441483 to 5428476 Compare March 18, 2025 08:38
{
double ts = glfwGetTime();

if (ts - _last_time > _update_rate)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider using rsutils::time::periodic_timer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made the change to rsutils::time::periodic_timer, its more intuitive.

bool _paused = false;

const int VECTOR_SIZE = 300;
std::vector< float > _x_history, _y_history, _z_history, _n_history;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not using an std::queue ?
You are using the vector as a queue right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right but I used std::vector as a queue because ImPlot::PlotLine function requires const T* xs and const T* ys, which means it needs direct access to the underlying array. With std::vector, I can simply use .data() to get a raw pointer to the data. I can't do that with, std::queue unless I use conversions.

@@ -792,6 +839,21 @@ namespace rs2
if (show_metadata)
stream_model::draw_stream_metadata(timestamp, timestamp_domain, frame_number, profile, original_size, stream_rect);

if (show_graph)
{
if (dev->is_paused() || (p && p.current_status() == RS2_PLAYBACK_STATUS_PAUSED))
Copy link
Collaborator

Choose a reason for hiding this comment

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

2 questions.

  1. Did you test with D555 Eth mode?
  2. Did you test playback mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Made the test, in this case this option is not shown (the button isn't displayed) right now, we can add that in the future.
  2. It works

@Noy-Zini Noy-Zini requested a review from Nir-Az April 2, 2025 09:10
@Nir-Az Nir-Az merged commit 567c393 into IntelRealSense:development Apr 2, 2025
25 checks passed
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