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