-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RFC for delete / load interface in ROS. (#41)
Signed-off-by: Michael Grupp <[email protected]>
- Loading branch information
1 parent
590cb4f
commit 1001543
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Delete / load interface in Cartographer ROS | ||
|
||
## Summary | ||
[summary]: #summary | ||
|
||
Expose the delete / load interface of the pose graph in Cartographer ROS. | ||
|
||
## Motivation | ||
[motivation]: #motivation | ||
|
||
The pose graph / map builder interface supports deleting trajectories and loading states at runtime. | ||
The motivation of RFC-23 for why delete/load is useful also applies here. | ||
|
||
So far, we have gRPC services for doing that: | ||
* [DeleteTrajectory](https://github.com/googlecartographer/cartographer/blob/master/cartographer/cloud/proto/map_builder_service.proto#L111) | ||
* [LoadStateFromFile](https://github.com/googlecartographer/cartographer/blob/897762675caffdb8f21d07ff01824528b56c2e8b/cartographer/cloud/proto/map_builder_service.proto#L161) | ||
|
||
|
||
The goal of this RFC is to make this accesible from Cartographer ROS. | ||
|
||
|
||
## Approach | ||
[approach]: #approach | ||
|
||
### New ROS services | ||
|
||
`/delete_trajectory`: | ||
``` | ||
int32 trajectory_id | ||
--- | ||
cartographer_ros_msgs/StatusResponse status | ||
``` | ||
|
||
`/load_state_from_file`: | ||
``` | ||
string file_path | ||
bool load_frozen_state | ||
--- | ||
cartographer_ros_msgs/StatusResponse status | ||
``` | ||
|
||
### Handlers | ||
|
||
`HandleDeleteTrajectory` needs to: | ||
* check the requested trajectory ID exists and is in trajectory state `FINISHED` or `FROZEN` (otherwise [the deletion work item crashes](https://github.com/googlecartographer/cartographer/blob/master/cartographer/mapping/internal/2d/pose_graph_2d.cc#L613)) - [CheckTrajectoryState](https://github.com/googlecartographer/cartographer_ros/pull/1262) will be useful for that | ||
* call `DeleteTrajectory` | ||
|
||
`HandleLoadStateFromFile` just calls `LoadStateFromFile`. | ||
|
||
## Discussion Points | ||
[discussion]: #discussion | ||
|
||
### Potential race conditions, necessary checks | ||
|
||
* deletion is handled by a trimmer, which means it is delayed until the next optimization | ||
* deletion of frozen trajectories requires a patch, see: https://github.com/cartographer-project/cartographer/pull/1767 |