FleetLevel-Interface-JSON

From RobotinoWiki
Revision as of 16:08, 8 August 2018 by Lutz (talk | contribs) (Information Queries send to the Fleet / Master)

TCP/IP Communication Protocol based in JSON to use FleetLevel Services

This page describes the interface for the json branch of smartsoft-robotino running on Ubuntu 16.04.


Fleet Management Commands Pushed to the Fleet / Master

Commands Examples JSON


Command-Type Usage Example Description
Position Handling
teach-position Teaches a list of positions. If position ID already exists position is overwritten. Type could be of value pose or parking, parking positions will be used to park idle robots in automatic job assignment mode.
replace-positions Similar as teach-position, but all existing positions are replaced by the new ones.
replace-stations Replace the memorized stations with new ones. station-type: SMALL-MPS CS-MPS MANUAL-STATION docking-type: LASER-IR LASER VISION approach-location: id of the pose to approach the station
delete-position Delete position with PositionID. If there is no position with PositionID nothing happens.
delete-all-positions Deletes all positions.
delete-all-stations Deletes all stations.
teach-current-position Assign the current global position the robot with the RobotinoID the ID 1
Map Handling
start-mapping Start creation of a new map (SLAM) using a specific robot. The mapname is optional, if none is given a time-stamp is used (map-YYYY-MM-DD_HH-MM-SS).
abort-mapping Abort the creation of a new map (new map is discarded). The current default map is reloaded in the localization (global localization is triggered). The RobtinoID is optional of not given the command is forwarded to all robots.
stop-mapping Stop map creation. New map is saved in the MapStorageDirectory. The new map is set as default map and is used for localization.
reload-default-map ReLoadDeafault map for navigation and localization, as well as the corresponding poses from file. Global localization is used unless SetRobotPose is called afterwards.
COORDINATED NAVIGATION HANDLING
reload-default-paths ReloadDefaultPaths path-map for paths based navigation.
clear-all-path-network-nodes Frees all nodes currently allocated by the robot (is acknowledged by command-response TODO add LINK)
SET OPERATION MODE
set-operation-mode
  • ROBOTINOID number of Robotino to change the mode for.
  • MODE:
    • OUTOFSERVICE do NOT auto-assign jobs to Robotino
    • AUTO auto-assign jobs to Robotino.
    • MANUAL do NOT auto-assign jobs to Robotino, but assign to target Robotino when individual task received.
shutdown-robot Stop all SmartSoft components in a coordinated manner and remove robot from fleet. In case the master is shutdown the slaves are as well.
manual-acknowledge Acknowledge the Robotino that the box is placed/removed from it after reaching the manual pose(no docking station)
clear-error
abort-job-and-clear-error
OTHER
set-robot-pose Set the current pose of the robot x y in meter phi in DEG.
end-task Terminates the ongoing task and stops any movement --> set robot mode to OUTOFSERVICE
The RobotinoID is optional, without the id the command is distributed to all robots.
pause-robot Halt the Robotinos movement, (jobs or other activities are not affected)
The RobotinoID is optional, without the id the command is distributed to all robots.
continue-robot Resumes the robots movement
The RobotinoID is optional, without the id the command is distributed to all robots.


Information Queries send to the Fleet / Master

Information Query Examples JSON

Command-Type Usage Example Description
Information Queries
get-all-positions Reads the list of all kown positions with its ID and Name
get-all-stations Reads the list of all taught station
get-robot-fleet-type Get the fleet-type of the robotino (transport, manipulation, etc.)
get-robot-info
  • RobotinoID ID of robot to request the RobotInfo from
get-all-robot-ids Reads all the RobotinoIDs
get-fleet-state Get state of all robots in the fleet.
get-robot-id-master-master-components-run-on Get the id of the robot the master components run on (-1) of the components are not running on a robot within the fleet.

Jobs Pushed to the Fleet

Jobs Examples JSON

Command Usage Example Description
Push Job
PushJob JOBTYPE JOBID PRIORITY ROBOTINOID ..... Push an job to the fleet (parameters depend on job type)
goto-position
  • GotoPosition
  • JOBID unique number generated by the MES >=1
  • PRIORITY currently not used
  • ROBOTINOID number of Robotino that should do the job. The Robotino number is configured through the web-interface of each Robotino. The Robotino number should be made visible on each Robotino. Giving a -1 as ROBOTINOID indicates that the planner should automatically choose the Robotino fullfilling this job.
  • POSE pose id where to go
