CommandScripts package

Submodules

CommandScripts.AutoHelp module

class CommandScripts.AutoHelp.AutoHelp

Bases: object

get_bearing(current_GPS, target_GPS)

Returns the angle between two GPS coordinates

PARAMS:

current_GPS (tuple): (latitude, longitude) target_GPS (tuple): (latitude, longitude)

RETURNS:

float. angle between the two coordinates

get_distance(current_GPS, target_GPS)
get_spin_angle(current_GPS, target_GPS)
jsonify_commands(commands)

CommandScripts.GPS_NAV module

class CommandScripts.GPS_NAV.GPS_Nav(max_speed, max_steering, GPS, compass, GPS_coordinate_map)

Bases: object

PID_steer(commands, steer_output, angle)
change_modes(desired_mode)
forward_drive(commands)
get_steering(current_GPS, GPS_target)
goto_next_coordinate()
spin(commands, angle)
stop_rover(commands)
class CommandScripts.GPS_NAV.VFH_obstacle_avoidance(distance_threshold, general_angle)

Bases: object

get_bearing(current_longlat, target_longlat)
get_target_angle(lidar_data, rover_angle, current_longlat, target_longlat)

Obstacle avoidance logic that uses vector field histogram (VFH)

PARAMS:

lidar_data (list): array of 360 elements. each index is an angle rover_angle (int): the angle that the rover is currently facing current_longlat(tuple): (longitude, latitude) of rover’s current position target_longlat (tuple): (longitude, latitude) of rover’s target position

RETURNS:

integer. The angle we want to turn to

CommandScripts.MMT_drive_command module

CommandScripts.Trajectory module

class CommandScripts.Trajectory.Trajectory

Bases: object

object_detected(d)

CommandScripts.autonomy module

class CommandScripts.autonomy.Autonomy(rover_comms, url, max_speed, max_steering, GPS, GPS_coordinate_map)

Bases: object

get_rover_status(bearing, distance)
start_mission()
update_gps()

CommandScripts.drive_command module

Module contents