{"action":"created","issue":{"url":"https://api.github.com/repos/phobon/RobotOS.jl/issues/7","labels_url":"https://api.github.com/repos/phobon/RobotOS.jl/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/phobon/RobotOS.jl/issues/7/comments","events_url":"https://api.github.com/repos/phobon/RobotOS.jl/issues/7/events","html_url":"https://github.com/phobon/RobotOS.jl/issues/7","id":74153985,"number":7,"title":"Cannot construct message of type std_msgs.msg.Float64","user":{"login":"ashwincarvalho","id":6913226,"avatar_url":"https://avatars.githubusercontent.com/u/6913226?v=3","gravatar_id":"","url":"https://api.github.com/users/ashwincarvalho","html_url":"https://github.com/ashwincarvalho","followers_url":"https://api.github.com/users/ashwincarvalho/followers","following_url":"https://api.github.com/users/ashwincarvalho/following{/other_user}","gists_url":"https://api.github.com/users/ashwincarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/ashwincarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashwincarvalho/subscriptions","organizations_url":"https://api.github.com/users/ashwincarvalho/orgs","repos_url":"https://api.github.com/users/ashwincarvalho/repos","events_url":"https://api.github.com/users/ashwincarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/ashwincarvalho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-07T22:49:38Z","updated_at":"2015-05-07T23:31:45Z","closed_at":null,"body":"I am trying to write a publisher node in Julia which broadcasts a message of type Float64. However, the constructor method for std_msgs.msg.Float64 doesn't seem to work. Here's the code that produces the error:\r\n```\r\nusing RobotOS\r\n@rosimport std_msgs.msg: Float64\r\ngentypes()\r\nusing std_msgs.msg\r\npub_msg = std_msgs.msg.Float64()\r\n```\r\nOutput:\r\n```\r\nERROR: `typezero` has no method matching typezero(::Type{Float64})\r\n in Float64MultiArray at no file\r\n```\r\n\r\nThis is the case with any of the '_ros_builtin_types_' defined in gentypes.jl. For example, if I run the above code with Float64MultiArray instead of Float64, I do not get this error.\r\n\r\n@tkelman pointed out that the issue is caused due to std_msgs.msg.Float64 not satisfying the qualifier on Line 25 of gentypes.jl:\r\n```\r\ntypezero{T<:Real}(::Type{T}) = zero(T)\r\n```\r\nReplacing this line with:\r\n```\r\ntypezero{T}(::Type{T}) = zero(T)\r\n```\r\ngives me the following error with using the method zero():\r\n```\r\nERROR: `zero` has no method matching zero(::Type{Float64})\r\n in Float64 at no file\r\n```"},"comment":{"url":"https://api.github.com/repos/phobon/RobotOS.jl/issues/comments/100046438","html_url":"https://github.com/phobon/RobotOS.jl/issues/7#issuecomment-100046438","issue_url":"https://api.github.com/repos/phobon/RobotOS.jl/issues/7","id":100046438,"user":{"login":"mcorah","id":1724383,"avatar_url":"https://avatars.githubusercontent.com/u/1724383?v=3","gravatar_id":"","url":"https://api.github.com/users/mcorah","html_url":"https://github.com/mcorah","followers_url":"https://api.github.com/users/mcorah/followers","following_url":"https://api.github.com/users/mcorah/following{/other_user}","gists_url":"https://api.github.com/users/mcorah/gists{/gist_id}","starred_url":"https://api.github.com/users/mcorah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcorah/subscriptions","organizations_url":"https://api.github.com/users/mcorah/orgs","repos_url":"https://api.github.com/users/mcorah/repos","events_url":"https://api.github.com/users/mcorah/events{/privacy}","received_events_url":"https://api.github.com/users/mcorah/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T23:31:45Z","updated_at":"2015-05-07T23:31:45Z","body":"If the call is made like `Base.Float64` you should be able to resolve that ambiguity."}}