deliver-from-to
  • DeliverFromTo
  • JOBID unique number generated by the MES
  • PRIORITY currently not used
  • ROBOTINOID number of Robotino that should do the job. The Robotino number is configured through the web-interface of each Robotino. The Robotino number should be made visible on each Robotino. Giving a -1 as ROBOTINOID indicates that the planner should automatically choose the Robotino fullfilling this job.
  • FROMSTATION station id from where to load the box
  • FROMBELT belt id from where to load the box
  • TOSTATION station id where to unload the box
  • TOBELT belt id where to unload the box
commissioning
  • RobotCommissioning
  • JOBID unique number generated by the MES
  • PRIORITY currently not used
  • ROBOTINOID number of Robotino that should do the job. The Robotino number is configured through the web-interface of each Robotino. The Robotino number should be made visible on each Robotino. Giving a -1 as ROBOTINOID indicates that the planner should automatically choose the Robotino fullfilling this job.
  • COMMISSIONINGROBOT id of the robot performing the commissioning (location of robot will be used to approach)
  • BOXFROMSTATION station id where to load the box
  • BOXFROMBELT belt id where to load the box
  • TOSTATION station id where to unload the box
  • TOBELT belt id where to unload the box
  • [ORDER_ITEM QUANTITY]+ List of ITEMS to be commissioned (item type and the quantity of the item)
follow-person
  • FollowPerson
  • JOBID unique number generated by the MES
  • PRIORITY currently not used
  • ROBOTINOID number of Robotino that should do the job. The Robotino number is configured through the web-interface of each Robotino. The Robotino number should be made visible on each Robotino. Giving a -1 as ROBOTINOID indicates that the planner should automatically choose the Robotino fullfilling this job.
mps-docking
  • MPSDocking
  • JOBID unique number generated by the MES
  • PRIORITY currently not used
  • ROBOTINOID number of Robotino that should do the job. The Robotino number is configured through the web-interface of each Robotino. The Robotino number should be made visible on each Robotino. Giving a -1 as ROBOTINOID indicates that the planner should automatically choose the Robotino fullfilling this job.
  • STATIONID station id to dock to
  • FROMBELT belt id where to dock to
  • [DOCK|UNDOCK] the action taken, docking or undocking to a mps station
mps-loading
  • MPSLoading
  • JOBID unique number generated by the MES
  • PRIORITY currently not used
  • ROBOTINOID number of Robotino that should do the job. The Robotino number is configured through the web-interface of each Robotino. The Robotino number should be made visible on each Robotino. Giving a -1 as ROBOTINOID indicates that the planner should automatically choose the Robotino fullfilling this job.
  • [LOAD|UNLOAD] the action taken, load or unload something from a map station
  • LOADMANUAL 1 or 0 action is performed manual not using the conveyor
battery-charger-docking
  • BatteryChargerDocking
  • JOBID unique number generated by the MES
  • PRIORITY currently not used
  • ROBOTINOID number of Robotino that should do the job. The Robotino number is configured through the web-interface of each Robotino. The Robotino number should be made visible on each Robotino. Giving a -1 as ROBOTINOID indicates that the planner should automatically choose the Robotino fullfilling this job.
  • [DOCK|UNDOCK] the action taken, docking or undocking to a charger
robot-gripper
  • RobotGripper
  • JOBID unique number generated by the MES
  • PRIORITY currently not used
  • ROBOTINOID number of Robotino that should do the job. The Robotino number is configured through the web-interface of each Robotino. The Robotino number should be made visible on each Robotino. Giving a -1 as ROBOTINOID indicates that the planner should automatically choose the Robotino fullfilling this job.
  • [GRASP|RELEASE] the action taken, docking or undocking to a charger
Update Job
update-job follow-person start-follow-person
  • StartFollowPerson
  • JOBID unique number generated by the MES
  • X X position of the person to follow in map coordinate system in m
  • Y Y position of the person to follow in map coordinate system in m
End/Delete Job
delete-job Delete an already pushed, but not yet started, job. --> response: DeleteJob jobid:"id" success OR DeleteJob jobid:"id" failed if the job is already running or fished
end-job JOBID unique number generated by the MES
<NOT YET> intercept-job Intercept the job, other commands can be executed meanwhile
<NOT YET> continue-job Continue the intercepted job.

Response from Fleet / Master

Command Usage Example Description
FleetState key:value key:value FleetState robotinoid:3 x:0.5 y:11.4 phi:56.32 batteryvoltage:22.5 ipaddress:192.168.1.241 robotinoid:3 x:0.5 .... info of all robots in the fleet
RobotIDMasterComponentsRunOn id RobotIDMasterComponentsRunOn 1
RobotFleetType robotinoId master or slave RobotFleetType 1 master the fleet type of robotino asked
AllPosition id x y phi type, id x y phi type... AllPosition 1 0.4 3.7. 10 pose If id is not a number id must not contain comma (0x2C) or whitespace.
AllStation id x y phi numbelts type docking-type approach-location, id x y phi numbelts type docking-type approach-location... AllStation 1 0.4 3.7. 10 1 SMALL-MPS LASER-IR 22 If id is not a number id must not contain comma (0x2C) or whitespace. If no approach-location is set the value will be -1
AllRobotinoID ID, ID ... AllRobotinoID 1, 2 ... ID must not contain comma (0x2C)
<NOT YET> EstimatedJobDuration TimeInSec TimeInSec = TimeToCompleteCurrentJob + TimeToCompleteReqestedJob
AckClearAllPathNetworkNodes RobotinoID Pushed by SmartSoft when ClearAllPathNetworkNodes is called and all nodes have been cleared.
GetManualAcknowledge RobotinoID Pushed by SmartSoft when manual pose(no docking station) reached and waiting for his acknowledgement after placing/removing the box
DeleteJob jobid:"id" success OR failed DeleteJob jobid:11 failed Pushed by JobDispatcher as response to the DeleteJob message.
Robot State or Job Messages
RobotInfo key:value key:value ... RobotInfo robotinoid:3 x:0.5 y:11.4 phi:56.32 batteryvoltage:22.5 current:1.614 laserwarning:0 lasersafety:0 boxpresent:1 state:Idle Response to GETROBOTINFO or pushed by SmartSoft if cyclic response is enabled.State can be IDLE/BUSY/ERROR.
JobInfo key:value key:value ... DeliverFromTo: JobInfo robotinoid:10 jobid:10 priority:1 fromstation:2 frombelt:1 tostation:3 tobelt:4 state:STARTED
GotoPosition: JobInfo robotinoid:10 jobid:10 state:STARTED
with STATE being one of the following strings
  • NOTAVAILABLE
  • STARTED
  • DOCKING
  • UNDOCKING
  • DRIVING
  • LOADING
  • UNLOADING
  • FINISHED
  • ABORTED
  • NOTSTARTED
  • ERROR
  • CHARGER-DOCKING
  • CHARGER-UNDOCKING
  • CHARGER-UNDOCKING-DONE

Pushed by SmartSoft on state change.

JobError key:value key:value ... JobError robotinoid:1 jobid:10 error:"DockTo NO_DOCK_STATION"
ERROR string Description
NOERROR
GotoPosition PATH_BLOCKED Robots path blocked, no further movement possible
MPSDocking UNDOCK ROBOT_NOT_DOCKED Robot is not docked but job tells to undock
DockTo NO_DOCK_STATION Robot not close to the docking station(If the laser scanner intensity value is not as desired)
LoadBox BOX_PRESENT Robot is already having a box on top(detected by "Box available" digital signal)
LoadBox NO_RESPONSE_FROM_STATION The transport station has nothing to load(detected by "Station Ready" digital signal)
LoadBox NO_BOX The box was not sucessfully loaded from the transport station(detected by "Box available" digital signal)
UnloadBox NO_RESPONSE_FROM_STATION The transport station is not ready to receive a box(detected by "Station Ready" digital signal)
UnloadBox NO_BOX No box on top of the Robot(detected by "Box available" digital signal)
UnloadBox BOX_PRESENT Task terminated but a box is still present on the robot(detected by "Box available" digital signal)
DockToCharger NO_CHARGER External power supply not found(detected by internal sensor "Battery")
BatteryChargerDocking UNDOCK ROBOT_NOT_DOCKED Robot is not docked but job tells to undock
BatteryChargerDocking UNDOCK POWER_STILL_CONNECTED Undocking from charger failed powersupply still connected

Pushed by SmartSoft when error occurs.


Smartsoft