forked from WangHanfu/multi-agent-path-finding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRobot.m
More file actions
53 lines (42 loc) · 1.24 KB
/
Robot.m
File metadata and controls
53 lines (42 loc) · 1.24 KB
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
43
44
45
46
47
48
49
50
51
52
53
classdef Robot<handle
properties
id
type %[0=transport robot, 1=pick robot]
State %[x,y,theta]
Action %actions: 0=wait,1=forward,2=backward,3=turn left,4=turn right
priority
Path
Mission
Task
Workzone %[xmin,xmax,ymin,ymax]
status % 0=idle,1=on the road, 2=waiting, 3=mutual pick
StatusRecord
end
methods
function obj = Robot()
end
%Initialize the robot.
function setAttribute(obj,id,type,initialState)
obj.id = id;
obj.type = type;
obj.setState(initialState);
obj.priority = id; %default priority
end
%Set state.
function setState(obj, state)
obj.State = state;
end
%Get state.
function state = getState(obj)
state = obj.State;
end
%Set task.
function setTask(obj, task)
obj.Task = task;
end
%path planning
function pathPlanning(obj)
obj.Path;
end
end
end