RAPP Platform API
Main Page
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
PathPlanningPlan2D.py
Go to the documentation of this file.
1
from
RappCloud.Objects
import
(
2
File,
3
Payload)
4
5
from
Cloud
import
(
6
CloudMsg,
7
CloudRequest,
8
CloudResponse)
9
10
11
class
PathPlanningPlan2D
(CloudMsg):
12
""" Path Planning Plan 2D Cloud Message object
13
14
For more information read on:
15
https://github.com/rapp-project/rapp-platform/tree/master/rapp_path_planning/rapp_path_planning
16
"""
17
18
class
Request
(CloudRequest):
19
""" Path Planning Plan 2D Cloud Request object.
20
21
PathPlanningPlan2D.Request
22
"""
23
def
__init__
(self, **kwargs):
24
"""!
25
Constructor
26
27
@param **kwargs - Keyword arguments. Apply values to the request attributes.
28
- @ref map_name
29
- @ref robot_type
30
- @ref algorithm
31
- @ref pose_start
32
- @ref pose_goal
33
"""
34
35
## The map name.
36
self.
map_name
=
''
37
## The robot type. It is required to determine it's parameters
38
# (footprint etc.)
39
self.
robot_type
=
''
40
## The path planning algorithm to apply.
41
self.
algorithm
=
''
42
## Start pose of the robot.
43
# Same structure to ROS-GeometryMsgs/PoseStamped
44
self.
pose_start
= {}
45
## Goal pose of the robot.
46
# Same structure to ROS-GeometryMsgs/PoseStamped
47
self.
pose_goal
= {}
48
super(
PathPlanningPlan2D.Request
, self).
__init__
(**kwargs)
49
50
51
def
make_payload
(self):
52
""" Create and return the Payload of the Request. """
53
return
Payload(
54
map_name=self.
map_name
,
55
robot_type=self.
robot_type
,
56
algorithm=self.
algorithm
,
57
start=self.
pose_start
,
58
goal=self.
pose_goal
)
59
60
61
62
def
make_files
(self):
63
""" Create and return Array of File objects of the Request. """
64
return
[]
65
66
67
class
Response
(CloudResponse):
68
""" Path Planning Plan 2D Cloud Response object.
69
70
PathPlanningPlan2D.Response
71
"""
72
def
__init__
(self, **kwargs):
73
"""!
74
Constructor
75
76
@param **kwargs - Keyword arguments. Apply values to the request attributes.
77
- @ref error
78
"""
79
80
## Error message
81
self.
error
=
''
82
## Plan Status. Can be one of:
83
# - 0 : path cannot be planned.
84
# - 1 : path found.
85
# - 2 : wrong map name.
86
# - 3 : wrong robot type.
87
# - 4 : wrong algorithm.
88
self.
plan_found
= 0
89
## Ff plan_found is equal to 0 (path found), this is an array of
90
# waypoints from start to goal.
91
self.
path
= []
92
super(
PathPlanningPlan2D.Response
, self).
__init__
(**kwargs)
93
94
95
def
__init__
(self, **kwargs):
96
"""!
97
Constructor
98
99
@param **kwargs - Keyword arguments. Apply values to the request attributes.
100
- @ref Request.map_name
101
- @ref Request.robot_type
102
- @ref Request.algorithm
103
- @ref Request.pose_start
104
- @ref Request.pose_goal
105
"""
106
107
# Create and hold the Request object for this CloudMsg
108
self.
req
=
PathPlanningPlan2D.Request
()
109
# Create and hold the Response object for this CloudMsg
110
self.
resp
=
PathPlanningPlan2D.Response
()
111
super(PathPlanningPlan2D, self).
__init__
(
112
svcname=
'path_planning_plan_path_2d'
, **kwargs)
113
114
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Request.__init__
def __init__
Constructor.
Definition:
PathPlanningPlan2D.py:23
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Request.make_files
def make_files
Definition:
PathPlanningPlan2D.py:62
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Request.make_payload
def make_payload
Definition:
PathPlanningPlan2D.py:51
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Request.pose_goal
pose_goal
Goal pose of the robot.
Definition:
PathPlanningPlan2D.py:47
RappCloud.Objects
Definition:
__init__.py:1
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Response.error
error
Error message.
Definition:
PathPlanningPlan2D.py:81
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Response.path
path
Ff plan_found is equal to 0 (path found), this is an array of waypoints from start to goal...
Definition:
PathPlanningPlan2D.py:91
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Request.robot_type
robot_type
The robot type.
Definition:
PathPlanningPlan2D.py:39
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D
Definition:
PathPlanningPlan2D.py:11
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Response.__init__
def __init__
Constructor.
Definition:
PathPlanningPlan2D.py:72
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Request
Definition:
PathPlanningPlan2D.py:18
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Request.pose_start
pose_start
Start pose of the robot.
Definition:
PathPlanningPlan2D.py:44
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.__init__
def __init__
Constructor.
Definition:
PathPlanningPlan2D.py:95
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.req
req
Definition:
PathPlanningPlan2D.py:108
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Request.map_name
map_name
The map name.
Definition:
PathPlanningPlan2D.py:36
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.resp
resp
Definition:
PathPlanningPlan2D.py:110
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Request.algorithm
algorithm
The path planning algorithm to apply.
Definition:
PathPlanningPlan2D.py:41
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Response.plan_found
plan_found
Plan Status.
Definition:
PathPlanningPlan2D.py:88
RappCloud.CloudMsgs.PathPlanningPlan2D.PathPlanningPlan2D.Response
Definition:
PathPlanningPlan2D.py:67
python
RappCloud
CloudMsgs
PathPlanningPlan2D.py
Generated on Fri Jul 29 2016 18:45:01 for RAPP Platform API by
1.8.6