@foxglove/rosmsg
Advanced tools
Comparing version 5.0.1 to 5.0.2
{ | ||
"name": "@foxglove/rosmsg", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "Parser for ROS and ROS 2 .msg definitions", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -559,2 +559,69 @@ // This file incorporates work covered by the following copyright and | ||
}); | ||
it("correctly resolves Header to std_msgs/Header", () => { | ||
const messageDefinition = ` | ||
StampedBool stamped_bool | ||
================================================================================ | ||
MSG: custom_msg/StampedBool | ||
Header header | ||
bool data | ||
================================================================================ | ||
MSG: std_msgs/Header | ||
uint32 seq | ||
time stamp | ||
string frame_id`; | ||
const types = parse(messageDefinition); | ||
expect(types).toEqual([ | ||
{ | ||
definitions: [ | ||
{ | ||
type: "custom_msg/StampedBool", | ||
isArray: false, | ||
name: "stamped_bool", | ||
isComplex: true, | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "custom_msg/StampedBool", | ||
definitions: [ | ||
{ | ||
type: "std_msgs/Header", | ||
isArray: false, | ||
name: "header", | ||
isComplex: true, | ||
}, | ||
{ | ||
type: "bool", | ||
isArray: false, | ||
name: "data", | ||
isComplex: false, | ||
}, | ||
], | ||
}, | ||
{ | ||
name: "std_msgs/Header", | ||
definitions: [ | ||
{ | ||
type: "uint32", | ||
isArray: false, | ||
name: "seq", | ||
isComplex: false, | ||
}, | ||
{ | ||
type: "time", | ||
isArray: false, | ||
name: "stamp", | ||
isComplex: false, | ||
}, | ||
{ | ||
type: "string", | ||
isArray: false, | ||
name: "frame_id", | ||
isComplex: false, | ||
}, | ||
], | ||
}, | ||
]); | ||
}); | ||
}); |
@@ -157,2 +157,5 @@ // This file incorporates work covered by the following copyright and | ||
return typeName === name; | ||
} else if (name === "Header") { | ||
// Header is a special case, see http://wiki.ros.org/msg#Fields | ||
return typeName === `std_msgs/Header`; | ||
} else if (typeNamespace) { | ||
@@ -159,0 +162,0 @@ // Type namespace is given, create fully-qualified name and match exact |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
287207
4563