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

Questions on post-process and how to import joint coordinates

#5
(03-24-2023, 06:35 PM)Albert Wrote:Yes, this is possible. You can synchronize your axes in RoboDK. Then, you can call MoveJ or MoveL to a robot or a program.

Example:
Code:
robot = RDK.Item("My robot", ITEM_TYPE_ROBOT)
prog = RDK.AddProgram("ProgramTest", robot)
for joint in alljoints:
prog.MoveJ(jointvalues)
More information here:
//www.sinclairbody.com/doc/en/PythonAPI/robo...AddProgram

Hi,Albert
I am tring to use a python code convert joint value to space coordinates value(taking robot reference coordinates and current tool)...
But my code keeps getting an error on the last conversion syntax.I checked RoboDK API souce,but no relevant defined syntax was found. Is this syntax updated? Or my code is wrong?
Please have a look and give me a hand.THANKS

# Convert joint data to cartesian coordinates and print the results
defjoints_to_cartesian(joints):
pose = ROBOT.SolveFK(joints)
pos,rvec = Pose_2_TxyzRxyz(pose)
orient = tr2rpy(rvec)
print("Joint coordinates: ",joints)
print("Cartesian coordinates: ",[pos[0],pos[1],pos[2]])
print("Orientation (in degrees): ",[orient[0]*180/pi,orient[1]*180/pi,orient[2]*180/pi])
print()


Attached Files
.py XYZABC_convert.py(Size: 1.5 KB / Downloads: 60)


Messages In This Thread
RE: Questions on post-process and how to import joint coordinates - bySteve Zhang- 03-26-2023, 04:17 PM



Users browsing this thread:
1 Guest(s)