úÎT¡O*?      !"#$%&'()*+,-./0123456789:;<=>Alexander Krupenkin 2016BSD3 mail@akru.meexp POSIX / WIN32None3Compute MD5 for given message with user type hashesŸRecursively generate MD5 for subtype. Have to build up dependency representation for subtype in order to generate MD5. +List of pairs: user type name, message hashFull message source Message MD5Alexander Krupenkin 2016BSD3 mail@akru.me experimental POSIX / WIN32Safe ,ROSTime is a tuple of (seconds, nanoseconds)0ROSDuration is a tuple of (seconds, nanoseconds)ROS message is a list of fields 7ROS message field is a variable or constant declaration Variable field name and type #Constant field name, type and value Field is a pair of name - value Field name is text encodedKA variant type describing the types that may be included in a ROS message.SA variant type describing the simple types that may be included in a ROS message.  !"#  !"#  !"#    !"#Alexander Krupenkin 2016BSD3 mail@akru.me experimental POSIX / WIN32None +%Sometime ROS messages have a special Headert field. It used for tracking package sequence, time stamping and frame tagging. Headers is frequently field. The +O type class lifts header fields on the top of message and abstracting of type.,Get sequence number-Set sequence number.Get timestamp of message/Get frame of message0cHaskell native type for ROS message language described data structure. Serialization guaranted by ?> super class. And no more is needed for transfer over socket.1Get message type string, e.g.  std_msgs/Char2Get message source3#Get recurrent MD5 of message source +,-./0123 +,-./0123 0123+,-./+,-./0123Alexander Krupenkin 2016BSD3 mail@akru.me experimental POSIX / WIN32Safe@Show simple typeA3All of simple type and its text representation listB Line getterCValid ROS identifier parserDROS message comments parserE#Parse fields defined in the messageF&Parse constants defined in the message4The ROS message language parser@ABCDEF444@ABCDEF4Alexander Krupenkin 2016BSD3 mail@akru.me experimental POSIX / WIN32SafeGBuilder creator from 50Create lazy text builder from message definition2Render formal ROS message definition according to:comments removedwhitespace removed%package names of dependencies removed<constants reordered ahead of other declarations from 0http://www.ros.org/wiki/ROS/Technical%20OverviewThe genmsgÿ= python implementation says: Compute the text used for md5 calculation. MD5 spec states that we removes comments and non-meaningful whitespace. We also strip packages names from type names. For convenience sake, constants are reordered ahead of other declarations, in the order that they were originally defined.6Render message definition to H instantlyG565656G56Alexander Krupenkin 2016BSD3 mail@akru.me experimental POSIX / WIN32None,0DI7'A type for fixed arrays in ROS messages:!A type for arrays in ROS messagesISimple I4 type TODO: migrate to more performance vector type789:;<IJKLMNOPQ789:;< 789:;<IJKLMNOPQAlexander Krupenkin 2016BSD3 mail@akru.me experimental POSIX / WIN32None+,-./0123789:;<0123+,-./789:;<Alexander Krupenkin 2016BSD3 mail@akru.me experimental POSIX / WIN32NoneDOT=0Generate ROS message declarations from .msg file>GQQ for data type and instances generation from ROS message declarationR"Take user type from text type nameSField to Type converterTtEnsure that field and constant names are valid Haskell identifiers and do not coincide with Haskell reserved words.U%Sanitize identifier for valid HaskellV\Generate the name of the Haskell type that corresponds to a flat (i.e. non-array) ROS type.WDefault value of fieldX(Field definition to record var converterY Generate the 2 0 class implementationZ*Take list of external types and it's TypeQXXX: Original python genmsg@ implementation ignore arrays for hashing, it seems that types A and `A[]` has the same hash.[ Generate the 3 0 class implementation\2Generate the getType Message class implementation ]Lens signature^©Given a record field name, produces a single function declaration: lensName :: forall f. Functor f => (a -> f a') -> b -> f b' lensName f a = (x -> a { field = x }) _& f (field a) FROM: Lens.Family.THCore`'Instance declaration with empty contexta1Simple data type declaration with one constructorbSimple function declarationcLenses declarationsdData type declarationeBinary instance declarationfDefault instance declarationgMessage instance declarationhStamped instance declarationi5TemplateHaskell codegen from the ROS message languagej!Simple parse ROS message and show=>RSTUVWXYZ[\]^`abcdefghij=>>==>RSTUVWXYZ[\]^`abcdefghijk    !"#$%&'()*+,-./0123456789:;<=>?@ABCDDEFFGHAIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz%rosmsg-0.5.2.0-2IZODhzja2SL3Wo3JAf7JiRobotics.ROS.Msg.ParserRobotics.ROS.Msg.MD5Robotics.ROS.Msg.TypesRobotics.ROS.Msg.ClassRobotics.ROS.Msg.RenderRobotics.ROS.MsgRobotics.ROS.Msg.THRobotics.ROS.Msg.ROSArray*attoparsec-0.13.1.0-K5Fyc3MOMYs22DiprZQxLMData.Attoparsec.Text.LazyparseDoneFailResult$pureMD5-2.1.3-BRwY16dUq7vJn2ObrbDwErData.Digest.Pure.MD5 MD5Digest computeMD5ROSTime ROSDuration MsgDefinitionFieldDefinitionVariableConstantField FieldName FieldTypeSimpleCustomArray FixedArray SimpleTypeRBoolRByteRCharRInt8RUInt8RInt16RUInt16RInt32RUInt32RInt64RUInt64RFloat32RFloat64RStringRTime RDuration$fShowSimpleType$fEnumSimpleType$fEqSimpleType$fShowFieldType $fEqFieldType$fShowFieldDefinition$fEqFieldDefinitionStamped getSequence setSequencegetStampgetFrameMessagegetType getSource getDigestrosmsgrenderrenderT ROSFixedArray unFixedArrayROSArrayunArray rosmsgFrombinary-0.8.3.0Data.Binary.ClassBinaryshowType simpleAssoctakeLine identifiercommentvariableParserconstantParserrosType#text-1.2.2.1-9Yh8rJoh8fO2JMLWffT3QsData.Text.InternalTextsizemodify$fBinaryROSFixedArray$fDefaultROSFixedArray$fMonoidROSFixedArray$fBinaryROSArray$fDefaultROSArray$fMonoidROSArray customTypetypeQ sanitizeFieldsanitize mkFlatTypedefFieldfieldQ mkGetSource userTypes mkGetDigest mkGetTypelensSig deriveLensbaseGHC.Basefmap instanceD'dataD'funD'mkLensesmkDatamkBinary mkDefault mkMessage mkStamped quoteMsgDec quoteMsgExp