Open cjds opened 4 years ago
Ah very interesting. We don't use latched topics as such, but we do have similar issues with our own bags. I'm currently actually working on something that should enable (2), but it's a pretty major refactor of our data storage APIs, so it might take a while. But it's my current priority internally as well, so that works out nicely. 😄
(2) would be the ideal solution for this I think so that works out. Let me know if you want any help on the smaller chunks. If you make them issues on this project I can help tackle some
+1 on a solution for this...
@cjds @bigredfrog update: still working on this, and @jasonimercer also mentioned this to me, so there's definitely a lot of interest. I had to pause working on it for a little bit though as we've had quite a few bugs that I've had to look into instead.
Btw @cjds and @bigredfrog, I'm trying to get to know our open source community better, and would love to learn more about what you use Webviz for. Could you perhaps shoot me an email at jp.posma@getcruise.com?
Sure will do
Hey @janpaul123 any update on this? If you can split the work into doable chunks, we can definitely help with it
Not yet! But this work is slated really soon.
Any updates on this?
Not yet. 😞 cc @MatthewSteel we should think about this as we're doing the preloading work.
A workaround for you could be to republish the latched topics at a regular interval. Not a great solution but maybe that can help for now?
That's actually interesting. So make a "node" that listens to those topics and republishes?
Yeah exactly. It's a bit hacky but it could help you until we build this feature properly.
Btw we also have a Slack workspace now if you want to talk to us more easily: https://github.com/cruise-automation/webviz/issues/461
Was trying to mess with this today and this is where I got till
In the below example, I was trying to use the global variable and a local variable in the node to try to republish the message.
The issues I ran into were:
As such I think I'm either doing the repub wrong or it isn't possible with this feature
import { Input, Messages } from "ros";
type Output = {};
type GlobalVariables = {
id: number;
localization: Messages.nav_msgs__OccupancyGrid;
};
let x: Messages.nav_msgs__OccupancyGrid;
export const inputs = [
"/atlas/localization",
"/controller_costmap_updater_clock"
];
export const output = "/webviz_node/my_new_map";
// Populate 'Input' with a parameter to properly type your inputs, e.g. 'Input<"/your_input_topic">'
const publisher = (
message:
| Input<"/localization">
| Input<"/controller_costmap_updater_clock">,
globalVars: GlobalVariables
): Messages.nav_msgs__OccupancyGrid | undefined => {
if (message.topic == "/atlas/localization") {
log("Resetting message");
x = message.message;
}
if (x !== undefined) {
log(x.info.resolution);
return x;
}
log("Variable is undefined");
};
export default publisher;
Hey guys Is there any update regarding the latching topics?
You should check out https://github.com/foxglove/studio, they might have added it!
Hello,
FYI @dbking77. We're having a problem with the way the 3dPanel keeps data between scrubbing on the timeline and latched topics. The problem is that when we seek forward and back on the timeline, the messages disappear
The problem comes down to the way the
seekPlayback
function is implemented here. Because all the latched messages in therosbag.js
are found at time 0 and because when you useseekPlayback
you go back in time by the SEEK_TIME when you scrub to a particular time, you lose all the latched messages from that time. For us this is particularly frustrating as our maps are latched.There are 2 ways we were thinking of to solve this issue:
getMessages
https://github.com/cruise-automation/webviz/blob/2e7db3aafffec39b541728668c97ce7d83eee007/packages/webviz-core/src/players/RandomAccessPlayer.js#L437 and then just pick up the last message from them regardless of time