Functions | Variables
segmented_arc_base_controller Namespace Reference

Functions

def cleanup ()
 
def goalCallback (data)
 
def goalStatusCallback (data)
 
def move (ox, oy, oth, tx, ty, tth, gth)
 
def odomCallback (data)
 
def pathCallback (data)
 

Variables

bool followpath = False
 
bool goalpose = False
 
bool goalseek = False
 
int goalth = 0
 
int initth = 0
 
int lastpath = 0
 
int linearspeed = 150
 
 listener = tf.TransformListener()
 
float listentime = 1.5
 
 minturn = math.radians(6)
 
int nextmove = 0
 
int odomth = 0
 
int odomx = 0
 
int odomy = 0
 
tuple quaternion = (rot[0], rot[1], rot[2], rot[3])
 
 rot
 
float secondspermeter = 3.2
 
float secondspertwopi = 3.8
 
 t = rospy.get_time()
 
int targetth = 0
 
int targetx = 0
 
int targety = 0
 
int tfth = 0
 
 trans
 
int turnspeed = 100
 

Detailed Description

listen to /move_base/TrajectoryPlannerROS/local_plan
use rotate and movedistance commands to get there, repeat
subscribe to odo so moves relative to current pos
assumes robot is stopped before running this

rosmsg show nav_msgs/Path
rosmsg show nav_msgs/Odometry
rosmsg show geometry_msgs/PoseStamped << is in map frame!!!

consider polling telnet and broadcasting odom from here, to only update odom between moves
/move_base/status  3 = goal reached, 1= accepted (read last in list)
rosmsg show actionlib_msgs/GoalStatusArray

adding initial pose to goal pose:
1st test, initial poseth -90deg: solution would be just ot add initial pose to goal pose
        gth = gth + ith
        180 = 180 + (-90)
        if dth > math.pi:
dth = -math.pi*2 + dth
        elif dth < -math.pi:
dth = math.pi*2 + dth
^^ works but not if odom gets whacked - need to use odom/map tf and ADD to goal pose diff

Function Documentation

def segmented_arc_base_controller.cleanup ( )

Definition at line 195 of file segmented_arc_base_controller.py.

def segmented_arc_base_controller.goalCallback (   data)

Definition at line 78 of file segmented_arc_base_controller.py.

def segmented_arc_base_controller.goalStatusCallback (   data)

Definition at line 105 of file segmented_arc_base_controller.py.

def segmented_arc_base_controller.move (   ox,
  oy,
  oth,
  tx,
  ty,
  tth,
  gth 
)

Definition at line 131 of file segmented_arc_base_controller.py.

def segmented_arc_base_controller.odomCallback (   data)

Definition at line 70 of file segmented_arc_base_controller.py.

def segmented_arc_base_controller.pathCallback (   data)

Definition at line 58 of file segmented_arc_base_controller.py.

Variable Documentation

bool segmented_arc_base_controller.followpath = False

Definition at line 44 of file segmented_arc_base_controller.py.

bool segmented_arc_base_controller.goalpose = False

Definition at line 48 of file segmented_arc_base_controller.py.

bool segmented_arc_base_controller.goalseek = False

Definition at line 49 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.goalth = 0

Definition at line 45 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.initth = 0

Definition at line 54 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.lastpath = 0

Definition at line 47 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.linearspeed = 150

Definition at line 50 of file segmented_arc_base_controller.py.

segmented_arc_base_controller.listener = tf.TransformListener()

Definition at line 211 of file segmented_arc_base_controller.py.

float segmented_arc_base_controller.listentime = 1.5

Definition at line 36 of file segmented_arc_base_controller.py.

segmented_arc_base_controller.minturn = math.radians(6)

Definition at line 46 of file segmented_arc_base_controller.py.

segmented_arc_base_controller.nextmove = 0

Definition at line 37 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.odomth = 0

Definition at line 40 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.odomx = 0

Definition at line 38 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.odomy = 0

Definition at line 39 of file segmented_arc_base_controller.py.

tuple segmented_arc_base_controller.quaternion = (rot[0], rot[1], rot[2], rot[3])

Definition at line 229 of file segmented_arc_base_controller.py.

segmented_arc_base_controller.rot

Definition at line 226 of file segmented_arc_base_controller.py.

float segmented_arc_base_controller.secondspermeter = 3.2

Definition at line 51 of file segmented_arc_base_controller.py.

float segmented_arc_base_controller.secondspertwopi = 3.8

Definition at line 53 of file segmented_arc_base_controller.py.

segmented_arc_base_controller.t = rospy.get_time()

Definition at line 214 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.targetth = 0

Definition at line 43 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.targetx = 0

Definition at line 41 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.targety = 0

Definition at line 42 of file segmented_arc_base_controller.py.

segmented_arc_base_controller.tfth = 0

Definition at line 56 of file segmented_arc_base_controller.py.

segmented_arc_base_controller.trans

Definition at line 226 of file segmented_arc_base_controller.py.

int segmented_arc_base_controller.turnspeed = 100

Definition at line 52 of file segmented_arc_base_controller.py.



oculusprime
Author(s): Colin Adamson
autogenerated on Wed Mar 10 2021 03:14:59