-
Notifications
You must be signed in to change notification settings - Fork 363
Add ControllerInterfaceParams
to initialize the Controllers
#2390
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
base: master
Are you sure you want to change the base?
Add ControllerInterfaceParams
to initialize the Controllers
#2390
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2390 +/- ##
==========================================
+ Coverage 88.90% 88.92% +0.02%
==========================================
Files 148 149 +1
Lines 16950 16994 +44
Branches 1448 1449 +1
==========================================
+ Hits 15069 15112 +43
Misses 1318 1318
- Partials 563 564 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only a hint in the release notes is missing. can we remove (deprecate?) the old init method? This is only internal API, right?
@@ -43,16 +43,29 @@ return_type ControllerInterfaceBase::init( | |||
const std::string & controller_name, const std::string & urdf, unsigned int cm_update_rate, | |||
const std::string & node_namespace, const rclcpp::NodeOptions & node_options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could mark this function as deprecated already
joint_limits::JointLimits joint_limits; | ||
joint_limits.has_velocity_limits = true; | ||
joint_limits.max_velocity = 1.0; | ||
params.hard_joint_limits["joint1"] = joint_limits; | ||
joint_limits::SoftJointLimits soft_joint_limits; | ||
soft_joint_limits.min_position = -1.0; | ||
soft_joint_limits.max_position = 1.0; | ||
params.soft_joint_limits["joint1"] = soft_joint_limits; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you mind adding a new constructor to joint limits that allow a one-line initialization please? ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can
This PR adds the ControllerInterfaceParams structure and uses it to pass various args to the ControllerInterface class. Right now, doing so we are able to pass the joint limits to the controllers