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

Refactor MoveIt Simple Controller Manager to use generate param library #2580

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Abishalini
Copy link
Contributor

@Abishalini Abishalini commented Dec 6, 2023

Description

Also resolves #2390

generate_parameter_library currently doesn't support nested maps in the YAML - PickNikRobotics/generate_parameter_library#151
So I haven't implemented the goal_tolerance and path_tolerance parameters in this PR. But we can now set the goal_time_tolerance in the YAML file for follow_joint_trajectory_controller.

I will add a TODO/open another issue to implement the nested map parameters (unless I figure out a way to avoid nested maps)

Comment on lines 27 to 35
make_default: {
type: bool,
default_value: false,
description: "This param was originally named default. Can't use default with generate_param_lib as default is a C++ keyword. Marking a controller as
default makes MoveIt prefer this controller when multiple options are available.",
validation: {
not_empty<>: []
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also had to rename this parameter. Originally, it was called default but default is a C++ keyword and won't work with how generate param library initializes variables to store the parameter values

/home/abishalini/ws_moveit2/build/moveit_simple_controller_manager/moveit_simple_controller_manager_parameters/include/moveit_simple_controller_manager_parameters.hpp:73:18: error: expected unqualified-id before ‘default’
   73 |             bool default = false;
      |                  ^~~~~~~

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to update any config files in the moveit_resources repos or studio?

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.78%. Comparing base (d962501) to head (edaaac1).
Report is 34 commits behind head on main.

❗ Current head edaaac1 differs from pull request most recent head 0192336. Consider uploading reports for the commit 0192336 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2580      +/-   ##
==========================================
+ Coverage   50.74%   50.78%   +0.04%     
==========================================
  Files         392      388       -4     
  Lines       32553    32358     -195     
==========================================
- Hits        16517    16430      -87     
+ Misses      16036    15928     -108     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@sjahr sjahr left a comment

Choose a reason for hiding this comment

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

Nice thanks! Just a couple of comments and then it is ready to be merged

@@ -63,6 +63,11 @@ class FollowJointTrajectoryControllerHandle

// TODO(JafarAbdi): Revise parameter lookup
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this comment can be removed or updated

@@ -97,6 +98,19 @@ bool FollowJointTrajectoryControllerHandle::sendTrajectory(const moveit_msgs::ms
return true;
}

void FollowJointTrajectoryControllerHandle::setPathTolerance(double /*path_tolerance*/)
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's print a warning that they're not doing anything at the moment. Why do we need them in the first place?

{
goal_template_.goal_time_tolerance = rclcpp::Duration::from_seconds(goal_time_tolerance);
}

// TODO(JafarAbdi): Revise parameter lookup
// void FollowJointTrajectoryControllerHandle::configure(XmlRpc::XmlRpcValue& config)
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove?

default_value: 0.0,
description: "Parameter to be set if using FollowJointTrajectory"
}
# __map_joints:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these ones commented out?

@Abishalini Abishalini force-pushed the pr-moveit-simple-controller-manager-parameters branch from 2ba1143 to edaaac1 Compare December 7, 2023 23:50
Copy link

mergify bot commented Dec 13, 2023

This pull request is in conflict. Could you fix it @Abishalini?

@Abishalini Abishalini marked this pull request as draft December 18, 2023 06:30
Copy link

github-actions bot commented Feb 1, 2024

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

@github-actions github-actions bot added the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Feb 1, 2024
@TomCC7
Copy link

TomCC7 commented Mar 6, 2024

Seems like this PR resolves the issue of nested map parameters

@github-actions github-actions bot removed the stale Inactive issues and PRs are marked as stale and may be closed automatically. label Mar 6, 2024
@henningkayser
Copy link
Member

@Abishalini do you think you could complete this to get it merged?

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.

Q: How to configure the goal_time_tolerance?
4 participants