Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to delete edge #21

Open
tim-fan opened this issue May 20, 2020 · 7 comments
Open

Ability to delete edge #21

tim-fan opened this issue May 20, 2020 · 7 comments

Comments

@tim-fan
Copy link

tim-fan commented May 20, 2020

Hello, thanks for the great package!
I'm just wondering if there is a way to delete edges with this tool?
The map I import from hdl_graph_slam has some incorrect loop closures I'd like to delete. Additionally I sometimes manually add loop closures incorrectly, and I'd like a way to undo them.

Is there a way to delete these edges?

@koide3
Copy link
Owner

koide3 commented May 20, 2020

The current implementation does not provide a way to delete an edge. But, we will definitely add this ability in the future version.

So far, you can try the devel branch that incorporates some new features, and one of them allows the user to replace an existing pose edge constraint. You can select two keyframes that are connected by a wrong edge and give a correct pose. Then, the existing constraint will be replaced with the new one.

@tim-fan
Copy link
Author

tim-fan commented May 20, 2020

OK, thanks for the info.

In the meantime for the incorrect hdl_graph_slam edges, I've found I can manually delete them in the exported g2o file. But yes a 'click and delete edge' feature would be very handy 👍👍

@koide3
Copy link
Owner

koide3 commented May 28, 2020

Preliminary implementation of the deleting edge ability is now available on the devel branch.

@ThanhNhann
Copy link

Thank for adding delete edge button, but when I check the function void delete_edge(EdgeView::Ptr edge) and comment the part find and erase edges_view, the code still run fine. Can you explain the role of this part in this function ?
Thanks!

@koide3
Copy link
Owner

koide3 commented Oct 14, 2020

Can you point the code with a permalink so that I can take a look at it?

@koide3
Copy link
Owner

koide3 commented Oct 14, 2020

edges_view is a subset of drawables and used to manage right click menu. Even if you comment out these lines, the deleted edge properly disappears as far as the following lines are preserved and the drawing object of the edge is removed from drawables (some unused edge_view objects would remain though).

https://github.com/SMRT-AIST/interactive_slam/blob/1ecd2f95d3bd8eee6a986c8e49a8745ab40003aa/include/hdl_graph_slam/view/interactive_graph_view.hpp#L99-L103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants