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

[PI - 260] Implement spline interpolation #34

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Alffaza
Copy link
Member

@Alffaza Alffaza commented Feb 12, 2023

Jira Link: https://ichiro-its.atlassian.net/browse/PI-260

Description

Implemented spline interpolation for motion for smoother motions, can toggle whether to use spline or not from the actions json.

Type of Change

  • Bugfix
  • Enhancement
  • New feature
  • Breaking change (fix or feature that would cause the existing functionality to not work as expected)

How Has This Been Tested?

  • New unit tests added.
  • Manual tested.

Checklist:

  • Using Branch Name Convention
    • feature/JIRA-ID-SHORT-DESCRIPTION if has a JIRA ticket
    • enhancement/SHORT-DESCRIPTION if has/has no JIRA ticket and contain enhancement
    • hotfix/SHORT-DESCRIPTION if the change doesn't need to be tested (urgent)
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have made the documentation for the corresponding changes.

@@ -35,20 +36,24 @@ class JointProcess
explicit JointProcess(uint8_t joint_id, float position = 0.0);

void set_target_position(float target_position, float speed = 1.0);
void set_spline(keisan::Spline spline);
Copy link
Member

Choose a reason for hiding this comment

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

i suggest to pass by const ref instead (const keisan::Spline&).

uint8_t joint_id = joint.get_id();

if (joint_splines.find(joint_id) != joint_splines.end()) {
joint_splines[joint_id] = new keisan::SmoothSpline();
Copy link
Member

Choose a reason for hiding this comment

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

please use std::shared_ptr instead, it's more safe. And you don't need to delete this later.

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