You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS Version: Ubuntu 24.04
rviz version: ros2 jazzy
Compiler name and version number: Ubuntu clang version 18.1.3
Source or binary build?
source build
build options: --mixin asan-gcc
Description
There is a potential issue in the MovableText::calculateTotalDimensionsForPositioning function regarding the calculation of space width (space_width_). This issue causes incorrect total width calculation for the text, which affects text alignment and bounding box computation, leading to test failures.
Running main() from gmock_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from MovableTextTestFixture
[ RUN ] MovableTextTestFixture.centerAlignmentWorksCorrectlyWithSpaces
[rviz_rendering:debug] Available Renderers(1): OpenGL Rendering Subsystem, at /home/shangzh/ros2_jazzy/src/ros2/rviz/rviz_rendering/src/rviz_rendering/render_system.cpp:289
[rviz_rendering:info] Stereo is NOT SUPPORTED, at /home/shangzh/ros2_jazzy/src/ros2/rviz/rviz_rendering/src/rviz_rendering/render_system.cpp:531
[rviz_rendering:info] OpenGl version: 4.3 (GLSL 4.3), at /home/shangzh/ros2_jazzy/src/ros2/rviz/rviz_rendering/src/rviz_rendering/render_system.cpp:272
/home/shangzh/ros2_jazzy/src/ros2/rviz/rviz_rendering/test/rviz_rendering/objects/movable_text_test.cpp:43: Failure
Value of: movable_text->getBoundingBox()
Expected: (has minimum (expected: Vector3(-2.11111, -2, 0))) and (has maximum (expected: Vector3(2.11111, 0, 0)))
Actual: AxisAlignedBox(min=Vector3(-2, -2, 0), max=Vector3(2, 1.17549e-38, 1.17549e-38)) (of type Ogre::AxisAlignedBox)
[ FAILED ] MovableTextTestFixture.centerAlignmentWorksCorrectlyWithSpaces (1922 ms)
[----------] 1 test from MovableTextTestFixture (1922 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1922 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] MovableTextTestFixture.centerAlignmentWorksCorrectlyWithSpaces
1 FAILED TEST
Expected behavior
The calculateTotalDimensionsForPositioning function should correctly calculate the total height and width of the text, with the space character properly accounting for the expected width. The bounding box of the text should accurately reflect the content, especially when using H_CENTER horizontal alignment, where the bounding box should be symmetrically calculated and match the expected values.
Actual behavior
The actual behavior shows a discrepancy in the calculation of space width, leading to incorrect total width and, consequently, an incorrect bounding box. The test assertions expect certain values for the bounding box, but the actual max value is unexpectedly small, particularly when dealing with space characters.
Additional information
No response
The text was updated successfully, but these errors were encountered:
Operating System:
Linux shangzh-VMware-Virtual-Platform 6.11.0-21-generic #21~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Feb 24 16:52:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
ROS version or commit hash:
ros2 jazzy
RMW implementation (if applicable):
No response
RMW Configuration (if applicable):
No response
Client library (if applicable):
rviz
'ros2 doctor --report' output
ros2 doc --report
Steps to reproduce issue
Environment
OS Version: Ubuntu 24.04
rviz version: ros2 jazzy
Compiler name and version number: Ubuntu clang version 18.1.3
Source or binary build?
source build
build options: --mixin asan-gcc
Description
There is a potential issue in the MovableText::calculateTotalDimensionsForPositioning function regarding the calculation of space width (space_width_). This issue causes incorrect total width calculation for the text, which affects text alignment and bounding box computation, leading to test failures.
Test Case
Output
Expected behavior
The calculateTotalDimensionsForPositioning function should correctly calculate the total height and width of the text, with the space character properly accounting for the expected width. The bounding box of the text should accurately reflect the content, especially when using H_CENTER horizontal alignment, where the bounding box should be symmetrically calculated and match the expected values.
Actual behavior
The actual behavior shows a discrepancy in the calculation of space width, leading to incorrect total width and, consequently, an incorrect bounding box. The test assertions expect certain values for the bounding box, but the actual max value is unexpectedly small, particularly when dealing with space characters.
Additional information
No response
The text was updated successfully, but these errors were encountered: