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
  • client

Last edited by Nicholas Shindler Jul 30, 2020
Page history

client

Client

The client connection to the robot is a single synchronous client server connection, that connects over port 4400.

Writing to the robot

To send a message to the robot data is taken in by the client as a probe id and value tuple, and encoded as a tlv packet, where t = type / probe id, l = length, and v = value. python struct is used to create a packed byte object out of the tlv data. This byte object is appended to any other probe messages that are also being sent and all of there are wrapped in a second TLV packet, where the type is a probe message and the value is all the probe messages. This is then also packed into a byte object, and then sent to the server.

Reading from the robot

Data from the robot can be captured by the Listener which is a Thread child class. And probes that have been enabled will have their data sent by the server to the client on every broadcast interval. The base client class will read that data in and add it to a message queue, unless it is a debug message or a probe message. probe messages are added to a buffer and can be read out at a later stage. In the hv_client the probe messages are pushed to the data storage objects in the corresponding Reader classes that will the publish the data to ROS topics.

Clone repository
  • client
  • Home
  • probes
  • reader
  • ros services
  • setup
  • writer