-
Notifications
You must be signed in to change notification settings - Fork 938
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
PlanningComponent: Load plan_request_params and use it when calling p… #2033
Conversation
…lan with no argument
moveit_ros/planning_interface/moveit_cpp/include/moveit/moveit_cpp/planning_component.h
Show resolved
Hide resolved
moveit_ros/planning_interface/moveit_cpp/include/moveit/moveit_cpp/planning_component.h
Outdated
Show resolved
Hide resolved
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.
Looks good to me!
moveit_ros/planning_interface/moveit_cpp/include/moveit/moveit_cpp/planning_component.h
Outdated
Show resolved
Hide resolved
nh.param(ns + "planning_attempts", planning_time, 5.0); | ||
nh.param(ns + "max_velocity_scaling_factor", max_velocity_scaling_factor, 1.0); | ||
nh.param(ns + "max_acceleration_scaling_factor", max_acceleration_scaling_factor, 1.0); | ||
} |
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.
What about error checking in this function? The param
method will return false on failure but there is no checking for that here. The default value is then utilized but wouldn't it be better to inform user that the parameter values they set are not being used? For example, would it be possible to typo the max_velocity_scaling_factor
, default to 1.0 and have the arm move really fast?
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.
I don't think error checking is required because of the default values. You could say that overriding these values is the optional behavior, so I don't think we need extensive user infos here. Sanity checks and warnings are issued by the planning pipeline in case something is wrong. In general, moveit_cpp is currently not meant to provide a fool-proof user interface, but I would agree that we could add more debugging output about configuration and checks.
Codecov Report
@@ Coverage Diff @@
## master #2033 +/- ##
==========================================
+ Coverage 54.09% 57.38% +3.28%
==========================================
Files 319 328 +9
Lines 24997 25666 +669
==========================================
+ Hits 13523 14728 +1205
+ Misses 11474 10938 -536
Continue to review full report at Codecov.
|
Load plan_request_params and use them when calling plan(void).
Load plan_request_params and use them when calling plan(void). (cherry picked from commit 3f3ef1f)
Load plan_request_params and use them when calling plan(void). (cherry picked from commit 3f3ef1f)
This PR do the following:
1- Load the
plan_request_params
parameters and use them as default when callingPlanningComponent::plan()
if a parameter is not loaded it uses the previous default value2- Constructs
MoveItCpp
's node_handle_ member variable with the input nh3- It uses delegating constructor when no
MoveItCpp
object is passed toPlanningComponent
Checklist