pytorch_volumetric icon indicating copy to clipboard operation
pytorch_volumetric copied to clipboard

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

Open mrsbCN opened this issue 6 months ago • 1 comments

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.

mrsbCN avatar Jun 16 '25 01:06 mrsbCN

Hi I think there was a refactor at some point where now there is an inconsistency in input parameters (especially for serial chain vs chain where end effector doesn't exist). What you have posted makes sense

LemonPi avatar Sep 14 '25 04:09 LemonPi