-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal_plan_details.txt
42 lines (35 loc) · 2.22 KB
/
local_plan_details.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
This document is intended to detail the purpose and functions of local_plan.py (the local planner), which is used within motis_goals.py (the MoTiS goals software).
This code takes in a desired robot goal (x,y,theta) and moves a robot from one place to another by publishing to the /cmd_vel topic on ROS.
FILE: local_plan.py
DESCRIPTION: Moves robot from current position to goal position, stopping when an object is detected in front of it.
Has two ROS subscribers that read odometry data and laser scan data. Has one ROS publisher that publishes linear and angular veolcity.
Input required is the current goal as a Point() type.
FUNCTIONS:
- newOdom(msg):
FUNCTION: Callback function that gets the current odometry of the robot
INPUTS: odometry message
OUTPUTS: current x,y,theta
- newLaserScan(msg)
FUNCTION: Callback function that gets the laser scan data in front of the robot
INPUTS: laser scan message
OUTPUTS: dictionary of the closest object detected on the front right and left
- move_to_goal_avoidance(curGoal)
FUNCTION: Moves robot from current position to goal position while stopping if an obstacle enters its space
INPUTS: Current goal as a Point() type
OUTPUTS: self.move Twist() type with modified linear and angular velocities
- return_to_starting_pos()
FUNCTION: returns robot to starting position if desired by user
INPUTS: terminal input y or n
OUTPUTS: robot goes to its 0,0
- stop()
FUNCTION: stops the robot
INPUTS: none
OUTPUTS: robot stops
- correct_orientation(y):
FUNCTION: rotate towards goal if not pointed at the goal, or at the goal
INPUTS: current goal y position
OUTPUTS: robot rotation
- final_formation_orientation(orientation):
FUNCTION: Rotate to a final specified orientation
INPUTS: desired final orientation
OUTPUTS: rotates robot until at desired final orientation