The role of the robot arm we used was to place stock in the Tormach, remove the finished part after machining, and place the part on the table. We used a Kinvova Gen3 7DOF arm. To program the arm, we used ROS2 and C++. For handling motion and task planning we used the robotics manipulation library MoveIt 2. Using MoveIt2 we set named poses for common positions, for example returning to home, used cartesian control for gross motions, and calculated generated grasp poses for fine motion. There were two main tasks, one for loading stock and another for unloading stock. We also made a function for homing the arm. Since the arm operated inside the Tormach, we also had to include collision objects in the motion planner to prevent damaging the arm and Tormach. Ultimately the workflow for making a part was setting up the planning scene, loading stock, unloading stock, and finally homing the arm.
Planning scene and arm rendered in Rviz2
Integrating the arm with the PLC, and therefore the Tormach, involved 3 different ROS2 nodes. One main node controlled the arm and communicates with the other two nodes which interface with the Arduino and relays. One reads the state of the IO pins on the Arduino and talks to the main node, and another listens to the main node to flip specific relays. The final integrated workflow involved the arduino_interface_node publishing a request (load, unload, or home), then the machine_tending_node executing the corresponding task, and if the task succeeded, publishing load or unload to the relay_interface_node to flip specific relays to activate or deactivate the pneumatic vice to signal the Tormach to machine the stock or for the arm to load/ unload the object.
ROS2 node architecture