Skip to content

Conversation

@cadkin
Copy link

@cadkin cadkin commented Oct 24, 2025

I'm not sure if it was documented anywhere, but it seems like the handler parameter for message converters was not getting called. I found a fix to that and decided to see about fixing the re-calling of the converter itself as well.

Small disclaimer: I am not a web developer, I mostly do C++. If something is wrong please let me know!

User-Facing Changes

  • registerMessageConverter handler callback will now be called.
  • Message converters should now be re-run when the associated settings change.

Description

Should close #503.

Checklist

  • The web version was tested and it is running ok
  • The desktop version was tested and it is running ok
  • This change is covered by unit tests
  • Files constants.ts, types.ts and *.style.ts have been checked and relevant code snippets have been relocated

Adds a new input to the buildRenderState() function called `forceConversion`. As
the name implies, any topic in this set will be forcefully reconverted on the
current frame.

Right now, its only being used after the callback for a given message converter,
but it could be a useful facility to expose to the user in the render state at
some point.

Should fix lichtblick-suite#503.
@carolinabamorim
Copy link
Contributor

Hi @cadkin thank you very much for your PR. we will review it and in case we have any questions we will comment here.
Thank you

@thomassedlmayer
Copy link
Contributor

thomassedlmayer commented Dec 4, 2025

Hi @cadkin, I tried out your changes with our extension (asam-osi-converter) to give some feedback. We'd be very happy if this feature makes it to the release.

But I found some issues:

  1. When playback is paused, all our settings are immediately applied to the 3d render (with exception, see 5).
  2. For most settings this also works during playback.
  3. But for two settings (toggle visualization of large triangle list primitives/lane network), it doesn't remove the objects from render when toggling Off during playback even though the deletions are generated and returned by the converter function. The objects just keep being rendered as the playback proceeds until clicking somewhere in the timeline. Note that this has worked before.
  4. Toggling On works for all settings (with exception, see 5).
  5. The following issue happens for all settings: When pausing after playback, toggling On or Off does only work after switching back and forth once. Then it works reliably during pause.

This gif shows (5)
lichtblick-bug

I verified that (3) is not a bug in our extension: The following screenshot shows the moment of switching the toggle button for showPhysicalLanes to Off. In the console log there is the panel settings object and then the "proof" that deletions of these triangle list primitives are actually passed to lichtblick. In the 3d panel the objects (blue and red lines) are still visualized. When I click somewhere in the timeline, the objects disappear.

image

I guess, it's probably not an issue of this PR but rather an underlying issue in lichtblick? The converter is actually called as expected. Maybe that's something you could check before merging this, @carolinabamorim?

@carolinabamorim
Copy link
Contributor

we will check it, thanks for the heads-up @thomassedlmayer

@cadkin
Copy link
Author

cadkin commented Dec 8, 2025

Hey @thomassedlmayer, I appreciate you taking a look.

  1. But for two settings (toggle visualization of large triangle list primitives/lane network), it doesn't remove the objects from render when toggling Off during playback even though the deletions are generated and returned by the converter function. The objects just keep being rendered as the playback proceeds until clicking somewhere in the timeline. Note that this has worked before.

I would hazard a guess that you're right, this does seem like an internal issue. I can't replicate it however; I looked though your extension and it seems like we are doing mostly the same things. The only meaningful difference I see is that we are converting a ROS2 message, were as you seem to be using an actual schema (osi3.SensorView). Not sure if this is handled differently internally, but might be worth a look.

  1. The following issue happens for all settings: When pausing after playback, toggling On or Off does only work after switching back and forth once. Then it works reliably during pause.

Again, I cannot replicate this. See below for the behavior I observe:

out.mp4

Your use case is much more complicated than mine, but if it is useful I've pushed up a copy of our ROS2 message package + extension. Here's the most relevant code.

I'm not sure how helpful I can be, but if there is something I can do let me know.

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.

Settings API setting changes are not being applied to current frame.

3 participants