Get a pose According to an user frame- Printable Version +- RoboDK Forum (//m.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//m.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//m.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Get a pose According to an user frame (/Thread-Get-a-pose-According-to-an-user-frame) |
Get a pose According to an user frame-David Akiba90-07-30-2020 Hi everyone , i'm trying to get the actual pose of my robot according to a frame selected by the user. I need this , because i'm comparing the actual pose with a target which has been defined according to an user frame. My problem is , when i got the actual pose of my robot , it's got it according to the robot base . (Ps : everything is made as online programming ) 1: The user pick a frame , and i use SetPoseFrame() for changing the reference frame ( doesn't seem to work)
Code:
# user picck a frame
2: I ask for the joint and i solve the forward kinematic , then i have the actual pose of my robot and i find the xyz coordinate
Code:
##----------------robot position --------------##
Code:
##--------------------collision target-----------##
when i compare by example the both x coordinate , for the target x cordinate i got it according to the frame choosen by the user concerning the actual x position it's according to the robot base. I would like to know if there is an elegant way to get the robot position according to an user frame ? I finally figured it ou , i used this instead :
Code:
# user picck a frame
Code:
robot_joints = ROBOT.Joints()
RE: Get a pose According to an user frame-Albert-08-03-2020 I don't think the solution you provided is correct. You should pre/post multiply poses to properly calculate a pose with respect to a reference frame and a specific tool. If you have a tool and a reference and you want to calculate the pose of given robot joints you should do this:
Code:
robot = RDK.ItemUserPick("Select a robot", ITEM_TYPE_ROBOT)
More information here to better understand the relationship: //m.sinclairbody.com/doc/en/Interface.html#RobotPanel |