Public Member Functions | Public Attributes
move.Scan_msg Class Reference

List of all members.

Public Member Functions

def __init__
def bumper_event_callback
def cliff_event_callback
def for_callback
def move_callback
def movement
def reset_sect
def sort

Public Attributes

 ang
 bump_subscriber
 dbgmsg
 fwd
 msg
 pub
 sect_1
 sect_2
 sect_3
 sub
 wheel_drop_subscriber

Detailed Description

Definition at line 20 of file move.py.


Constructor & Destructor Documentation

def move.Scan_msg.__init__ (   self)
Initializes an object of this class.

The constructor creates a publisher, a twist message.
3 integer variables are created to keep track of where obstacles exist.
3 dictionaries are to keep track of the movement and log messages.

Definition at line 22 of file move.py.


Member Function Documentation

def move.Scan_msg.bumper_event_callback (   self,
  msg 
)
Checks to see if the bumper has been pressed, if so the robot will then
back up and turn in a random direction.

Definition at line 94 of file move.py.

def move.Scan_msg.cliff_event_callback (   self,
  msg 
)
Checks to see if the robot is over a cliff. If so, then backs up to turn in
a random direction. Currently does not work, be careful not to trash your
robot.

Definition at line 117 of file move.py.

def move.Scan_msg.for_callback (   self,
  laserscan 
)
Passes laserscan onto function sort which gives the sect 
variables the proper values.  Then the movement function is run 
with the class sect variables as parameters.

Parameter laserscan is received from callback function.

Also subscribes to tracking.py.

Definition at line 149 of file move.py.

def move.Scan_msg.move_callback (   self,
  data 
)
Checks to see if the subscriber from tracking.py is sending in a value
of False before sending movement commands to the robot. This is to avoid
the robot from both trying to follow a person as well as autonomously
navigate.

Definition at line 141 of file move.py.

def move.Scan_msg.movement (   self,
  sect1,
  sect2,
  sect3 
)
Uses the information known about the obstacles to move robot.

Parameters are class variables and are used to assign a value to
variable sect and then	set the appropriate angular and linear 
velocities, and log messages.
These are published and the sect variables are reset.

Definition at line 62 of file move.py.

def move.Scan_msg.reset_sect (   self)
Resets the below variables before each new scan message is read

Definition at line 41 of file move.py.

def move.Scan_msg.sort (   self,
  laserscan 
)
Goes through 'ranges' array in laserscan message and determines 
where obstacles are located. The class variables sect_1, sect_2, 
and sect_3 are updated as either '0' (no obstacles within 0.7 m)
or '1' (obstacles within 0.7 m)

Parameter laserscan is a laserscan message.

Definition at line 47 of file move.py.


Member Data Documentation

Definition at line 27 of file move.py.

Definition at line 26 of file move.py.

Definition at line 27 of file move.py.

Definition at line 27 of file move.py.

Definition at line 26 of file move.py.

Definition at line 26 of file move.py.

Definition at line 26 of file move.py.

Definition at line 26 of file move.py.

Definition at line 26 of file move.py.

Definition at line 155 of file move.py.

Definition at line 26 of file move.py.


The documentation for this class was generated from the following file:


gapter
Author(s):
autogenerated on Thu Jun 6 2019 22:05:14