Sam
Sam

Reputation: 537

How to get x,y,z position of target object?

I want to grab an object shown to NAO by hands after performing proper arms movement. for that I first start by catching the position of the target position using the following code:

tracker_service= session.service("ALTracker")
xyz_pos = tracker_service.getTargetPosition(motion.FRAME_TORSO)

The xyz_pos seems to erreneous in the sense that the call to the movement code is not executed due to 'infeasable movement' warning where some components (x,y or z) are negative while they all should positive given the position of the target object I choose. I came to conclude that the value of xyz_pos are not correct or at least not accurate. Any way to go around this problem and return the right value for the position of the target object?

Upvotes: 0

Views: 26

Answers (0)

Related Questions