Skip to content

Commit

Permalink
Multiple polygons rviz selection tool (#7)
Browse files Browse the repository at this point in the history
* Multiple polygon selections working, but when generating tool path plan, it only plans on the current polygon selection.

* Last update before moving to auto add selections

* Multiple Polygon working (changed srv response type), esthetic changes are on the way

* Multiple Polygon Selection Tool Working (Includes Text Reference).

* Added GIF and updated readme.

* Added "Point Generation Gap" tool to be able to define the gap between the last generated point and the new one waiting to be generated.

* WIP updates

* Replace display vectors with scene nodes

* Renamed from pts to points

* Ran clang-format

* Removed duplicated entry from .clang-format file

* Updated video and README

* Updated badge URL

* Updated name of point gap property

* Updated docstring

---------

Co-authored-by: Michael Ripperger <michael.ripperger@swri.org>
  • Loading branch information
BryanMqz and marip8 authored May 24, 2024
1 parent 6f59871 commit 9cf240f
Show file tree
Hide file tree
Showing 6 changed files with 311 additions and 73 deletions.
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ AllowAllParametersOfDeclarationOnNextLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
Rviz tool plugin for creating polygon selections

[![license - apache 2.0](https://img.shields.io/:license-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)
[![CI](https://github.com/marip8/rviz_polygon_selection_tool/actions/workflows/main.yml/badge.svg)](https://github.com/marip8/rviz_polygon_selection_tool/actions/workflows/main.yml)
[![CI](https://github.com/swri-robotics/rviz_polygon_selection_tool/actions/workflows/main.yml/badge.svg)](https://github.com/marip8/rviz_polygon_selection_tool/actions/workflows/main.yml)

## Operation

![example](docs/example.gif)

### Modes
- **Left mouse button click**: Add point to current polygon
- **Middle mouse button click**: Erase current polygon selection
- **Right mouse button click**: Finish current polygon and start new polygon
- **Shortcut `delete`, `backspace`**: Remove all polygons

## Modes
- **Lasso**: click and hold left mouse button while drawing a shape
- **Click**: click and release the left mouse button to drop a vertex in the polygon

Toggle betweeen the modes by selecting the `Lasso mode` check box in the tool properties panel

### Features
- **Right mouse button click**: deactivate the tool
- **Middle mouse button click**: erase current selection
- **Shortcut `p`**: activate the tool
- **Toggle loop closure**: draws/hides a line connecting the last and first waypoints (see tool properties panel)
Binary file modified docs/example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9cf240f

Please sign in to comment.