Пример #1
0
 /// <summary>
 /// Extends the type <c>Twist</c> with a method <c>ToTwistMessage</c>, which creates an time stamped twist message.
 /// </summary>
 /// <param name="twist">Twist</c> object to be extended</param>
 /// <param name="stamp">A time message</param>
 /// <returns>Returns an instance of <c>geometry_msgs.TwistStamped</c>.</returns>
 public static geometry_msgs.TwistStamped ToTwistStampedMessage(this Twist twist, std_msgs.Time stamp = null)
 {
     return(new geometry_msgs.TwistStamped()
     {
         header = new std_msgs.Header()
         {
             stamp = stamp ?? TimeData.Zero.ToMessage(), frame_id = twist.Frame
         },
         twist = twist.ToTwistMessage(),
     });
 }