Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
H harvest-automation
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Henrik Andreasson
  • harvest-automation
  • Wiki
  • ros services

ros services · Changes

Page history
Update ros services authored Jul 30, 2020 by Nicholas Shindler's avatar Nicholas Shindler
Hide whitespace changes
Inline Side-by-side
Showing with 4 additions and 2 deletions
+4 -2
  • ros-services.md ros-services.md +4 -2
  • No files found.
ros-services.md
View page @ 3c9295d9
......@@ -4,10 +4,12 @@ ROS Services are extensions of the writer parent class takes information from a
When a service is called the data is passed to the robot using the [writer](writer) class structure.
## Creating A Writer
## 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.
### 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 *subscriber* is defined and the probe name is passed to the parent constructor; and a `callback` function where the data is formatted to be passed to the robot over the probes.
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 where the data is formatted to be passed to the robot over the probes.
#### formatting the dataure.
The writer will take either a list of messages or a single message. if you send a single message, and there is only a single probe associated with the class, then a single probe-message tuple is created, if there are multiple probes associated with this class, then each probe is sent the same message. If a message array is passed and there are multiple probes defined, then the two arrays will be zipped together, and if they are not the same length then it will raise an exception. messages are associated to probes sequentially, so data at index 0 is paired with probe at index 0.
......
Clone repository
  • client
  • Home
  • probes
  • reader
  • ros services
  • setup
  • writer