Skip to content

Default all streams of an untagged sensor to one shared frame rate - #3556

Merged
AviaAv merged 4 commits into
realsenseai:ros2-developmentfrom
AviaAv:rsdev-13629-ros-motion-fps-defaults
Sep 2, 2026
Merged

AviaAv merged 4 commits into
realsenseai:ros2-developmentfrom
AviaAv:rsdev-13629-ros-motion-fps-defaults

Conversation

@AviaAv

@AviaAv AviaAv commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Tracked on: [RSDEV-13629]

@AviaAv
AviaAv requested a review from Nir-Az September 1, 2026 14:54

@sysrsbuild-gh-agentic sysrsbuild-gh-agentic left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Auto-generated review by rs-agentic bot. Two potential bugs found in the fallback profile selection logic.

@Nir-Az

Nir-Az commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Since getDefaultProfiles() sits on the base class, this changes VideoProfilesManager too. For an untagged video sensor with a single stream every fps bucket ties at size 1, so the default silently becomes the lowest fps the sensor offers rather than the first enumerated profile. Could we keep the base fallback as _all_profiles.front() and move the bucket logic into a virtual getFallbackProfiles() overridden in MotionProfilesManager? Same fix for motion, no blast radius on video.

Last one: if accel and gyro share no rate at all, the loop returns one of them and the other keeps its own min, so we're back to mismatched rates at stream start with nothing in the log. A ROS_WARN when the result covers fewer streams than the sensor has would make that visible.

🤖 Generated by AI

Nir-Az
Nir-Az previously approved these changes Sep 2, 2026

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Structure looks good now — base fallback is unchanged so the video path is untouched, and the shared-rate logic is confined to motion where it belongs. Only leftover is the non-blocking log suggestion above.

🤖 Generated by AI

@AviaAv
AviaAv merged commit adbedc5 into realsenseai:ros2-development Sep 2, 2026
9 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.

3 participants