Skip to content

plugins: add triggered conveyor belt (real)#16

Open
moriarty wants to merge 3 commits intorockin-robot-challenge:rockinfrom
moriarty:TCB_plugin_zmq-dev
Open

plugins: add triggered conveyor belt (real)#16
moriarty wants to merge 3 commits intorockin-robot-challenge:rockinfrom
moriarty:TCB_plugin_zmq-dev

Conversation

@moriarty
Copy link
Contributor

  • configuration of plugin set to simulation mode
  • requires pull request
    rockin-robot-challenge/at_work_networked_device#4 to fix issue were extra faulty plate added.

@moriarty
Copy link
Contributor Author

@svenschneider I just saw your comment on #13

I will check the locking, because that will effect this (and every) plugin.

- configuration of plugin set to simulation mode
- fixes problem with adding multiple of copies of the same object to
inventory
- requires pull request
  rockin-robot-challenge/at_work_networked_device#4
- adds to ConveyorBeltCommand proto
  - reset: set to true to reset the TCB
  - next_cycle: the expected next cycle

- adds to ConveyorBeltStatus proto
  - cycle: the current cycle 

- in TriggeredConveyorBeltThread::init
  - use host_ip_address from config instead of hardcoded "eth0"
  - setConveyorBeltRunMode to stop & reset

- in TriggeredConveyorBeltThread::loop
  - if send_conveyor_command is set and cycle matches expectation
    - send conveyor command
  - else if send_reset_command is still set
    - send conveyor command ( this is for the case when the one in init was lost )

- in TriggeredConveyorBeltThread::clips start/stop belt
  - set requested_run_mode and send_conveyor_command flag

- in TriggeredConveyorBeltThread::receiveAndBufferConveyorStatusMsg
  - if cycle in received status matches expecation
    - increase cycle
    - reset send_conveyor_command_ flag 
    - reset send_reset_command_ flag
  - else if TCB is ahead of expectation 
    - set sent_reset_command flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant