v-kiniv / rws

WebSocket gateway for ROS2 topics and services
Apache License 2.0
10 stars 7 forks source link

Use full path when generating typedefs for message type #33

Closed martinfri closed 2 months ago

martinfri commented 2 months ago

Hi! I have notice that running foxglove with the bridge show some errors when trying to parse /topics_and_raw_types for complex types. E.g. types that contains e.g. a header type. It cannot solve Header it needs the full path std_msgs/msg/Header.

See console errors from browser below

3524.0ed3d11ba3fb8482838c.js:79 Error: Expected 1 top level type definition for 'Header' but found 0 at f (5820.27f2c9eaba8daa4be416.js:32:1250) at 5820.27f2c9eaba8daa4be416.js:32:487 at Array.forEach (<anonymous>) at 5820.27f2c9eaba8daa4be416.js:32:408 at Array.forEach (<anonymous>) at e (5820.27f2c9eaba8daa4be416.js:32:371) at t (5820.27f2c9eaba8daa4be416.js:32:338) at #T (3524.0ed3d11ba3fb8482838c.js:79:22247) (anonymous) @ 3524.0ed3d11ba3fb8482838c.js:79 3524.0ed3d11ba3fb8482838c.js:79 Player problem requestTopics:error {severity: 'error', message: 'Failed to fetch topics from rosbridge', error: Error: Expected 1 top level type definition for 'Header' but found 0 at f (https://app.foxglove…}

This fix solves the errors

v-kiniv commented 2 months ago

Hi, thanks for the fix! It was working with Foxglove before, so I assume something has changed in Foxglove recently.