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

Questions on post-process and how to import joint coordinates

#1
1. After simulation, can RoboDK export the motion curve of each world coordinate value and joint value?
like the figure I showed...

2. If I already have joint coordinates of each target point, could I import them into RoboDK to drive the robot for simulation? so that I can choose MOVL for real robot motion...


Attached Files Image(s)

#2
Yes, this is possible. It should not be complicated to do so using the API.

The following scripts will help you manipulate data to read and write CSV files from your simulation in RoboDK:
ProgramSlider.py
ImportCSV_XYZWPR.py

You can find these scripts here:
C:/RoboDK/Library/Scripts/
#3
(03-24-2023, 09:43 AM)Albert Wrote:Yes, this is possible. It should not be complicated to do so using the API.

The following scripts will help you manipulate data to read and write CSV files from your simulation in RoboDK:
ProgramSlider.py
ImportCSV_XYZWPR.py

You can find these scripts here:
C:/RoboDK/Library/Scripts/

OK,thanks a lot.
By the way,i'd like to ask again about Q2...
If I only have the joint value,how should I arrange them in CSV file? is it possible for Synchronize external axes?
I want to load the joint data from a CSV file into the RoboDK and run the simulation...not get data from simulation...


Attached Files Thumbnail(s)

#4
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
#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: 56)
#6
SolveFK calculates the position of the robot flange with respect to the robot base (not the active tool and reference frame).

You should therefore calculate the target pose using this formula (line 40 of your example):

Code:
pose = ROBOT.PoseFrame() * ROBOT.SolveFK(joints) * ROBOT.PoseTool()




Users browsing this thread:
1 Guest(s)