MCPcopy Create free account
hub / github.com/SHAILAB-IPEC/OpenFly-Platform / process_act

Function process_act

tool_ws/src/ins_gen/process.py:160–178  ·  view source on GitHub ↗
(actions)

Source from the content-addressed store, hash-verified

158
159
160def process_act(actions):
161 # 定义动作名称与数字的对应关系
162 action_map = {
163 "stop":0,
164 "go straight": 1,
165 "turn left": 2,
166 "turn right": 3,
167 "go up": 4,
168 "go down": 5,
169 "move left": 6,
170 "move right": 7,
171 'up':-1,
172 'down':-2
173 }
174
175 # 转换列表
176 transformed_list = [action_map[action['action']['type']] for action in actions]
177
178 return transformed_list
179
180
181

Callers 1

gptFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected