AttributeError: 'tuple' object has no attribute 'serialize' - after attempting to execute a plan
Hello.
I'm using moveit's move_group_interface in Python 3 and ROS Noetic. I'm trying to save a plan (trajectory), then load it and execute.
pose_goal = geometry_msgs.msg.Pose()
pose_goal.orientation.x = 0
pose_goal.orientation.y = 0.7071068
pose_goal.orientation.z = 0
pose_goal.orientation.w = 0.7071068
pose_goal.position.x = x
pose_goal.position.y = y
pose_goal.position.z = z
self.move_group.set_pose_target(pose_goal)
plan = self.move_group.plan()
file_path = 'plan.yaml'
with open(file_path, 'w') as file_save:
yaml.dump(plan, file_save, default_flow_style=True)
with open(file_path, 'r') as file_open:
loaded_plan = yaml.load(file_open)
self.move_group.execute(loaded_plan)
The execute line outputs:
AttributeError: 'tuple' object has no attribute 'serialize'
Even if I replace the execute(loaded_plan ) with execute(plan) it still outputs the same error which leads me to believe the error is not in the saving/loading part.
Robot: Universal Robot 5 (UR5) Interface: moveit/move_group_interface in Pyhon
Thanks