06-20-2022, 08:31 PM
Is there a way to grab the coordinates of each waypoint with respect to the part origin in your rdk station?
GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN |
06-20-2022, 08:31 PM
Is there a way to grab the coordinates of each waypoint with respect to the part origin in your rdk station?
06-21-2022, 12:01 PM
When opening the Options for an object in RoboDK, you can change the "position with respect to" and set it to the Station to get the absolute position.
With the Python API, take a look at Item.PoseWrt, i.e. target.PoseWrt(RDK.ActiveStation()) You might need to take the latest version from our GitHub:https://github.com/RoboDK/RoboDK-API/blo...k.py#L4310
Please read theForum Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
06-23-2022, 04:13 PM
Will this give the coordinates with respect to the robot origin? or the object origin?
06-23-2022, 06:17 PM
I'm trying to use the PoseWrt to function, but I keep getting an error saying "Attribute Error: 'Item' object has no attribute 'PoseWrt' ". I have attached a screenshot. If I use this function, will I be able to find the position of the robot (X,Y,Z) with respect to the origin of the part (step file)? That is what I am after.
06-23-2022, 06:35 PM
As stated above, this is fairly new, and you might need to manually update the RoboDK API in your install folder (C:/RoboDK/Python), wait that we bundle it with RoboDK in a future update or copy the code from the GitHub repository in your station.
Once that is done, you can get the position of any Item with respect to any Item. For instance, robot_item.getPoseWrt(obj_item) and vice versa.
Please read theForum Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
06-24-2022, 05:09 PM
So I updated the robolink python file in my C drive and I'm still getting the same errors. I tried copying the code into my station, but still didn't help although I wasn't really sure what you meant by that.
I've attached the python script since I believe this is where the issue may be coming from.
06-25-2022, 11:24 AM
I should clarify. You need to update everything in the Python Package module:https://github.com/RoboDK/RoboDK-API/tre...n%2Frobodk
The PoseWrt is actually defined in robolinkutils.py
Please read theForum Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
06-27-2022, 06:19 PM
I updated all of the corresponding files in my robodk folder in the C drive, and also didn't have the robolinkutils.py file so I added it in, but still no luck. I'm continuing to get the same error message.
I did find a script in the RoboDK Python API that calculates the pose of any object wrt to any reference frame in RoboDK. Is there any way to modify this to give me the pose wrt to a reference frame of every waypoint in a path? I attached a screenshot of the script I found. |
Users browsing this thread: |
1 Guest(s) |