Path Commands

 

rv.waypoint_xythdrn()

Command:

waypoint_xythdrn()

Command
Syntax:

waypoint_xythdrn()

Python
Code
Samples:

rv.waypoint_xythdrn()

Example:

Getting the distance traveled toward the current way-point from the last way-point.

Python
Code
Samples:

L1 = rv.waypoint_xythdrn() D = L1[5]

Range:

N/A

Describe:

Read the x-coord, y-coord, time, heading, distance traveled, number of wheel revolutions, command number of the current waypoint. Returns a list with all these values as elements.

Note: Revs due to rotation commands such as rv.left() or rv.right() are not measured.

Result:

Return list of current way-point X, Y coordinates, Time, Heading, Distance, Revolutions, and command number.

Type or
Addressable
Component:

Returns Data

 

rv.waypoint_prev()

Command:

.waypoint_prev()

Command
Syntax:

.waypoint_prev()

Python
Code
Samples:

rv.waypoint_prev()

Example:

Getting the distance traveled during the previous way-point.

Python
Code
Samples:

L1 = rv.waypoint_prev()

D = L1[5]

Range:

N/A

Describe:

Read the x-coord, y-coord, time, heading, distance traveled, number of wheel revolutions, command number of the previous waypoint. Returns a list with all these values as elements.

Result:

Return list of the previous way-point X, Y coordinates, time, heading, distance, revolutions, and command number.

Type or
Addressable
Component:

Returns Data

 

rv.waypoint_eta()

Command:

.waypoint_eta()

Command
Syntax:

.waypoint_eta()

Python
Code
Samples:

time = rv.waypoint_eta()

Range:

N/A

Describe:

Returns the estimated time to drive to a waypoint.

Result:

Returns the estimated time to drive to a waypoint.

Type or
Addressable
Component:

Returns Data

 

rv.path_done()

Command:

.path_done()

Command
Syntax:

.path_done()

Python
Code
Samples:

while not rv.path_done():

 pass

Range:

N/A

Describe:

Returns a value of 0 or1 depending on whether the Rover is moving (0) or finished with all movement (1).

Result:

Returns 0 or 1 indicating if Rover is moving (1) or if all path commands have been executed (0)

Errors:

 

Type or
Addressable
Component:

Returns Data

 

rv.pathlist_x()

Command:

.pathlist_x()

Command
Syntax:

.pathlist_x()

Python
Code
Samples:

rv.pathlist_x()

Example:

Program to plot the RV path on the graph screen.

Python
Code
Samples:

rv.to_xy(1, 2)

x = rv.pathlist_x()

y = rv.pathlist_y()

 

print(“x = {}”.format(x))

print(“y = {}”.format(y))

Range:

N/A

Describe:

Returns a list of X values from the beginning to end including the current Waypoint X value.

Result:

Return list of X coordinates traversed since last rv.path_clear() or start of execution.

Type or
Addressable
Component:

Returns Data

 

rv.pathlist_y()

Command:

.pathlist_y()

Command
Syntax:

.pathlist_y()

Python
Code
Samples:

rv.pathlist_y()

Example:

Program to plot the RV path on the graph screen.

Python
Code
Samples:

rv.to_xy(1, 2)

x = rv.pathlist_x()

y = rv.pathlist_y()

 

print(“x = {}”.format(x))

print(“y = {}”.format(y))

Range:

N/A

Describe:

Returns a list of Y values from the beginning to end including the current Waypoint Y value.

Result:

Return list of Y coordinates traversed since last rv.path_clear() or start of execution.

Type or
Addressable
Component:

Returns Data

 

rv.pathlist_time()

Command:

.pathlist_time()

Command
Syntax:

.pathlist_time()

Python
Code
Samples:

rv.pathlist_time()

Range:

N/A

Describe:

Returns a list of the time in seconds from the beginning to and including the current Waypoint time value.

Result:

Return list of cumulative travel times for each successive way-point.

Type or
Addressable
Component:

Returns Data

rv.pathlist_heading()

Command:

.pathlist_heading()

Command
Syntax:

.pathlist_heading()

Python
Code
Samples:

rv.pathlist_heading()

Range:

N/A

Describe:

Returns a list of the headings from the beginning to and including the current Waypoint heading value.

