Skip to content

tvalitis98/cmass

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMASS

####Centralized Multi-Agent Status Server (pronounced "sea mass")

CMASS allows ROS robots to communicate diagnostics to a server which can then serve them on the web.

Error finding image


Client

Launch with roslaunch cmass cmass_client

The client subscribes to ROS topics and periodically publishes them via HTTP to the server. It also sends the name of the computer (enabling it to serve as a DNS) and the name of the account that's logged in.

Server

Start with go run server/server.go

Command line args:

  • -debug print debug info

  • -file <string filename> file to save robot statuses (default ".robot_statuses")

  • -insecure don't require token to authenticate robot updates

  • -port <int portnumber> port number to run on (default 7978)

Security

If the server is running in secure mode, it will only process updates that include a valid token. Tokens are automatically generated by the ROS client and the IP Updater.

Error finding image

The security process begins by constructing a string (robot diagnostics) in the form of URL parameters. A salt, stored in /home/bwilab/.cmasskey, is appended to the parameter string and fed into a SHA-256 hash function. The salt is applied to the result of the hash and it is fed back into the hash function until 1000 hashes have been performed. (Why so many?) The result of the 1000th hash is the token, which is added to the string as an additional parameter. The string is now ready to sent to the server for evaluation.

When the server receives a request, it parses the URL into a string. The token is removed from the string and saved, which then leaves the original parameters. The hashing process is repeated on the server using its own .cmasskey. The result of the server's hash and the token received in the request are then compared; if they match, the request is valid and the server will update the robot status accordingly. If they don't, disregard the request.

A timestamp is added to the parameters to make the tokens expire. The server checks the received timestamp, if it is older than 5 seconds old or in the future, it is disregarded. This timestamp is used purely for time-sensitivity, the "Time Last Alive" field in the robot display is assigned when the server has already verified the token and is updating the robot's status.

Server Endpoints

/update           called by robots with their info
/text             serves all robot info (Most informative and readable)
/json             serves all robot info as json
/hosts            legacy support, serves robotname:IP
/hostsjson        legacy support, serves json of robotname:IP
/hostsalive       legacy support, serves robotname:IP of active robots
/hostsalivejson   legacy support, serves json of robotname:IP of active robots

About

centralized multi-agent status server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 52.4%
  • C++ 34.8%
  • Python 8.0%
  • CMake 3.1%
  • Makefile 1.7%