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

Set Robot Base Pose

#1
Currently I am trying to set the pose of a robot base with reference to a reference frame. My current code sets the pose of the robot, but I would like the base of the robot to receive the x,y,z,a,b,c pose with reference to my reference frame. I have attemtped the getlink(0) function to call the robot base but receive the error "Exception: Invalid item provided: The item identifier provided is not valid or it does not exist."

from robolink import *

from robodk import *
import numpy as np
RDK = Robolink()


Origin=RDK.Item('SpiralMeca') #program origin
R1.setParent(Origin)

R1 = RDK.Item('Mecademic Meca500 R3',ITEM_TYPE_ROBOT)
RB1 = R1.getLink(0)  # get the base link

LED = RDK.Item('LED') #Reference frame

pose = Pose(10,0,0,0,0,0)
RB1.setPose(pose)
#2
So I found this thread that shows moving the base is possible only I am having trouble finding my base reference frame name. When I go to create a new base in modify robot I get 2 different robots. How do I find the name of my current robot base reference frame name?
#3
The robot's parent should be the base frame.

RB1 = R1.Parent()
print(RB1.Name())

Note that R1.getLink(ITEM_TYPE_FRAME) returns the active reference frame, not the base frame (the frame with a green overlay in the tree).
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.
  




Users browsing this thread:
1 Guest(s)