... | @@ -6,7 +6,7 @@ When a service is called the data is passed to the robot using the [writer](writ |
... | @@ -6,7 +6,7 @@ When a service is called the data is passed to the robot using the [writer](writ |
|
|
|
|
|
## Creating A Writer for a service
|
|
## Creating A Writer for a service
|
|
|
|
|
|
The writer child class for a ros service is different the the writer child child class for a controller.
|
|
The writer child class for a ros service is different the the writer child child class for a controller. ROS Service child classes are put in the `Services` directory and the classes that are in that directory should be used as reference when creating new ros services.
|
|
|
|
|
|
### creating the class
|
|
### creating the class
|
|
To create a new function to send data to the HV Robot, the Writer class must be extended. the child class needs to have a `__init__()` function where the *service* is defined and the probe name is passed to the parent constructor; and a **callback** function (can be named anything since it is declared with the service) where the data is formatted to be passed to the robot over the probes using the Writer callback method, and a `stop` function that ends the service and is called when the application is shutdown.
|
|
To create a new function to send data to the HV Robot, the Writer class must be extended. the child class needs to have a `__init__()` function where the *service* is defined and the probe name is passed to the parent constructor; and a **callback** function (can be named anything since it is declared with the service) where the data is formatted to be passed to the robot over the probes using the Writer callback method, and a `stop` function that ends the service and is called when the application is shutdown.
|
... | | ... | |