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

RViz may crash when TF's childFrameId is " " #1699

Closed
qinshichao opened this issue Jan 27, 2022 · 6 comments · Fixed by #1700
Closed

RViz may crash when TF's childFrameId is " " #1699

qinshichao opened this issue Jan 27, 2022 · 6 comments · Fixed by #1700

Comments

@qinshichao
Copy link

When the childframeid of TF is ' ' and subscribed, RViz will crash.
bug

When the childframeid of TF is '\a' or '\e' or other strings starting with' \ ',Abnormal display of RViz.
Abnormal display

Your environment

  • OS Version: e.g. Ubuntu 18.04
  • ROS Distro: [Melodic]
  • RViz, Qt, OGRE, OpenGl version as printed by rviz:

bug

@rhaschke
Copy link
Contributor

I cannot confirm these issues:
TF already rejects/ignores an empty child transform with the following error message on console:
[ERROR] ros.rosconsole_bridge.TF_NO_CHILD_FRAME_ID: Ignoring transform from authority "unknown_publisher" because child_frame_id not set

When sending a child frame with a non-printable control character in its name (e.g. \a), what exactly do you expect to happen?

@qinshichao
Copy link
Author

I cannot confirm these issues: TF already rejects/ignores an empty child transform with the following error message on console: [ERROR] ros.rosconsole_bridge.TF_NO_CHILD_FRAME_ID: Ignoring transform from authority "unknown_publisher" because child_frame_id not set

When sending a child frame with a non-printable control character in its name (e.g. \a), what exactly do you expect to happen?

It's not empty, it's a space.
When sending a child frame with a non-printable control character in its name (e.g. \a), I expect it to remain '\ a' without escape.

@rhaschke
Copy link
Contributor

It's not empty, it's a space.

Thanks for clarification. Now, I was able to reproduce the issue and the fix was trivial: #1700
To have a frame name like \a you obviously need to escape the backslash like so: "\\a"
image

@qinshichao
Copy link
Author

To have a frame name like \a you obviously need to escape the backslash like so: `"\a"
Can string escape be prevented in code?

@rhaschke
Copy link
Contributor

To have a frame name like \a you obviously need to escape the backslash like so: `"\a"

Can string escape be prevented in code?

No. That's about interpretation of chars in your programming language:

  • \a is interpreted as a control character
  • \\a is interpreted as backslash + letter a

@rhaschke
Copy link
Contributor

crash fixed via #1700.

@rhaschke rhaschke linked a pull request Jan 27, 2022 that will close this issue
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 a pull request may close this issue.

2 participants