ROS v0.1.0 ROS.Service View Source

Services allow you to handle synchronous requests.

All requests to services are blocking. Such is the nature of ROS Service calls. This allows you to safely adjust values like joint values of a robot by preventing more than one access at once.

iex> import ROS.Node.Spec
iex> children = [
...>   node(:mynode, [
...>     service("/add_two_ints", "rospy_tutorials/AddTwoInts", &MyModule.callback_for_service/1)
...>   ]
...> ]
iex> Supervisor.start_link(children, strategy: :one_for_one)

The third argument may also be a module name. If it is, all incoming service requests will be forwarded with GenServer.call/2. See ROS.Node.Spec.service/3 for more information.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.