Skip to content

Commit a661fe6

Browse files
committed
Fix SIGSEGV on ROS 2 Rolling caused by rosidl sequence ABI change
1 parent 53a5855 commit a661fe6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

rosidl_gen/templates/message-template.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,14 @@ ${
347347
: ` data: ${refArrayType},`
348348
}
349349
size: ref.types.size_t,
350-
capacity: ref.types.size_t
350+
capacity: ref.types.size_t,
351+
${
352+
isPrimitivePackage(spec.baseType)
353+
? ` ...require('../../lib/distro.js').getDistroId() >= require('../../lib/distro.js').getDistroId('rolling')
354+
? { is_rosidl_buffer: ref.types.bool, owns_rosidl_buffer: ref.types.bool }
355+
: {}`
356+
: ''
357+
}
351358
});
352359
353360
${generateWrapperClass()}

0 commit comments

Comments
 (0)