03-26-2023, 04:17 PM
(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:
More information here:Code:robot = RDK.Item("My robot", ITEM_TYPE_ROBOT)
prog = RDK.AddProgram("ProgramTest", robot)
for joint in alljoints:
prog.MoveJ(jointvalues)
//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()