Skip to content

revise dds metadata handling with overrides & depth-units#12394

Merged
maloel merged 14 commits into
realsenseai:developmentfrom
maloel:md-config
Nov 13, 2023
Merged

revise dds metadata handling with overrides & depth-units#12394
maloel merged 14 commits into
realsenseai:developmentfrom
maloel:md-config

Conversation

@maloel

@maloel maloel commented Nov 12, 2023

Copy link
Copy Markdown
Contributor
  • add nested functionality in rsutils::json
  • improve reliability debug output for writers/readers
  • fix software-device matcher creation:
    • the syncer showed: (TS: C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 C0 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR4 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 IR6 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 D2 M8 M8)
    • it now takes only unique (stream-uid) values, so now (TS: C0 D2 IR4 IR6)
    • device-proxy now uses the DLR_C matcher, which is also overridable in the settings
  • increase default reply timeout to 2 seconds
    • we were almost consistently running into the timeout right after stopping the sensor, even on the same computer
  • fix depth-unit
    • now set even when no MD
    • localized in depth-sensor-proxy
    • has a default value of 0.001, without which depth shows up as black

Tracked on [LRS-956]

@maloel maloel requested a review from OhadMeir November 12, 2023 07:51
Comment thread third-party/rsutils/include/rsutils/json.h
Comment thread third-party/realdds/src/dds-topic-writer.cpp Outdated
Comment thread third-party/realdds/src/dds-device-impl.cpp Outdated
Comment thread third-party/realdds/src/dds-serialization.cpp Outdated
Comment thread third-party/realdds/include/realdds/topics/flexible-msg.h
{
if( auto value = rsutils::json::nested( md, keystr ) )
{
if( value->is_number_integer() )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we will get something else, don't we want to infrom the user?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No. This is metadata; we ignore anything we cannot parse.
Same behavior as before -- just doesn't throw exceptions as much (which in Debug mode are constantly triggered).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we getting bad values in debug? DDS layer is supposed to check the message...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, the exceptions were when we just didn't find the values for the metadata

Comment thread src/dds/rs-dds-depth-sensor-proxy.cpp
Comment thread src/software-device.cpp
for (auto&& p : s->get_stream_profiles())
profiles.push_back(p.get());
for( auto const & s : _software_sensors )
for( auto const & p : s->_sw_profiles )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Calling get_raw_stream_profiles() is clearer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It doesn't exist any more :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is get_stream_profiles() or something like it but it returns a vector, not a reference. Since we're a software device and these are software sensors, I elected to access directly.

Comment thread third-party/realdds/doc/device.md

@OhadMeir OhadMeir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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