Comments (3)
@BirgitvdS thanks for letting it now that this is a feature you would like to see. I don't doubt that other users would also like an easy manner to remove waypoints, but I'm not sure on the details of how it should work such that that it works for everyone as intended.
The method I would think of would be something like:
self.navigator.remove_waypoint(location=(3,4)) # removes waypoint (3,4) from the waypoints list and restarts the navigator
However, if the waypoint you want to remove is present multiple times in the waypoints list, should they all be removed, or only the first or last?
from matrx.
My suggestion would be something like this:
self.navigator.remove_waypoint(location=(3,4), n= all)
in which "location" is the location of the waypoint and "n" is which waypoints you want to remove
Options could be:
n = all --> remove all waypoints with that location from the list
n = first --> remove first waypoints with that location from the list (if location is not specified, just remove first waypoint in the list)
n = last --> remove last waypoints with that location from the list (if location is not specified, just remove last waypoint in the list)
n = int --> in which int is an interger that specified which waypoint should be removed. For example if n= 5 than either "remove 5th waypoint which location X" or "remove 5th waypoint of the list" (in case no location in specified)
This way the user can use the remove function and specify what to remove.
Would this be possible?
from matrx.
Hey Birgit, although the solution you described would be useful, it is also quiet complicated with a lot of options, with minimal improvement over the two methods you described yourself. Instead of making a generic function with a lot of options which users most likely will not able to find anyway, it is better to make it easy to change the waypoints and reset the navigator. This is already the case, and the two alternatives you described seem sufficiently easy to use (possibly wrapped in your own remove_waypoint(navigator, waypoint)
function) and easy to customize to suit a users' needs, such that an additional function is not necessary in my opinion.
from matrx.
Related Issues (20)
- Make state available in object `update()` function
- Bug in function state.get_room_doors HOT 1
- Create MATRX tutorial(s) and fix existing tutorials HOT 4
- Navigator `get_all_waypoints` does not return updated waypoints HOT 1
- State get_closest_with_property function doesn't give closest object HOT 2
- Door object has hardcoded customizable properties HOT 1
- Custom pathplanner that takes preferences into account HOT 2
- Customizable properties not being passed for custom objects HOT 4
- Carrying objects with two agents? HOT 5
- Is it possible to use async in agent actions? HOT 2
- change_property of object cannot change img_name HOT 2
- Allow sending human message while busy HOT 5
- V2 simulation goals throw an error
- Change agent image size during simulation HOT 7
- Changing an agent's visualization properties on run time fails HOT 3
- TypeError: 'builtin_function_or_method' object is not iterable HOT 4
- GridWorld.grid uses a (y, x) coordinate system while all the object.location parameters of objects return (x, y) tuples
- Navigator fails silently when waypoints are list instead of typle
- Python3.10 and higher throws an ImportError
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matrx.