Skip to content

Added Boomerang code #35

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Added Boomerang code #35

wants to merge 16 commits into from

Conversation

Cavaire3D
Copy link

This introduces a new format that generates boomerang code for xVecLib.

Screenshot_20240509_165921
Code exported:
robo.set(59, -34);
imu.set_rotation(270);
ou.printCoords();
ou.moveToBoom( -59.924, -50.746, 347.5795700547434, 0.0672986800982153,5);
ou.moveToBoom( -45.96, 36, 90, -0.12368406072104425,5);

@Jerrylum
Copy link
Owner

Is the library open source? Can I have the link of the repository?

@Cavaire3D
Copy link
Author

Repository is https://codeberg.org/xVec/xVecLib
Documentation (Work in Progress) is https://xvec.codeberg.page

Copy link
Owner

@Jerrylum Jerrylum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR.

Since I modified the internal API for formats after you submitted your PR, you need to refactor your format. It doesn't happen very often.

Please tell me what your format is generating. I see it generates a sequence of moveToBoom function calls with five parameters. I would like to learn more about the function as well as the algorithm that you are using. Is it a modified Boomerang algorithm? Explanations with figures are welcome.

Remove console.log function calls, use Logger when necessary.

@Cavaire3D
Copy link
Author

This function is a boomerang controller implementation created using Boomerang controller.
It is one of many methods provided by my library, all of which require a tuned PID controller and odometry.

The format calculates the lead by using the control that has the most impact to the segment (the one that is the furthest away) as the carrot point. It then calculates the lead by rearranging the equation.

The documentation for this method is unfinished, and will be posted https://xvec.codeberg.page/class_x_y_zv_lib_1_1_p_i_d_ab96f6a3edb6bccf97d240b3154b0110b.html#ab96f6a3edb6bccf97d240b3154b0110b when finished.

I will update the code now to use the requested logger.

@Cavaire3D Cavaire3D requested a review from Jerrylum May 12, 2024 20:30
Copy link
Owner

@Jerrylum Jerrylum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The next step is writing test cases

Copy link
Owner

@Jerrylum Jerrylum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you started working on the test cases. Please keep going, and address the following change requests:

Copy link
Owner

@Jerrylum Jerrylum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you still working on the PR?

@Cavaire3D
Copy link
Author

I am still working on this PR, but testing has revealed a few major bugs that I am currently working out. I will push changes once I fix those bugs.

@Cavaire3D Cavaire3D requested a review from Jerrylum October 20, 2024 23:33
Copy link
Owner

@Jerrylum Jerrylum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image You modified the file permission of multiple files, please change them back before I can continue to review your pull request. Thank you.

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

Successfully merging this pull request may close these issues.

2 participants