def _get_slot_paths(msg_class):
# find first Pose in msg_class
pose_slot_paths = find_slots_by_type_bfs(msg_class, Pose)
for path in pose_slot_paths:
# make sure the path does not contain an array, because we don't want to deal with empty arrays...
if '[' not in path:
path = PoseViewWidget._make_path_list_from_path_string(pose_slot_paths[0])
return path + ['orientation'], path + ['position']
# if no Pose is found, find first Quaternion and Point
quaternion_slot_paths = find_slots_by_type_bfs(msg_class, Quaternion)
for path in quaternion_slot_paths:
if '[' not in path:
quaternion_slot_path = PoseViewWidget._make_path_list_from_path_string(path)
break
else:
quaternion_slot_path = None
point_slot_paths = find_slots_by_type_bfs(msg_class, Point)
for path in point_slot_paths:
if '[' not in path:
point_slot_path = PoseViewWidget._make_path_list_from_path_string(path)
break
else:
point_slot_path = None
return quaternion_slot_path, point_slot_path
pose_view_widget.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录