This is a service for monitoring and controlling robotic systems. It is based mainly on CAN communication to send commands or read information directly from the robot unit control. The service also provides a series of HTTP Rest API with which to execute the same commands and a Websocket (pure or via Socketio) with which to interact in realtime with the robot.
The service is written in GoLang version >=1.15, then to be compiled you must have almost this version installed in your machine.
The service was tested into a Raspberry PI 3 with Raspian (debian linux based) with a CAN board which is used to communicate with the robot system. In addition, the service was used to develop a useful tool to display and interact with the robot in a virtual environment.
- Install GoLang (1.15)
- Install the statik lib (
go get -u github.com/rakyll/statik
) - Run the
make install-dep
command - Run the
make build-ui
command
Execute the command make build
to build the final binary and make run
to execute it (or execute directly the binary file).
The service is written in GoLang, therefore there are no concepts such as classes or objects (such as in c). The real "main" file is inside of cmd
directory. There are created the robot instance, the webserver and the main loop (an empty loop).
In this directory you can find all structs
that rappresent every payload/message or "object" structure.
In this directory are defined the connection
struct with its functions and the robot
struct.
In the robot
struct are defined all commands to be send to the connection throught the connection
instance.
In this directory is defined the webserver
struct and its functions. When a webserver is created (with a robot
pointer instance, address and port) the http routes and websocket server are defined.
Some struct and fuctions created as utilities.
- Allowing the run of the service with a virtual robot instance.
- Fix the
set_position
operation in the robot struct. - Create a WebUI to send and controll the local robot instance.
- Other...