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

Getting error on initalizing webviz #297

Closed
cjds opened this issue Dec 25, 2019 · 9 comments
Closed

Getting error on initalizing webviz #297

cjds opened this issue Dec 25, 2019 · 9 comments

Comments

@cjds
Copy link

cjds commented Dec 25, 2019

I tried to build webviz using npm run build and npm run docs but I get

Error initializing player
Error: Expected 1 top level type definition for 'Header' but found 0
    at findTypeByName (https://webviz.io/dist/WorkerDataProvider.worker.js?0441abdf8c8d84b2f526:122:2477)
    at https://webviz.io/dist/WorkerDataProvider.worker.js?0441abdf8c8d84b2f526:122:3089
    at Array.forEach (<anonymous>)
    at https://webviz.io/dist/WorkerDataProvider.worker.js?0441abdf8c8d84b2f526:122:3027
    at Array.forEach (<anonymous>)
    at parseMessageDefinition (https://webviz.io/dist/WorkerDataProvider.worker.js?0441abdf8c8d84b2f526:122:2977)
    at https://webviz.io/dist/WorkerDataProvider.worker.js?0441abdf8c8d84b2f526:527:333
    at Array.forEach (<anonymous>)
    at exports.bagConnectionsToDatatypes (https://webviz.io/dist/WorkerDataProvider.worker.js?0441abdf8c8d84b2f526:527:278)
    at exports.default.initialize (https://webviz.io/dist/WorkerDataProvider.worker.js?0441abdf8c8d84b2f526:407:3325)

when I drag and drop a bag into the UI

@cjds
Copy link
Author

cjds commented Dec 25, 2019

Commit I'm trying out is e9835e5

@janpaul123
Copy link
Contributor

Looks like an issue with the bag. How was it recorded? Any chance you can share it with us?

@cjds
Copy link
Author

cjds commented Dec 26, 2019

I'll check but it might have been through a simulator. I will sanitize the bag of private information and attach it

@cjds
Copy link
Author

cjds commented Jan 2, 2020

@janpaul123
Copy link
Contributor

What version of ROS are you on? The message definitions looks pretty old and malformed. First it uses the old Header definition instead of std_msgs/Header, but that's allowed per the bag format. But also there is a topic which uses DiagnosticStatus in the message definition, but the definition for DiagnosticStatus itself is not present in that header. That looks malformed per the description here: "message_definition: full text of message definition (output of gendeps --cat)".

@cjds
Copy link
Author

cjds commented Jan 2, 2020

Sorry, I don't think I follow your comment (not super well versed with the rosbag format).

  1. We're using Melodic
  2. To generate the DiagnosticStatus messages we're using https://github.com/ros/diagnostics which hasn't been changed since Indigo but does have a melodic release (maybe a PR to that is needed). (Assuming you are talking about the /diagnostics_toplevel_state topic)
  3. Could you point me to the topic using the old school Header message because I wasn't able to find it using old school rosbag info?

Thanks

@janpaul123
Copy link
Contributor

Huh, weird. To clarify: the problem seems to be that the bag does not properly contain the message definitions inside. How did you generate the bag? Did you just use rosbag record or something else?

@janpaul123
Copy link
Contributor

I suspect that there's something weird with how the bag was generated, because when I run rosbag fix 2019-12-06-05-44-04.088091_task-3715_action-57980_freight100-1274_0.bag out.bag --force then it produces a bag that I can play with Webviz just fine.

@cjds
Copy link
Author

cjds commented Jan 2, 2020

I think that may be it...

We use the rosbag C++ API directly.

https://github.com/ros/ros_comm/tree/melodic-devel/tools/rosbag

Specifically https://github.com/ros/ros_comm/blob/melodic-devel/tools/rosbag_storage/include/rosbag/bag.h#L165 that line is what it comes down to.

I think I'll check the changes that fix is doing and either make an upstream change to rosbag or change our downstream use of it. Thanks for the help.

@cjds cjds closed this as completed Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants