def pose_to_list(pose):
if type(pose) == geometry_msgs.msg.PoseStamped:<EOL><INDENT>return [[<EOL>pose.pose.position.x, pose.pose.position.y, pose.pose.position.z<EOL>], [<EOL>pose.pose.orientation.x, pose.pose.orientation.y,<EOL>pose.pose.orientation.z, pose.pose.orientation.w<EOL>]]<EOL><DEDENT>elif type(pose) == geometry_msgs.msg.Pose:<EOL><INDENT>return [[pose.position.x, pose.position.y, pose.position.z], [<EOL>pose.orientation.x, pose.orientation.y, pose.orientation.z,<EOL>pose.orientation.w<EOL>]]<EOL><DEDENT>else:<EOL><INDENT>raise Exception("<STR_LIT>",<EOL>str(type(pose)))<EOL><DEDENT>
Convert a Pose or PoseStamped in Python list ((position), (quaternion))
:param pose: geometry_msgs.msg.PoseStamped or geometry_msgs.msg.Pose
:return: the equivalent in list ((position), (quaternion))