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

Cartesian distance cost function #3

Open
wants to merge 4 commits into
base: melodic-devel
Choose a base branch
from

Conversation

MichalDobis
Copy link
Collaborator

No description provided.

{
ROS_ERROR("Seed trajectory index %lu does not have %lu constraints (has %lu instead).", i, num_joints, n);
error_code.val = error_code.INVALID_GOAL_CONSTRAINTS;
initial_trajectory_.clear();

Choose a reason for hiding this comment

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

I don't like how initial_trajectory_ member variable is shared between 2 functions. It look like it can not be avoided because of virtual interface but i would recommend you to use local variable and assign / mode to class only and only when it is valid. Also clear on the beginning of setMotionPlanRequest would be appropriate (make it as simple as ossible).

stomp_plugins/src/cost_functions/cartesian_distance.cpp Outdated Show resolved Hide resolved
stomp_plugins/src/cost_functions/cartesian_distance.cpp Outdated Show resolved Hide resolved
stomp_plugins/src/cost_functions/cartesian_distance.cpp Outdated Show resolved Hide resolved
stomp_plugins/src/cost_functions/cartesian_distance.cpp Outdated Show resolved Hide resolved
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