Closed kosmastsk closed 3 years ago
Many thanks. I just merged this.
Dear kosmastsk,
Why did you not move more other parameters to dynamic reconfigure, such as max_vel_x, max_vel_x_backward
?
@Huyhust13 in my opinion, these kind of parameters usually remain constant for a specific robot. That's why there would be no reason to dynamically change their maximum velocity etc. Once you tune these values, you do not really need to change them dynamically
@kosmastsk but in some of cases, We need to change robot maximum speed to be safe when robot goes into some certain areas. I'm trying to do this, can you give me advises? Thank you!
@Huyhust13 I can see that these parameters are defined for example in _"mpc_local_planner/mpc_local_planner_examples/cfg/carlike/mpc_local_plannerparams.yaml" . You have to create a .cfg file, containing the parameters you want (max_velx etc) as in "mpc_local_planner/mpc_localplanner/cfg/" directory, make the necessary changes in CMakeLists.txt and create the dynamic reconfigure server in the ROS node that this parameter is used.
@kosmastsk Yes, I did that, however when I made changes in dynamic reconfigure it didn't work. Because I saw that it was loaded into the configuration at the planner initialization.
@Huyhust13 in the dynamic reconfigure callback function, when you receive the new values you should call the configureOcp function to update these values in the planner. After that, I am not sure if something else should also be called to update the parameter values in the planner
Thank you @kosmastsk, I'll try that
@kosmastsk Dear, I did following your advise. But It did not update velocity.
@kosmastsk It worked fine. Thank you so much!
@Huyhust13 Dear, I am facing the same issue in mpc_local_planner, can you share exactly how you solved it? I would appreciate if you can share the relevant code.
Add support for dynamic reconfigure of several parameters, as mentioned in #16 Specifically, these parameters are:
xy_goal_tolerance
,yaw_goal_tolerance
,global_plan_overwrite_orientation
,global_plan_prune_distance
,max_global_plan_lookahead_dist
,global_plan_viapoint_sep
,is_footprint_dynamic
,include_costmap_obstacles
,costmap_obstacles_behind_robot_dist
,collision_check_min_resolution_angular
andcollision_check_no_poses
.The implementation is based on the similar one from teb local planner.
Feedback is always welcome!