Base project structure for the first Advanced and Robot Programming (ARP) assignment. There are two motors. MotorX, MotorZ These motors are moving the along to axis to move the object vertical and horizontal axis.
The movement is bound from 0 to a maximum value of distance, which is set to 1, for each motor.
In the project there are 6 processes:
- starter
- commandConsole
- inspectionConsole
- motorX
- motorZ
- watchdog
From the user side the commandConsole and the inspectionConsole acts as an interface to respectively manage the movement and other commands and to view the current position on the axis and to stop or reset the hoist position.
The communication between the processes was managed through the use of pipes, that allow to write or read from a process to another one through a one to one connection.
The project provides the basic functionalities for the Command and Inspection processes, both of which are implemented through the ncurses library as simple GUIs. In particular, the repository is organized as follows:
- The
src
folder contains the source code for the Command, Inspection, MotorX, MotorZ and Master processes. - The
include
folder contains all the data structures and methods used within the ncurses framework to build the two GUIs. Unless you want to expand the graphical capabilities of the UIs (which requires understanding how ncurses works), you can ignore the content of this folder, as it already provides you with all the necessary functionalities. - The
bin
folder is where the executable files are expected to be after compilation - The
run.sh
is a shell script which complie all of the processes and execute the master and the master process is a parent process, responsible for executing all child processes.
To install the ncurses library, simply open a terminal and type the following command:
sudo apt-get install libncurses-dev
The Command and Inspection processes depend on the ncurses library, which needs to be linked during the compilation step. Furthermore, the Inspection process also uses the mathematical library for some additional computation. Therefore the steps to compile are the following:
-
For the Installation:
./install.sh
This command will install and unzip all the files once you have clone the repository.
-
For the Run:
./run.sh
THis command will run the run.sh file which will automatically run all the files the command console, inspection console and the master.
-
For the Help:
./help.sh
This Command will show the list of all the motors and how to control them.
For the Uninstallation:
./uninstall.sh
This command will uninstall all the files once you will excute thi command.
How.to.install.webm
Controlling.webm
Should you experience some weird behavior after launching the application (buttons not spawning inside the GUI or graphical assets misaligned) simply try to resize the terminal window, it should solve the bug.
You take other help from the help command.