Skip to content

Commit eb5aeeb

Browse files
Add note on message builder API
Signed-off-by: Luca Della Vedova <[email protected]>
1 parent 2b99397 commit eb5aeeb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rclrs/src/dynamic_message.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ impl DynamicMessage {
359359
/// `std_msgs/msg/String`.
360360
///
361361
/// The message instance will contain the default values of the message type.
362+
///
363+
/// This method might not be the most efficient because of the library loading. If you need to
364+
/// instantiate multiple messages of the same type consider using
365+
/// [`crate::dynamic_message::DynamicMessageMetadata::create`]
362366
pub fn new(message_type: MessageTypeName) -> Result<Self, DynamicMessageError> {
363367
DynamicMessageMetadata::new(message_type)?.create()
364368
}

0 commit comments

Comments
 (0)