Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fit_smpl_motion.py work not well at arms singularity pose #107

Open
dbdxnuliba opened this issue Dec 12, 2024 · 0 comments
Open

fit_smpl_motion.py work not well at arms singularity pose #107

dbdxnuliba opened this issue Dec 12, 2024 · 0 comments

Comments

@dbdxnuliba
Copy link

dbdxnuliba commented Dec 12, 2024

@ZhengyiLuo Hello,When use retarget the current retargeting code I foud that fit_smpl_motion.py cannot handle the situation wherearms at singularity pose well. In this case, the jnt vel(rad/s) suddenly changes.
image
Can you optimize the code in fit_smpl_motion.py to handle situations where the joint speed suddenly increases in singular poses, such as when the joints are collinear? For example, when a 7-degree-of-freedom robotic arm is raised sideways, the joint speed suddenly increases, and the joint angles change significantly. I tried modifying the code, but it didn't have any effect.

I try to add jnt vel cost ,but it looks like not affect the arms behavior at singularity pose,

here is the reltated code where I add jnt vel cost in fit_smpl_motion.py

            dof_pos_new_diff = (dof_pos_new.data[:,1:,:,:] - dof_pos_new.data[:,:-1,:,:])
            print('dof_pos_new_diff:', dof_pos_new_diff)

            loss_vel = (dof_pos_new_diff/0.0333).norm(dim = -1).mean()
            loss_g = diff.norm(dim = -1).mean() + 0.01 * torch.mean(torch.square(dof_pos_new))
            loss = loss_g + 100 * loss_vel #add velocity loss
            print('loss_g:', loss_g)
            print('loss:', loss)
            optimizer.zero_grad()
            loss.backward()
            optimizer.step()

I use the dataset 0-DanceDB_20120807_CliodelaVara_Clio_Haniotikos_C3D_poses test the retarget
Could you please have a look at this question about how to optimize the fit motion at arms singularity pose to prevent jnt's vel suddenly increases

@dbdxnuliba dbdxnuliba changed the title python scripts/data_process/fit_smpl_motion.py fit_smpl_motion.py work not well at arms singularity pose Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant