This robotics project revolves around the idea of motion planning. It is about design and implementation of a model based architecture for cobotic cells. The basic idea is that there is a robot which has to cohabit with humans and it is an effort to make it real world intelligent and this means it has to work in real world where obstacles, objects and humans are present. Accidents are imminent and thus the case study is that the artificial intelligence has to be built into the robot.\\
A robot is present and then one or more humans are in proximity along with one or more obstacles are also present in the real world. The base of Robot is fixed and the arm is moving and there is a gripper which need to do a pickup and release job. The robot has to be programmed to move and not just move but move with safety by detecting obstacles / humans around the robot continuously.\\
To start with a fictitious plan, the robot uses a motion planner to move arm and pickup an object and then move again according to already planned motion trajectory and release the object at desired location thus completing the task. So far this plan is only about doing the task but sans the idea of any kind of obstacle or human which can cause a hindrance to already planned motion which would thus require an alteration to planned trajectory right at that time instant when sensors detect obstacle and move around the obstacle to reach a coordinate position around the obstacle to a point in pre decided motion plan and then continue motion from there onwards. After the motion planning part a simulation software is used to see if motion trajectory correction is feasible and working in real life and to see how successful it can be.\\
To demonstrate such a concept a world is shown which contains the robot Panda, its arm, obstacle object which can be a ball or cube box and human beings. The thesis work designs a world model , an application model, and safety model for which different diagram forms are used and they are discussed further.
\newpage
\section{Modeling - Explaining Choice of Design Depictions}
Thesis work tries to find correct diagram depictions for all three intended diagrams which are world model, application model and lastly safety model.
\begin{enumerate}[label=(\Alph*)]
\item WORLD MODEL\\
Unified Modelling Language UML For class and object diagrams for world model using the web tool Online Visual Paradigm is shown in Fig 4.1 and Fig 4.2 is displayed above.The UML class model is used to derive the objects and depict in the UML object model.\cite{17}
\begin{figure}
\centering
\includegraphics[width=0.9\linewidth]{../app2}
\caption{ World Model UML Class Diagram}
\label{fig:app2}
\end{figure}
This world model class diagram has been designed to contain ten classes. The main parent classes are World Object and World, present on top most level. The classes Robot and Abstract Object inherit from one class and at same time are aggregated with another class. Relation of association and aggregation is used where classes need to use data variable from other classes and if class variable must depend on other class variables for it to exist respectively. Aggregation is used where if the class is not involved its child classes cannot be used. Association is used where one class is related to another just to be able to use other's variables. Both relations use pointers.
\begin{figure}
\centering
\includegraphics[width=0.9\linewidth]{../app3}
\caption{ World Model UML Object Diagram}
\label{fig:app3}
\end{figure}
\newpage
\item APPLICATION MODEL – BUSINESS PROCESS MODELING NOTATION USING MODELIO \\
Business Process Modelling Notation(BPMN) For application model using Modelio was chosen for application model. Depicted in Figure 4.3.\cite{18}\\
This was found to be good choice to show application process as this shows cells which depict each component in the world model diagram and then allowed to depict the relationship and connection between their components and showing their flow which have a comprehensive and logical consistency among cells. It uses start and end event states and then “if” conditions as well as flow lines with process events and intermediate events to other components of world diagram to construct application model. In detail components are described as - \\
Events, Activities and Gateways. Objects are connected using Sequence Flows , Message Flows and Associations. Each segment is known as frames.
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{../app}
\caption{BPMN Application Model Diagram}
\label{fig:app}
\end{figure}
\newpage
\item SAFETY MODEL DEPICTION USING UML STATE CHART \\
\begin{figure}
\centering
\includegraphics[width=1.0\linewidth]{../app4}
\caption{Safety Model - UML State Diagram}
\label{fig:app4}
\end{figure}
In Fig.4.4 The start and end events denote the process starting and end. The transition T1 is about human presence. The robot motion begins according to motion already planned using MoveIT but then if the human presence is detected by sensors, it calls MoveIT for new trajectory and proceeds with motion but once again checks if human is detected using if condition and if so then return to human present condition from this state and once again a new motion is planned by MoveIT until a state is achieved where a human is absent and a final transition T2 is executed which proceed to the end event finally. This model can be extended in more detail in the future using this concept along with a different notation that can make the cases more detailed and thus more extensive. MAPE-K Loops can also be used to denote the safety of a system and in addition computer generated graphics can as well be used to depict the safety model of a system, this enables the research to not get restricted to just BPMN notation for safety models of a system\cite{18}.\\
\caption{Paper : On Making Robots Understand Safety Image Source :https://journals.sagepub.com/doi/pdf/10.1177/0278364912462256}
\label{fig:3-figure4-1}
\end{figure}
Fig.4.5 There has been extensive work done to incorporate safety into real world robots particularly from Sami Haddadin. It has built the robot with technology ranging from making the robot understanding safety i.e by making them softer in approach when operating to preventing any physical collision by embedding injury knowledge into controls. The robot surfaces are made softer and force reduced when in proximity to collision objects up to a level where the robot can affirmatively detect the kind of object in proximity and classify that as a serious or not so seriously unsafe object. Extensive testing has been done on injuring pig skin\cite{19}.
\end{enumerate}
\newpage
\section{Tools Used }
\subsection{Setup Environment Using ROS To Run Services ,Motion Planning In RVIZ Using MOVEIT ,GAZEBO For Simulations}
ROS is an opensource robot operating system. ROS is not a regular OS in sense to not provide regular functions of OS like process management and scheduling but it provides a different set of services and acting like structured communications layer above the host operating systems. ROS is associated with existing frameworks of robots, with brief look on available application software which uses ROS. As robotics is a wide field and continuously a topic of research and a growing one ,generating code for ROS is not easy. There are different category of robots available with high degree of variation in hardware, thus not enabling programmers to reuse code or develop on modules. In addition the total amount of code needed is too much for regular programmers, as it needs a deep stack starting from driver-level software and continuing up, and also needs abstract reasoning, and more. The required breadth and width of expertise needed is far more than the skills of any single researcher, robotics software architectures must also be able to be integrated with large-scale software. To address to these problems and make life easier for a regular programmer, many robotics researchers, have constructed huge number of frameworks to handle complexity and address to rapid prototyping of software for experiments, thus resulting enabling research in industry and academia. Each of the frameworks were made keeping in mind a purpose, maybe for a response to perceived weakness of other available frameworks, or to place importance on dimensions which were seen as most important in the design process. ROS, the framework is designed not without tradeoffs and prioritizations made during its design cycle which were essential to do in interest of practical uses. It is still thought the tradeoffs will serve well to purposes of large-scale integrative robotics research in a wide variety of uses and cases as robotic systems grow ever more complex. \\
\item RVIZ / MoveIT \footnote{ROS: an open-source Robot Operating System }\\
RviZ/MoveIT motion planner was used for motion planning as this software lets us alter many different parameters of the robotic components and helps to create case studies in a world environment for robot Panda. Here a series of joints and poses is set and then a trajectory for motion planning which is then used to run in a real world simulator. Its main purpose was to introduce an obstacle which is a cube box or which can be a human being and the motion plan is about moving the robot arm around the obstacle to reach a position which was decided earlier in the motion plan.\\
\item Gazebo \footnote{http://gazebosim.org/}
Gazebo simulator was used which is real world simulator to run the motion plan from MoveIT. This lets us see if the real world simulation is possible for the conceived motion plan and trajectory. Gazebo also has additional features which can add real time parameters to its simulation like altering torque of joints to see how robot reacts in real world.