Skip to content

Commit 82a5671

Browse files
committed
Add options for ROS
1 parent 52e09ef commit 82a5671

5 files changed

Lines changed: 207 additions & 33 deletions

File tree

core/SupportedSoftwareModules.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,40 @@
139139
"LowLevelPathPlanning": {
140140
"ValidClassNames": [
141141
"PassThroughPlanner",
142+
"PassThroughTrajectoryPlanner",
143+
"MinSnapTrajectoryPlanner",
142144
"LinePlanner"
143145
],
144146
"ValidParameters": {
145147
"PassThroughPlanner": {},
146-
"LinePlanner": {}
148+
"PassThroughTrajectoryPlanner": {},
149+
"LinePlanner": {},
150+
"MinSnapTrajectoryPlanner": {
151+
"default_speed": {
152+
"type": "float",
153+
"description": "[m/s] The default speed the trajectory should be planned for in meters per second",
154+
"range": [
155+
0.5,
156+
10.0
157+
]
158+
},
159+
"setpoint_type": {
160+
"type": "str",
161+
"description": "[m/s] The default speed the trajectory should be planned for in meters per second",
162+
"valid_entries": ["position", "velocity", "angular_rate"]
163+
}
164+
}
147165
},
148166
"ValidInputArgs": {
149167
"PassThroughPlanner": [
150168
"MovementCommand"
151169
],
170+
"MinSnapTrajectoryPlanner": [
171+
"Trajectory"
172+
],
173+
"PassThroughTrajectoryPlanner": [
174+
"Trajectory"
175+
],
152176
"LinePlanner": [
153177
"MovementCommand"
154178
]
@@ -159,6 +183,12 @@
159183
],
160184
"LinePlanner": [
161185
"MovementCommand"
186+
],
187+
"MinSnapTrajectoryPlanner": [
188+
"Trajectory"
189+
],
190+
"PassThroughTrajectoryPlanner": [
191+
"Trajectory"
162192
]
163193
},
164194
"ValidModuleParameters":{

core/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
#
77
# Description: Core Execution of the forward-facing gui
88
# =============================================================================
9-
__version__ = '1.2.0'
9+
__version__ = '1.0.0'

core/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def handle_multipart(self, message: dict) -> bytes:
342342
recv_data = b''.join(recv_bytes)
343343
return recv_data
344344

345-
def load_user_code(self, settings: dict) -> str:
345+
def load_user_code(self, settings: dict, path: str = ".") -> str:
346346
"""
347347
Load and prepare the User Code for sending. This entails reading
348348
the Python files, encoding them to JSON strings and providing
@@ -358,10 +358,10 @@ def load_user_code(self, settings: dict) -> str:
358358
for module_name, module in agent_info["SoftwareModules"].items():
359359
isCustomModule, isCustomAlgo = self.query_supported_module_list(module_name, module["Algorithm"]["ClassName"])
360360
if isCustomAlgo:
361-
with open("user_code/{}/{}.py".format(agent_name, module["Algorithm"]["ClassName"]), "r") as file:
361+
with open("{}/user_code/{}/{}.py".format(path, agent_name, module["Algorithm"]["ClassName"]), "r") as file:
362362
user_code[agent_name][module_name] = {"Code": json.dumps(file.read()), "AlgorithmName": module["Algorithm"]["ClassName"]}
363363
elif isCustomModule:
364-
with open("user_code/{}/{}.py".format(agent_name, module_name), "r") as file:
364+
with open("{}/user_code/{}/{}.py".format(path, agent_name, module_name), "r") as file:
365365
user_code[agent_name][module_name] = {"Code": json.dumps(file.read()), "AlgorithmName": module["Algorithm"]["ClassName"]}
366366

367367
return user_code

0 commit comments

Comments
 (0)