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

How to change the "weight_priors" weight value in objective_master.rs? #14

Open
WangXingfang opened this issue Aug 1, 2024 · 1 comment

Comments

@WangXingfang
Copy link

WangXingfang commented Aug 1, 2024

When we run the example, we find that the rotation error of the end-effector is somewhat large, so we want to increase the weight of the end-effector rotation variable. But we don't know how to modify the .rs files, compile them and make them effective, it seems that they are already encapsulated as .so files.

Here's what we want to change in objective_master.rs:

        objectives.push(Box::new(MatchEEPosiDoF::new(i, 0)));
        weight_priors.push(50.0);
        objectives.push(Box::new(MatchEEPosiDoF::new(i, 1)));
        weight_priors.push(50.0);
        objectives.push(Box::new(MatchEEPosiDoF::new(i, 2)));
        weight_priors.push(50.0);
        objectives.push(Box::new(MatchEERotaDoF::new(i, 0)));
        ** \\ We want to change 10.0 to 30.0 or higher to improve the end effector rotation accuracy.**
        weight_priors.push(10.0);   
        objectives.push(Box::new(MatchEERotaDoF::new(i, 1)));
        weight_priors.push(10.0);
        objectives.push(Box::new(MatchEERotaDoF::new(i, 2)));
        weight_priors.push(10.0);
@yepw
Copy link
Collaborator

yepw commented Aug 1, 2024

Hi @WangXingfang , thank you for your interest in our tool. You are right that tweaking the weights can lead to smaller rotation errors. After changing the objective_master.rs, all you need to do is re-compile the rust code:

cd relaxed-ik-core
cargo build

Let me know if you have any further questions.

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

2 participants