GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN- Printable Version +- RoboDK Forum (//m.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//m.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: General questions about RoboDK (//m.sinclairbody.com/forum/Forum-General-questions-about-RoboDK) +--- Thread: GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN (/ Thread-GRABBING-COORDINATES-OF-WAYPOINTS-WRT-PART-ORIGIN) |
GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN-audreyv-06-20-2022 Is there a way to grab the coordinates of each waypoint with respect to the part origin in your rdk station? RE: GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN-Sam-06-21-2022 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/blob/master/Python/robodk/robolink.py#L4310 RE: GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN-audreyv-06-23-2022 Will this give the coordinates with respect to the robot origin? or the object origin? RE: GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN-audreyv-06-23-2022 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. RE: GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN-Sam-06-23-2022 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. RE: GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN-audreyv-06-24-2022 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. RE: GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN-Sam-06-25-2022 I should clarify. You need to update everything in the Python Package module:https://github.com/RoboDK/RoboDK-API/tree/master/Python%2Frobodk The PoseWrt is actually defined in robolinkutils.py RE: GRABBING COORDINATES OF WAYPOINTS WRT. PART ORIGIN-audreyv-06-27-2022 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. |