nav2_simple_commander.line_iterator module
This is a Python3 API for a line iterator.
It provides the ability to iterate through the points of a line.
- class nav2_simple_commander.line_iterator.LineIterator(x0, y0, x1, y1, step_size=1.0)
Bases:
object
LineIterator.
LineIterator Python3 API for iterating along the points of a given line
- advance()
Advance to the next point in the line.
- clamp(n, min_n, max_n)
Clamp n to be between min_n and max_n.
Args
n (float): input value min_n (float): minimum value max_n (float): maximum value
Returns
n (float): input value clamped between given min and max
- getX()
Get the abscissa of the current point.
- getX0()
Get the abscissa of the initial point.
- getX1()
Get the abscissa of the final point.
- getY()
Get the ordinate of the current point.
- getY0()
Get the ordinate of the intial point.
- getY1()
Get the ordinate of the final point.
- get_line_length()
Get the length of the line.
- isValid()
Check if line is valid.