Here comes the fun part. Our basic_trajectory_action_service.py takes array of target coordinates, and before it used 6 joints of the robotic arm. Now we have added an extra joint... so all it takes to make the arm work with gripper, is to pass an extra target value in an array of target coordinates: 7 values instead of 6.
Just keep in mind that our gripper uses linear actuator, so, unlike for other joints, targer values for it should be in meters, not in radians.
To run this script, run the launch file first (see "building and running below). The robot will move the first joint, then second and so on. This is just the way we programmed it, same code, if you change values of two target elements simultaneously, will move few joints in the same time.