Open tjeerdvandijk opened 3 hours ago
Hi @tjeerdvandijk,
This function exist. Refer to https://github.com/Mitsubishi-Electric-Asia/melfa_ros2_driver/blob/humble/doc/melfa_ros2_driver.md, Example 4.2. You can use the service to write directly. However, there are some limitations to ROS services.
There are two ways to implement this depending on the type of gripper.
Only no.2 ensures a close loop control on MELFA gripper.
Please let me know if this helps.
do note that output:900 does not take into account the time taken for the gripper to close completely. This function is implemented by the gripper OEM by utilizing input:900. If the gripper OEM does not use input:900 or any other signal to indicate gripper states, then there is no way for MELFA to read the state of the open loop gripper. One can only set a delay and assume that the gripper has reached the intended state.
Problem:
Currently, the hand/GPIO state can only be controlled through a ROS topic, which has some limitations. Specifically:
Lack of Confirmation: When publishing a command to change the hand/GPIO state, there is no built-in mechanism to confirm that the command was successfully received and acted upon. This is an inherent limitation of ROS topics, even with optimal QoS settings. In contrast, ROS services will return a confirmation, allowing the caller to know whether the command was successfully processed.
Safety Concerns: The lack of confirmation has its risks. For example, if the gripper is not confirmed to be in the desired state, it may attempt to pick up an object while closed, which could result in hardware damage.
Proposed Solution:
To give developers more flexibility and ensure safer operation, I suggest adding a service for changing the hand/GPIO state in addition to the existing topic. This would allow developers to choose the most suitable method based on their requirements.