Result:

Return list of cumulative angular headings taken.

Type or
Addressable
Component:

Returns Data

 

rv.pathlist_distance()

Command:

.pathlist_distance()

Command
Syntax:

.pathlist_distance()

Example:

Getting the cumulative distance traveled since the beginning of a journey by the RV.

Python
Code
Samples:

d = rv.pathlist_distance()

Range:

N/A

Describe:

Returns a list of the distances traveled from the beginning to and including the current Waypoint distance value.

Result:

Return list of cumulative distances traveled.

Type or
Addressable
Component:

Returns Data

rv.pathlist_revs()

Command:

.pathlist_revs()

Command
Syntax:

.pathlist_revs()

Python
Code
Samples:

rv.pathlist_revs()

Range:

N/A

Describe:

Returns a list of the number of revolutions traveled from the beginning to and including the current Waypoint revolutions value.

Note: Revs due to rotation commands such as rv.left() or rv.right() are not measured.

Result:

Return list of wheel revolutions traveled.

Type or
Addressable
Component:

Returns Data

 

rv.pathlist_cmdnum()

Command:

.pathlist_cmdnum()

Command
Syntax:

.pathlist_cmdnum()

Python
Code
Samples:

actions = rv.pathlist_cmdnum()

Range:

N/A

Describe:

rv.pathlist.cmdnum() - returns a list of command numbers for the path.

Result:

Return list of commands used to travel to the current way-point entry.

0 - Start of Way-points (if first action is a STAY, then no START is given, but a STAY will be shown instead.)

1 - Travel forward

2 - Travel backward

3 - Left spin motion

4 - Right spin motion

5 - Left turn motion

6 - Right turn motion

7 - Stay (no motion) the time the RV stays at the current position is given in the TIME list.

8 - RV is currently in motion on this way-point traversal

Type or
Addressable
Component:

Returns Data

 

rv.waypoint_x()

Command:

.waypoint_x()

Command
Syntax:

.waypoint_x()

Python
Code
Samples:

x = rv.waypoint_x()

Range:

N/A

Describe:

Returns x coordinate of current waypoint.

Result:

Return current way-point X coordinate.

Type or
Addressable
Component:

Returns Data

 

rv.waypoint_y()

Command:

.waypoint_y()

Command
Syntax:

.waypoint_y()

Python
Code
Samples:

y = rv.waypoint_y()

Range:

N/A

Describe:

Returns y coordinate of current waypoint.

Result:

Return current way-point Y coordinate.

Errors:

 

Type or
Addressable
Component:

Returns Data

 

rv.waypoint_time()

Command:

.waypoint_time()

Command
Syntax:

.waypoint_time()

Python
Code
Samples:

time = rv.waypoint_time()

Range:

N/A

Describe:

Returns time spent traveling from previous to current waypoint.

Result:

Return total cumulative way-point travel time value in seconds.

Type or
Addressable
Component:

Returns Data

 

rv.waypoint_heading ()

Command:

.waypoint_heading ()

Command
Syntax:

.waypoint_heading ()

Python
Code
Samples:

heading = rv.waypoint_heading()

Range:

N/A

Describe:

Returns the absolute heading of the current waypoint.

Result:

Return current absolute heading in degrees. (+h = counter- clockwise, -h = clockwise).

Type or
Addressable
Component:

Returns Data

 

rv.waypoint_distance()

Command:

.waypoint_distance()

Command
Syntax:

.waypoint_distance()

Python
Code
Samples:

distance = rv.waypoint_distance()

Range:

N/A

Describe:

Returns the distance traveled between previous and current waypoint.

Result:

Return cumulative total distance traveled in meters.

Type or
Addressable
Component:

Returns Data

 

rv.waypoint_revs()

Command:

.waypoint_revs()

Command
Syntax:

.waypoint_revs()

Python
Code
Samples:

revs = rv.waypoint_revs()

Range:

 

Describe:

Returns number of revolutions needed to travel between previous and current waypoint.

Note: Revs due to rotation commands such as rv.left() or rv.right() are not measured.

Result:

Return total revolutions of the wheels performed to travel the cumulative distance to the current way-point.

Errors:

 

Type or
Addressable
Component:

Returns Data