confuse in theBaxter-IK Pick and Place Demo example
Hi everyone,
I'm had some confuse problem in the Baxter IK pick and place demo example program there such as the ik_request()
, and _retract()
function there.
In the
ik_request()
, I can understand this function's main function was calling the IK server to calculate the rest of the joints angle after that return back. But what is the purpose in line 100 (What is doing in here?), line 102-107(*What is the purpose for theseed_str{}
,it's necessary to have this?)* and line 108-113( the if statement was determined the same condition, but here had to do two times?).Becuase the function a bit long, so please use the link go to the example website check the program.In the
_retract()
,follow is the programming:def _retract(self): # retrieve current pose from endpoint current_pose = self._limb.endpoint_pose() ik_pose = Pose() ik_pose.position.x = current_pose['position'].x ik_pose.position.y = current_pose['position'].y ik_pose.position.z = current_pose['position'].z + self._hover_distance ik_pose.orientation.x = current_pose['orientation'].x ik_pose.orientation.y = current_pose['orientation'].y ik_pose.orientation.z = current_pose['orientation'].z ik_pose.orientation.w = current_pose['orientation'].w joint_angles = self.ik_request(ik_pose) # servo up from current pose self._guarded_move_to_joint_position(joint_angles)
what is the useful of the current_pose = self._limb.endpoint_pose()
and ik_pose = Pose()
.
Thank you for your helping me!