-
Notifications
You must be signed in to change notification settings - Fork 7
Allow waypoints to define shape of rows in a field #352
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
Draft
rodja
wants to merge
10
commits into
main
Choose a base branch
from
multi-waypoints-on-field
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
caused by epsilon error
def _should_finish(self) -> bool: | ||
end_pose = Pose(x=self.target.x, y=self.target.y, yaw=self.origin.direction(self.target), time=0) | ||
return end_pose.relative_point(self.robot_locator.pose.point).x > 0 | ||
return end_pose.relative_point(self.robot_locator.pose.point).x > -0.0001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should investigate why this failed for you
robot must follow a row, then user can pause the field navigation and set a waypoint -- also started with new waypoint driving but it's still a total mess
19 tasks
rodja
added a commit
that referenced
this pull request
Aug 1, 2025
### Motivation When we started to implement #352 we once again noticed the limitations of our old navigation style that always just calculated the next step. We decided to convert our navigations into path planners, that use the RoSys driver's system of [PathSegments](https://github.com/zauberzeug/rosys/blob/main/rosys/driving/path_segment.py). ### Implementation I reimplemented the `Navigation` class as a waypoint navigation that generates the whole path beforehand. All other navigations extend from this. All specialized navigation types just have to implement their own `generate_path` method. The implementation is not fully polished yet, but we decided to get this merged now and fix any occurring issues later. This way other projects and issues (like #352) can already profit from these changes. ### Progress - [x] I chose a meaningful title that completes the sentence: "If applied, this PR will..." - [x] I chose meaningful labels (if GitHub allows me to so). - [x] The implementation is complete. - [x] Let the `AutomationWatcher` stop the automation, when the robot was moved when paused - [x] Rework implement blocking - [x] Wait for zauberzeug/rosys#314 - [x] FieldNavigation._is_allowed_to_start after path generation - [x] Fix strange turns when weeding in a curve - [x] Stop at last row - [x] Remove debugging code - [x] Tests with a real hardware have been successful (or are not necessary). - [x] StraightLineNavigation - [x] FieldNavigation - [x] ImplementDemoNavigation - [x] Pytests have been added (or are not necessary). - [x] Restructure navigation tests - [x] Waypoint Navigation tests - [x] Fix Field Navigation tests - [x] Documentation has been added (or is not necessary). ### Known issues I will create Github issues once it's merged, so I can link code directly - If a target plant is on the next segment, but the robot isn't yet due to the `work_x` offset, the plant will be skipped - When driving a curved spline, plant locations will change due to perspective changes. That's why already targeted plants, can already be behind the robot when the robot arrives on target. - Advancing a certain distance on a spline returns unprecise t values (Navigation:L209) --------- Co-authored-by: Rodja Trappe <rodja@zauberzeug.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Non-RTK planted rows might bend to much to simply follow them in a straight line. This PR introduces the capability to add waypoints within rows to approximate the shape more closely.
Implementation
This is work in progress. See Progress below.
Progress
Field
class intoFieldDescription
andComputedField
FieldProvider
can add multiple waypoints per rowWORK_X
values (see test_advance_when_target_behind_robot)