Questions on post-process and how to import joint coordinates- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) + - - -论坛:通用RoboDK问题(//www.sinclairbody.com/forum/Forum-General-questions-about-RoboDK) +--- Thread: Questions on post-process and how to import joint coordinates (/Thread-Questions-on-post-process-and-how-to-import-joint-coordinates) |
Questions on post-process and how to import joint coordinates-Steve Zhang-03-23-2023 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... RE: Questions on post-process and how to import joint coordinates-Albert-03-24-2023 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/ RE: Questions on post-process and how to import joint coordinates-Steve Zhang-03-24-2023 (03-24-2023, 09:43 AM)Albert Wrote:Yes, this is possible. It should not be complicated to do so using the API. 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... RE: Questions on post-process and how to import joint coordinates-Albert-03-24-2023 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)
//www.sinclairbody.com/doc/en/PythonAPI/robodk.html#robodk.robolink.Robolink.AddProgram RE: Questions on post-process and how to import joint coordinates-Steve Zhang-03-26-2023 (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. 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() RE: Questions on post-process and how to import joint coordinates-Albert-03-29-2023 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()
|