# Low-Cost Automation for Gravity Compensation of Robotic Arm
## 1 Introduction  
Embedded systems are used nowadays for process industrial control. This kind of automation in Industry 4.0 era is called low-cost automation. The low-cost automation has a fast growth in industrial environments which are using to systems whose monitoring and control capabilities have improved their mode of operation despite their low cost. Nowadays, the fast-growing of low-cost devices figure out the implementation of robust control systems through the use of low-cost devices, which allows reaching an unimaginable learning opportunity by creating a reference platform for research and training in the field of mobile manipulation, which allows developers, researchers, and students to write their own control and application software [1]. Technological advances have been a fundamental part of the development of systems with different structures, whose architecture and communication work under the same standard. The progress of applications based on the internet allows distributed production environments through the interaction between integrated computer systems and physical environments, giving rise to automatic processes controlled by the well-known Cyber-Physical Systems (CPS), demonstrating the high potential it has in the productive sector [1]. Furthermore, It should be taken into account thata complete system must have several requirements, which have different applications with their own obstacles. Technological advances have been a fundamental part of the development of systems with different structures, whose architecture and communication work under the same standard. The use of ROS as a framework for CPS into low-cost devices simplifies the communication and monitoring of the robot control status, this so-called software is installed on GNU/Linux allowing several devices to be incorporated into a distributed network, where a master node allows the rest of the nodes to communicate through TCP/IP nodes. Since ROS implement as part of the CPS architecture gives several advantages, such as modularity of the architecture allowing adaptation to other systems, redundancy is possible due to the ROS publication/subscriber scheme, in addition to allowing cross-platform access and remote control through another element connected to the same network [2]. The only restriction present is that the control system is developed under Debian, that is, of the Open Source type, due to the compatibility between operating systems [3]. When researches choose platforms compatible with ROS, communication limitations should be considered, and when developing software for robots there is a wide variety of open source languages such as C++, Python, or Java. As a low-cost device, the RPI which is considered as s Single Board Computer (SBC) card is one of the best choices regarding the use of ROS, due to its processing capacity [4]. For the control of the joints of the robotic arm, two methods have been defined, (i) the point-to-point method which is a change from the current position to the next or (ii) path determination method which is a variation in the speed of a joint until reaching the desired position. For both, extra calibration is required considering gravitational compensation, which will allow the monitoring of the final effector trajectories in an appropriate manner reducing the error in position and speed [3]. This paper shows a kinematics library made with c++ classes and methods for the youBot manipulator based on ROS software. It provides classes to represent the position, velocities, and accelerations in joint-space and task space and the mandatory conversions between them. The aim of this research is to present the design of a control system based on PD with gravitational compensation using low-cost SBC hardware. The proposed system has a graphic interface that uses the Application Programming Interface (API) of the KukaTM youBot robotic arm to send the positions commands.