Module which loads locally the locations of a map to retrieve the next robot target location to inspect.
The module opens a Navigation client which gives access to the necessary methods. An RPC port is also opened (default name: /nextLocPlanner/request/rpc)
Possible RPC commands:
next
: returns the next unchecked location or noLocationset <locationName> <status>
: sets the status of a location to unchecked, checking or checkedset all <status>
: sets the status of all locationsfind <locationName>
: checks if a location is in the list of the available onesremove <locationName>
: removes the defined location by any listadd <locationName>
: adds a previously defined location in the unchecked listadd <locationName> <x,y,th coordinates>
: adds a new location in the unchecked listlist
: lists all the locations and their statuslist2
: lists all the locations divided by their statusclose
: closes the nextLocationPlanner modulehelp
: gets this list
Each location can have one of the following statuses: unchecked
,checking
, checked
.
When the module is created, each location status is 'unchecked'.
When the next
command is called, the first 'unchecked' location is returned to the asker, and its status is set to 'checking'.
If a location has been already set to 'checking' when the next
command is called, that location is set to 'unchecked' and the next 'unchecked' location is returned.
It is supposed that a navigation orchestrator would set the location status to 'checked' after performing some task. This is possible with the command set <locationName> checked
.