Skip to content

Chain.forward_kinematics() got an unexpected keyword argument 'end_only' #11

@mrsbCN

Description

@mrsbCN

Thanks for you excellent repository. I am using it for dexterous hand, which could not created with SerialChain. So, I use pk.build_chain_from_urdf, but got Chain.forward_kinematics() got an unexpected keyword argument 'end_only'.
The problem occur in model_to_sdf.py at line 99 with tf = self.chain.forward_kinematics(joint_config, end_only=False). But the forward_kinematics of Chain is defined as forward_kinematics(self, th, frame_indices: Optional = None).
I simply add a conditional statements as below:

        if isinstance(self.chain, pk.Chain):
            tf = self.chain.forward_kinematics(joint_config)
        else:
            tf = self.chain.forward_kinematics(joint_config, end_only=False)

I wonder if this modification is in line with your ideas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions