Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Create target from a txt file

#4
(12-03-2019, 07:31 PM)Jeremy Wrote:Hi there,

This piece of Python code should help you create your target:

Code:
# Name of the reference frame to be use
帧= RDK。项目(“框架名称”)

# Create new target at [0,0,0] (XYZ) from reference frame
Target = RDK.AddTarget('Target name ' + str(target_number), frame)

# Offset the new target position
Target.setPose(Offset(eye(), pos_X, pos_Y, pos_Z, rot_X, rot_Y, rot_Z))

Remember that you also need the orientation of the target.
Simply using [X,Y,Z] is a point, not a target.

Hope it helps.
Jeremy

Hi all,

the code almost works, but in my case the values for rot_X to rot_Z in the roboDK target differs from the python printed values. does anybody know why this happens?





Best regards,
bender


Messages In This Thread
Create target from a txt file - by95kvdko- 12-03-2019, 04:30 PM
RE: Create target from txt - byJeremy- 12-03-2019, 07:31 PM
RE: Create target from txt - by95kvdko- 12-04-2019, 12:33 PM
RE: Create target from txt - bybender- 06-02-2021, 01:09 PM
RE: Create target from txt - byVineet- 06-02-2021, 01:25 PM
RE: Create target from txt - bybender- 06-10-2021, 08:31 AM



Users browsing this thread:
1 Guest(s)