Parallelize fk for build_chain_from_urdf chain
prajwalthakur opened this issue · comments
Prajwal Thakur commented
This function has not been modified for running N batch :
so if I run this script , it will give me error;
`
import torch
import pytorch_kinematics as pk
d = "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.float64
chain = pk.build_chain_from_urdf(open("kuka_iiwa.urdf").read())
chain = chain.to(dtype=dtype, device=d)
N = 1000
th_batch = torch.rand(N, len(chain.get_joint_parameter_names()), dtype=dtype, device=d)
tg_batch = chain.forward_kinematics(th_batch)
`
Johnson Zhong commented
Hi, are you still experiencing this issue? I just tested it and didn't have any problems so I'm going to close the issue for now.