\subsection{Modifications to State Control}\label{modstatecontrol}

In order to retain the functionality provided by the existing state control, it was decided to create an additional function in the \textit{StateControl} class for state control of the wheelchair initiated by the shared controller. The difference in implementation occurs for left and right commands by altering the turning radius of the wheelchair depending on its velocity. This has been achieved by making unit increments or decrements to the L and R values instead of adding or subtracting 10. The maximum velocity of the wheelchair has been temporarily restricted to less than 1m/s (second velocity level) due to the limitations of the obstacle avoidance algorithms. Another modification done to the state control routine involved the check for collision avoidance as explained in \hyperref[caalgo]{Section 4.1.2.}. Details of the source code are provided in \hyperref[appendixA]{Appendix A}.
