Imagine the bin picking scenario:
- Simulation is setup with ManipulationStation.
- RGBA & pointcloud can be accessed through lcm channel through pub/sub.
- Perform a grasp detection using RGBA & pointcloud.
I would like to implement the grasp detection procedure, which will be invoked once from time to time. This meant that the procedure will just stay idle, doing nothing, while waiting for the call. In ROS, I would probably use ROS-Service to achieve this. I would like to ask for a suggestion of best practice to do this in Drake framework.
I have also considered a few designs, but they didn't answer my requirement yet.
- A stright forward choice would be to use pub/sub through lcm. However, a naive implementation would end up in the grasp detection that would always run/update in the background regardless whether the grasp is necessary.
- Implemented it as a subclass of LeafSystem, similar to what had been done in RobotLocomotion/6-881-examples. However, if I understand correctly, it would end up in the detection that always run/update in the background also.
P.S. This might not be directly related to the topic. But to achieve the deterministic behaviors for testing in above setup, am I correct that
- The communication through the network, lcm in this case, should be avoid as suggested in this lecture.
- And the diagram which connected various systems should be used instead?