Skip to content
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

Text Marker spacing is disproportionately large for small text #1336

Open
rr-tom-noble opened this issue Feb 11, 2025 · 3 comments
Open

Text Marker spacing is disproportionately large for small text #1336

rr-tom-noble opened this issue Feb 11, 2025 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@rr-tom-noble
Copy link

rr-tom-noble commented Feb 11, 2025

Version:
humble binary (ros-humble-rviz2 11.2.16-1jammy.20250114.194245 via apt)

Issue:

See attached screenshots. The first shows a Text Marker of scale 1. The one after shows the same marker with a single space character added, which also seems to display reasonably:

Image

Image

The following images show the text with a scale of 0.01. The space character (which is still just a single space, no changes made to the text content) ends up comically large compared to the rest of the text:

Image

Image

Desired Solution:

Spaces in text should also scale down with the text size. My feeling is that it may be using fixed size spacing (e.g. size 1 spacing regardless of scale). This desired solution is also the default behaviour in ROS1, so there may have been a fix already that just needs porting to ROS2

@rr-tom-noble
Copy link
Author

rr-tom-noble commented Feb 11, 2025

Ah I think I might've found the issue. Looks like scale.x is now used to control spacing?

if (new_message->scale.x != 0.0) {
text_->setSpaceWidth(new_message->scale.x);
}

Edit: Confirmed to work by setting scale.x to scale.z

@rr-tom-noble
Copy link
Author

rr-tom-noble commented Feb 12, 2025

Leaving this open as I'm unsure if there's a wiki page similar to https://wiki.ros.org/rviz/DisplayTypes/Marker (which is ROS1, but is the only result I get). Is there an equivalent, and does it need updating to reflect this field? Happy to raise a PR if so, otherwise happy to close.

@audrow audrow added the help wanted Extra attention is needed label Feb 20, 2025
@audrow
Copy link
Member

audrow commented Feb 20, 2025

If anyone can do this, please port into the ROS 2 Rviz docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants