Difference between revisions of "FleetLevel-Interface-JSON"
From RobotinoWiki
(→Messages send from Fleet / Master) |
|||
(48 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=TCP/IP Communication Protocol based in JSON to use FleetLevel Services= | =TCP/IP Communication Protocol based in JSON to use FleetLevel Services= | ||
− | '''This page''' describes the interface for the | + | '''This page''' describes the interface for the '''json branch''' of smartsoft-robotino running on '''Ubuntu 16.04'''.<br> |
==Fleet Management Commands Pushed to the Fleet / Master== | ==Fleet Management Commands Pushed to the Fleet / Master== | ||
− | + | '''[http://doc.openrobotino.org/ChangeLog/FleetInterface_JSON/commands_examples_json.php Commands Examples JSON]''' | |
− | |||
{|class="wikitable" | {|class="wikitable" | ||
Line 16: | Line 15: | ||
!colspan="3"|Position Handling | !colspan="3"|Position Handling | ||
|- | |- | ||
− | |teach-position || | + | |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 || | + | |replace-positions || || Similar as teach-position, but all existing positions are replaced by the new ones. |
|- | |- | ||
− | |replace-stations || | + | |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 || || Delete position with PositionID. If there is no position with PositionID nothing happens. |
|- | |- | ||
− | |delete-all-positions || | + | |delete-all-positions || ||Deletes all positions. |
|- | |- | ||
− | |delete-all-stations || | + | |delete-all-stations || ||Deletes all stations. |
|- | |- | ||
− | |teach-current-position || | + | |teach-current-position || ||Assign the current global position the robot with the RobotinoID the ID 1 |
|- | |- | ||
!colspan="3"|Map Handling | !colspan="3"|Map Handling | ||
|- | |- | ||
− | |start-mapping || | + | |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-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-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|| | + | |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. |
|- | |- | ||
!colspan="3"| COORDINATED NAVIGATION HANDLING | !colspan="3"| COORDINATED NAVIGATION HANDLING | ||
|- | |- | ||
− | |reload-default-paths|| | + | |reload-default-paths|| ||ReloadDefaultPaths path-map for paths based navigation. |
|- | |- | ||
− | |clear-all-path-network-nodes || | + | |clear-all-path-network-nodes || ||Frees all nodes currently allocated by the robot (is acknowledged by command-response '''TODO add LINK''') |
|- | |- | ||
− | !colspan="3"| | + | !colspan="3"|OPERATION MODE HANDLING |
|- | |- | ||
− | | | + | |set-operation-mode |
− | |||
− | |||
| | | | ||
| | | | ||
Line 59: | Line 56: | ||
**'''MANUAL''' do NOT auto-assign jobs to Robotino, but assign to target Robotino when individual task received. | **'''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. | |Stop all SmartSoft components in a coordinated manner and remove robot from fleet. In case the master is shutdown the slaves are as well. | ||
|- | |- | ||
− | | | + | |clear-error || || |
+ | |- | ||
+ | |abort-job-and-clear-error || || | ||
+ | |- | ||
+ | !colspan="3"|OTHER | ||
+ | |- | ||
+ | |set-robot-pose || ||Set the current pose of the robot x y in meter phi in DEG. | ||
+ | |- | ||
+ | |manual-acknowledge | ||
| | | | ||
− | |Acknowledge the Robotino that the box is placed/removed from it after reaching the manual pose(no docking station) | + | |Acknowledge the Robotino that the box is placed/removed from it after reaching the manual pose(no docking station), only active after get-manual-load-unload-acknowledge pushed from the fleet. |
|- | |- | ||
− | | | + | |end-task || ||Terminates the ongoing task and stops any movement --> set robot mode to '''OUTOFSERVICE'''<br> 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) <br> The RobotinoID is optional, without the id the command is distributed to all robots. |
|- | |- | ||
− | | | + | |continue-robot || ||Resumes the robots movement <br> The RobotinoID is optional, without the id the command is distributed to all robots. |
+ | |} | ||
+ | |||
+ | ==Information Queries send to the Fleet / Master== | ||
+ | |||
+ | '''[http://doc.openrobotino.org/ChangeLog/FleetInterface_JSON/information_query_examples_json.php Information Query Examples JSON]''' | ||
+ | |||
+ | {|class="wikitable" | ||
+ | ! Command-Type | ||
+ | ! Usage Example | ||
+ | ! Description | ||
|- | |- | ||
− | |||
!colspan="3"|Information Queries | !colspan="3"|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 |
| | | | ||
| | | | ||
− | |||
|- | |- | ||
− | | | + | |get-all-robot-ids |
| | | | ||
− | |Reads all the | + | |Reads all the RobotinoIDs |
|- | |- | ||
− | | | + | |get-fleet-state |
| | | | ||
|Get state of all robots in the fleet. | |Get state of all robots in the fleet. | ||
|- | |- | ||
− | | | + | |get-symbolic-fleet-state |
+ | |- | ||
+ | |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. | |Get the id of the robot the master components run on (-1) of the components are not running on a robot within the fleet. | ||
− | |- | + | |- |
− | | | + | |get-map-storage-directory |
− | | | + | |- |
− | | | + | !colspan="3"|Information Queries / Jobs |
+ | |- | ||
+ | |get-job-info || || | ||
+ | |- | ||
+ | |get-job-error || || | ||
|- | |- | ||
|} | |} | ||
− | ==Jobs Pushed to the Fleet | + | ==Jobs Pushed to the Fleet == |
+ | |||
+ | '''[http://doc.openrobotino.org/ChangeLog/FleetInterface_JSON/jobs_examples_json.php Jobs Examples JSON]''' | ||
{|class="wikitable" | {|class="wikitable" | ||
Line 112: | Line 132: | ||
! Usage Example | ! Usage Example | ||
! Description | ! Description | ||
+ | |- | ||
+ | !colspan="3"|Push Job | ||
|- | |- | ||
|PushJob '''JOBTYPE''' JOBID PRIORITY ROBOTINOID ..... || || Push an job to the fleet (parameters depend on job type) | |PushJob '''JOBTYPE''' JOBID PRIORITY ROBOTINOID ..... || || Push an job to the fleet (parameters depend on job type) | ||
|- | |- | ||
− | | | + | |goto-position |
− | | | + | | |
| | | | ||
*'''GotoPosition''' | *'''GotoPosition''' | ||
Line 124: | Line 146: | ||
*'''POSE''' pose id where to go | *'''POSE''' pose id where to go | ||
|- | |- | ||
− | | | + | |deliver-from-to |
− | | | + | | |
| | | | ||
*'''DeliverFromTo''' | *'''DeliverFromTo''' | ||
Line 136: | Line 158: | ||
*'''TOBELT''' belt id where to unload the box | *'''TOBELT''' belt id where to unload the box | ||
|- | |- | ||
− | | | + | |commissioning |
− | | | + | | |
| | | | ||
*'''RobotCommissioning''' | *'''RobotCommissioning''' | ||
Line 150: | Line 172: | ||
*'''[ORDER_ITEM QUANTITY]+''' List of ITEMS to be commissioned (item type and the quantity of the item) | *'''[ORDER_ITEM QUANTITY]+''' List of ITEMS to be commissioned (item type and the quantity of the item) | ||
|- | |- | ||
− | | | + | |follow-person |
− | | | + | | |
| | | | ||
*'''FollowPerson''' | *'''FollowPerson''' | ||
Line 158: | Line 180: | ||
*'''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. | *'''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''' | *'''MPSDocking''' | ||
Line 177: | Line 191: | ||
*'''[DOCK|UNDOCK]''' the action taken, docking or undocking to a mps station | *'''[DOCK|UNDOCK]''' the action taken, docking or undocking to a mps station | ||
|- | |- | ||
− | | | + | |mps-loading |
− | | | + | | |
| | | | ||
*'''MPSLoading''' | *'''MPSLoading''' | ||
Line 187: | Line 201: | ||
*'''LOADMANUAL''' 1 or 0 action is performed manual not using the conveyor | *'''LOADMANUAL''' 1 or 0 action is performed manual not using the conveyor | ||
|- | |- | ||
− | | | + | |battery-charger-docking |
− | | | + | | |
| | | | ||
*'''BatteryChargerDocking''' | *'''BatteryChargerDocking''' | ||
Line 196: | Line 210: | ||
*'''[DOCK|UNDOCK]''' the action taken, docking or undocking to a charger | *'''[DOCK|UNDOCK]''' the action taken, docking or undocking to a charger | ||
|- | |- | ||
− | | | + | |robot-gripper |
− | | | + | | |
| | | | ||
*'''RobotGripper''' | *'''RobotGripper''' | ||
Line 206: | Line 220: | ||
|- | |- | ||
− | !colspan="3"|Job | + | !colspan="3"|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 | ||
|- | |- | ||
− | + | ||
− | + | !colspan="3"|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> | + | |<NOT YET> intercept-job || || Intercept the job, other commands can be executed meanwhile |
|- | |- | ||
− | |<NOT YET> | + | |<NOT YET> continue-job || || Continue the intercepted job. |
|- | |- | ||
|} | |} | ||
− | == | + | == Messages send from Fleet / Master == |
+ | |||
+ | |||
+ | '''[http://doc.openrobotino.org/ChangeLog/FleetInterface_JSON/pushed_msgs_examples_json.php Pushed Messages Examples JSON] | ||
+ | ''' | ||
{|class="wikitable" | {|class="wikitable" | ||
! Command | ! Command | ||
! Usage Example | ! Usage Example | ||
! Description | ! Description | ||
+ | |||
|- | |- | ||
− | + | !colspan="3"|Acknowledgements | |
− | |||
− | | | ||
|- | |- | ||
− | | | + | |get-manual-load-unload-acknowledge |
− | | | + | | |
+ | |Pushed by SmartSoft when manual pose(no docking station) reached and waiting for acknowledgement after placing/removing the box | ||
|- | |- | ||
− | | | + | !colspan="3"|Robot State Change |
− | |||
− | |||
|- | |- | ||
− | | | + | |robot-state-change |
− | + | | | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
| | | | ||
− | |||
|- | |- | ||
− | | | + | !colspan="3"|Job State Change |
− | |||
− | |||
|- | |- | ||
− | | | + | |job-state-change |
| | | | ||
− | | | + | |STATE being one of the following strings |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
*NOTAVAILABLE | *NOTAVAILABLE | ||
*STARTED | *STARTED | ||
Line 306: | Line 288: | ||
Pushed by SmartSoft on state change. | Pushed by SmartSoft on state change. | ||
|- | |- | ||
− | | | + | |job-state-change-error |
− | | | + | | |
| | | | ||
{|class="wikitable" | {|class="wikitable" | ||
Line 355: | Line 337: | ||
Pushed by SmartSoft when error occurs. | Pushed by SmartSoft when error occurs. | ||
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
[[Smartsoft]] | [[Smartsoft]] |
Latest revision as of 17:45, 8 August 2018
Contents
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
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) | |
OPERATION MODE HANDLING | ||
set-operation-mode |
| |
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. | |
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. | |
manual-acknowledge | Acknowledge the Robotino that the box is placed/removed from it after reaching the manual pose(no docking station), only active after get-manual-load-unload-acknowledge pushed from the fleet. | |
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 | ||
get-all-robot-ids | Reads all the RobotinoIDs | |
get-fleet-state | Get state of all robots in the fleet. | |
get-symbolic-fleet-state | ||
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. | |
get-map-storage-directory | ||
Information Queries / Jobs | ||
get-job-info | ||
get-job-error |
Jobs Pushed to the Fleet
Command | Usage Example | Description |
---|---|---|
Push Job | ||
PushJob JOBTYPE JOBID PRIORITY ROBOTINOID ..... | Push an job to the fleet (parameters depend on job type) | |
goto-position |
| |
deliver-from-to |
| |
commissioning |
| |
follow-person |
| |
mps-docking |
| |
mps-loading |
| |
battery-charger-docking |
| |
robot-gripper |
| |
Update Job | ||
update-job follow-person start-follow-person |
| |
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. |
Messages send from Fleet / Master
Command | Usage Example | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Acknowledgements | ||||||||||||||||||||||||||||||
get-manual-load-unload-acknowledge | Pushed by SmartSoft when manual pose(no docking station) reached and waiting for acknowledgement after placing/removing the box | |||||||||||||||||||||||||||||
Robot State Change | ||||||||||||||||||||||||||||||
robot-state-change | ||||||||||||||||||||||||||||||
Job State Change | ||||||||||||||||||||||||||||||
job-state-change | STATE being one of the following strings
Pushed by SmartSoft on state change. | |||||||||||||||||||||||||||||
job-state-change-error |
Pushed by SmartSoft when error occurs. |