Skip to content

Commit

Permalink
DDS Y16 streaming is mono16 for ROS2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
OhadMeir committed Jan 13, 2025
1 parent d40c2e2 commit bb1b76d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion third-party/realdds/py/pyrealdds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ PYBIND11_MODULE(NAME, m) {
.def( "__repr__", []( dds_video_encoding const & self ) { return self.to_string(); } );
video_encoding.attr( "z16" ) = dds_video_encoding( "16UC1" );
video_encoding.attr( "y8" ) = dds_video_encoding( "mono8" );
video_encoding.attr( "y16" ) = dds_video_encoding( "Y16" ); // todo should be mono16
video_encoding.attr( "y16" ) = dds_video_encoding( "mono16" );
video_encoding.attr( "byr2" ) = dds_video_encoding( "BYR2" );
video_encoding.attr( "yuyv" ) = dds_video_encoding( "yuv422_yuy2" );
video_encoding.attr( "uyvy" ) = dds_video_encoding( "uyvy" );
Expand Down
4 changes: 2 additions & 2 deletions third-party/realdds/src/dds-stream-profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int dds_video_encoding::to_rs2() const
{ "mono8", RS2_FORMAT_Y8 }, // Used by IR streams; ROS2-compatible
{ "Y8I", RS2_FORMAT_Y8I },
{ "W10", RS2_FORMAT_W10 },
{ "Y16", RS2_FORMAT_Y16 },
{ "mono16", RS2_FORMAT_Y16 }, // Used by IR streams; ROS2-compatible
{ "Y12I", RS2_FORMAT_Y12I },
// { "Y16I", RS2_FORMAT_Y16I },
{ "16UC1", RS2_FORMAT_Z16 }, // Used by depth streams; ROS2-compatible
Expand Down Expand Up @@ -113,7 +113,7 @@ dds_video_encoding dds_video_encoding::from_rs2( int rs2_format )
case RS2_FORMAT_Y8: encoding = "mono8"; break;
case RS2_FORMAT_Y8I: encoding = "Y8I"; break;
case RS2_FORMAT_W10: encoding = "W10"; break;
case RS2_FORMAT_Y16: encoding = "Y16"; break;
case RS2_FORMAT_Y16: encoding = "mono16"; break;
case RS2_FORMAT_Y12I: encoding = "Y12I"; break;
// case RS2_FORMAT_Y16I: encoding = "Y16I"; break;
case RS2_FORMAT_Z16: encoding = "16UC1"; break;
Expand Down

0 comments on commit bb1b76d

Please sign in to comment.