Skip to content

No consistent type checking for string before publish #241

@qiuzhong

Description

@qiuzhong

Suppose we create a publish with std_msg/msg/String message.

var node = rclnodejs.createNode('any_node_name');
var publisher = node.createPublisher('std_msgs/msg/String', 'chatter');

// This doesn't throw a TypeError!
publisher.publish({a: 1});

Seems publisher with string type can work with object type.
But if I publish another inconsistent primitive type like publisher.publish(255); then a TypeError can be thrown:

TypeError: writeUInt64: Number/String 64-bit value required

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions