Home - adamfowleruk/easyrobot GitHub Wiki

Easyrobot is a thin messaging server designed to allow services to operate on a message bus and receive and respond to requests. They can also publish and subscribe to topics. Clients can connect to this server and similarly subscribe and publish messages to topics, and call services.

Easyrobot is based upon the Robot Operating System, taking it's core concepts but implementing them in a simple, real time operating system built upon Node.js. Easyrobot is the core kernel allowing disparate systems to communicate with each other.

Easyrobot will start by passing messages in real time to all available clients, with no message store-and-forward capabilities. Later these may develop. Likewise, it will not be 'highly available' with guaranteed message passing should the main Easyrobot node fail.

Easyrobot will base it's core messaging protocol on the rosbridge suite 2.0's JSON messaging protocol. It will also support a RESTful http client to receive messages from non-websockets enabled services.

WebSockets protocol message support

To start with, Easyrobot will implement all messages currently supported by roslibjs, the client javascript library for the rosbridge protocol. These include:-

Operations received by client

  • publish
  • service_response
  • png

Operations received by server

  • auth (authenticate)
  • call_service:servicename:callcounterid

Service calls/responses handled (For full details view the ROS API page )

  • get /rosapi/message_details (rosapi/MessageDetails)
  • get /rosapi/topic_type (rosapi/TopicType)
  • get /rosapi/get_param_names (rosapi/GetParamNames)
  • get /rosapi/nodes (rosapi/Nodes)
  • get /rosapi/services (/rosapi/Services)
  • get /rosapi/topics (rosapi/Topics)

Rosbridge V2 messages Easyrobot will also support, not currenty supported by roslibjs:-

  • advertise
  • unadvertise
  • subscribe
  • unsubscribe
  • set_status_level (low priority)
  • status (low priority)
  • fragment (low priority)

Additional methods supported by Easyrobot but not the rosbridge 2 protocol

  • provide_service

Further information on the protocol:-

REST protocol messaging support

To support legacy sources of telemetry messaging I decided to implement a RESTful HTTP endpoint also. This is in alpha stage. I aim to support the following methods:-

  • POST /v1/topic/<URI-Encoded-topic-ref>/messages/<message-id> - Send a message to a topic managed by Easyrobot
  • POST /v1/service/<service-name>/response/<call-id> - Send a service response back to a client

MarkLogic Service

As I work for MarkLogic and often use it's alerting API to determine what alerts to send to a client dynamically, I decided to mix the ROS topics world and the MarkLogic alerts world. Here is a typical workflow:-

  • Client authenticates to an Easyrobot server
  • Client subscribes to one or more topics of its choosing (E.g. /alerts/myclientid )
  • Client calls the MarkLogic-AlertMe service, listening to all data matching a query (E.g. events occurring within an area). Passes along it's topic ID for alerts to be sent to
  • MarkLogic Server alert fires, passing entire alert document, wrapped in a rosbridge envelope, to the REST endpoint for the given topic
  • Easyrobot passes this message along as a publish notification to the client who originally subscribed for notifications
  • When client is done, it unsubscribes from the notifications, and disconnects