pykin.models package
Submodules
pykin.models.robot_model module
- class pykin.models.robot_model.RobotModel[source]
Bases:
object
Base class of robot model from urdf file When initialized, loads links and joints of robot.
- property dof
Robot’s dof
- property joints
Returns: OrderedDict: all joints
- property links
Returns: OrderedDict: all links
- property num_actuated_joints
Number of actuated(revolute or prismatic) joints
- property num_fixed_joints
Number of fixed joints
- property num_joints
Number of joints
- property num_links
Number of links
pykin.models.urdf_model module
- class pykin.models.urdf_model.URDFModel(fname)[source]
Bases:
pykin.models.robot_model.RobotModel
Initializes a urdf model, as defined by a single corresponding robot URDF
- Parameters
fname (str) – path to the urdf file.
- property dof
Returns: int: robot’s dof
- find_frame(frame_name)[source]
- Parameters
frame_name (str) – frame’s name
- Returns
frame with child frames
- Return type
- find_joint(joint_name)[source]
- Parameters
joint_name (str) – joint’s name
- Returns
desired robot’s joint
- Return type
- find_link(link_name)[source]
- Parameters
link_name (str) – link’s name
- Returns
desired robot’s link
- Return type
- static generate_desired_frame_recursive(base_frame, eef_name)[source]
Return frames from base_frame to eef_frame you want to find
- Parameters
base_frame (list) – reference frame
eef_name (str) – end effector name
- Returns
Append frame until child link name is eef name
- Return type
list
- get_actuated_joint_names(desired_frames=None)[source]
Returns actuated(revolute, prismatic) joint names
- Parameters
desired_frames (list) – If is not empty, will get desired actuated joint names
- Returns
actuated joint names
- Return type
list
- get_revolute_joint_names(desired_frames=None)[source]
Returns revolute joint names
- Parameters
desired_frames (list) – If is not empty, will get desired actuated joint names
- Returns
revolute joint names
- Return type
list
- property num_actuated_joints
Returns: int: number of actuated joints
- property num_fixed_joints
Returns: int: number of fixed joints
- property num_joints
Returns: int: number of joints
- property num_links
Returns: int: number of links