ROS v0.1.0 mix genmsg View Source
A task for compiling ROS message types into Elixir structs.
Add the messages that you want to your mix.exs
:
# mix.exs
...
def project do
[
msg: messages()
...
]
end
def messages do
[
"sensor_msgs/Image",
{:pattern, "std_msgs"}
]
end
Running mix genmsg
after this will produce structs for SensorMsgs.Image
and StdMsgs.*
under lib/generated_msgs/
. It is recommended to put this
directory in your .gitignore
.
Giving the {:pattern, String.t()}
directive will tell the compiler to
create structs for all available message types that contain the given
pattern.
Link to this section Summary
Link to this section Functions
A task needs to implement run
which receives
a list of command line args.
Callback implementation for Mix.Task.run/1
.