Courseplay/CourseGenerator

Vine Course Generation features needed

schwiti6190 opened this issue · 5 comments

These parameters have to be considered for a valid course generation

  • fixed lane spacing(normal grid is 3m), this also means no extra lane at the end, if the polygon is not a perfect square.
  • fixed starting point, that needs to be crossed by the first lane
  • fixed lane world direction/rotation
  • skip lanes, already in the old generator included
  • fixed starting point, that needs to be crossed by the first lane

  • fixed lane world direction/rotation

@schwiti6190 can you explain these two?

@pvaiko

The found field border is not straight enough and is not correct, so search for vine node in the border and use
it to generate a valid context in combination with the field border.

A line of a vine vield is separated into multiple line, where each line is separated into multiple small tiles.
We use one tile to get the world direction of the vine field, which only consists of parralell line with the same direction.
Also use the tile position to get the vector of the vine lines. Each line is sparated by a fixed delta which would be the work width in terms of the course generator

For most of this we already have the building blocks, so should be easy. @schwiti6190 what's missing is the length of the rows. Are all rows of the same length? If yes, the easiest would be to just pass in the coordinates of the first and the last node of the first row, a working width, number of rows and either direction (left or right) in which to add rows to the first row, or just the coordinates of any node in any other row, the generator then can figure out the rest.

Maybe coordinates of the first and last point of the first row and first point of the last row?

@schwiti6190, could we use

function Island.getIslandPerimeterPoints(islandPoints)
to create the field polygon from the list of vine node positions? That, the start and the direction of the first row would be sufficient to create all rows.

@pvaiko We could try it out, but i am not sure if the current VineScanner is even working correctly for non rectangle fields.