Skip to content

Commit c27c8e1

Browse files
committed
Merge branch 'docking_server' into develop
2 parents b8e2a52 + eb2c8a7 commit c27c8e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+6336
-11
lines changed

Navigation2/nav2_controller/src/controller_server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ void ControllerServer::computeAndPublishVelocity()
533533
void ControllerServer::updateGlobalPath()
534534
{
535535
if (action_server_->is_preempt_requested()) {
536-
RCLCPP_INFO(get_logger(), "Passing new path to controller.");
536+
RCLCPP_DEBUG(get_logger(), "Passing new path to controller.");
537537
auto goal = action_server_->accept_pending_goal();
538538
std::string current_controller;
539539
if (findControllerId(goal->controller_id, current_controller)) {

custom_bts/custom_nav_thru_poses/behavior_trees/navigate_through_poses_w_controller_selector.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<RateController hz="1.0">
1111
<RecoveryNode number_of_retries="1" name="ComputePathThroughPoses">
1212
<ReactiveSequence>
13-
<RemovePassedGoals input_goals="{goals}" output_goals="{goals}" radius="0.01"/>
13+
<RemovePassedGoals input_goals="{goals}" output_goals="{goals}" radius="0.25"/>
1414
<ComputePathThroughPoses goals="{goals}" path="{path}" planner_id="GridBased"/>
1515
</ReactiveSequence>
1616
<ClearEntireCostmap name="ClearGlobalCostmap-Context" service_name="global_costmap/clear_entirely_global_costmap"/>

navigation2_run/launch/navigation_launch.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ def generate_launch_description():
4747
'behavior_server',
4848
'bt_navigator',
4949
'waypoint_follower',
50-
'velocity_smoother']
50+
'velocity_smoother',
51+
'docking_server']
5152

5253
# Map fully qualified names to relative ones so the node's namespace can be prepended.
5354
# In case of the transforms (tf), currently, there doesn't seem to be a better alternative
@@ -203,6 +204,16 @@ def generate_launch_description():
203204
parameters=[{'use_sim_time': use_sim_time},
204205
{'autostart': autostart},
205206
{'node_names': lifecycle_nodes}]),
207+
Node(
208+
package='opennav_docking',
209+
executable='opennav_docking',
210+
name='docking_server',
211+
output='screen',
212+
respawn=use_respawn,
213+
respawn_delay=2.0,
214+
parameters=[configured_params],
215+
arguments=['--ros-args', '--log-level', log_level],
216+
remappings=remappings)
206217
]
207218
)
208219

@@ -260,6 +271,12 @@ def generate_launch_description():
260271
parameters=[{'use_sim_time': use_sim_time,
261272
'autostart': autostart,
262273
'node_names': lifecycle_nodes}]),
274+
ComposableNode(
275+
package='opennav_docking',
276+
plugin='opennav_docking::DockingServer',
277+
name='docking_server',
278+
parameters=[configured_params],
279+
remappings=remappings)
263280
],
264281
)
265282

navigation2_run/params/nav2_params.yaml

Lines changed: 76 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ controller_server:
9090
progress_checker_plugin: "progress_checker"
9191
current_goal_checker: "percise_goal_checker"
9292
goal_checker_plugins: ["percise_goal_checker"]
93-
controller_plugins: ["FollowPath", "DockMission", "MPPI"]
93+
controller_plugins: ["FollowPath", "DockMission", "Graceful", "MPPI"]
9494

9595
# Progress checker parameters
9696
progress_checker:
@@ -128,6 +128,25 @@ controller_server:
128128
use_fixed_curvature_lookahead: false
129129
curvature_lookahead_dist: 0.25
130130

131+
Graceful:
132+
plugin: nav2_graceful_controller::GracefulController
133+
transform_tolerance: 0.1
134+
min_lookahead: 0.25
135+
max_lookahead: 1.0
136+
initial_rotation: true
137+
initial_rotation_threshold: 0.75
138+
prefer_final_rotation: true
139+
allow_backward: false
140+
k_phi: 2.0
141+
k_delta: 1.0
142+
beta: 0.4
143+
lambda: 2.0
144+
v_linear_min: 0.1
145+
v_linear_max: 0.5
146+
v_angular_max: 5.0
147+
v_angular_min_in_place: 0.25
148+
slowdown_radius: 1.5
149+
131150
MPPI:
132151
plugin: "nav2_mppi_controller::MPPIController"
133152
time_steps: 56
@@ -306,8 +325,8 @@ global_costmap:
306325
map_subscribe_transient_local: True
307326
inflation_layer:
308327
plugin: "nav2_costmap_2d::InflationLayer"
309-
cost_scaling_factor: 7.0
310-
inflation_radius: 0.1
328+
cost_scaling_factor: 5.0
329+
inflation_radius: 0.15
311330
rival_layer:
312331
plugin: "custom_path_costmap_plugin::RivalLayer"
313332
enabled: True
@@ -363,7 +382,6 @@ planner_server:
363382
smoother_server:
364383
ros__parameters:
365384
use_sim_time: False
366-
# smoother_plugins: [""]
367385
smoother_plugins: ["simple_smoother"]
368386
simple_smoother:
369387
plugin: "nav2_smoother::SimpleSmoother"
@@ -421,11 +439,62 @@ velocity_smoother:
421439
smoothing_frequency: 20.0
422440
scale_velocities: False
423441
feedback: "OPEN_LOOP"
424-
max_velocity: [0.5, 0.5, 0.75]
425-
min_velocity: [-0.5, -0.5, -0.75]
442+
max_velocity: [1.0, 1.0, 0.75]
443+
min_velocity: [-1.0, -1.0, -0.75]
426444
max_accel: [1.0, 1.0, 3.0]
427445
max_decel: [-1.0, -1.0, -3.0]
428446
odom_topic: "odom"
429447
odom_duration: 0.1
430448
deadband_velocity: [0.0, 0.0, 0.0]
431-
velocity_timeout: 1.0
449+
velocity_timeout: 0.1 # must be less than velocity_smoother_wait in docking_server
450+
451+
docking_server:
452+
ros__parameters:
453+
controller_frequency: 20.0
454+
initial_perception_timeout: 5.0
455+
wait_charge_timeout: 5.0
456+
dock_approach_timeout: 30.0
457+
max_retries: 3
458+
base_frame: "base_link"
459+
fixed_frame: "map"
460+
dock_backwards: false
461+
dock_prestaging_tolerance: 0.02
462+
velocity_smoother_wait: 0.12
463+
464+
# Types of docks
465+
dock_plugins: ['mission_dock']
466+
mission_dock:
467+
plugin: 'opennav_docking::SimpleChargingDock'
468+
docking_threshold: 0.01
469+
staging_x_offset: 0.35
470+
staging_y_offset: 0.0
471+
staging_yaw_offset: 0.0
472+
use_battery_status: false
473+
use_stall_detection: false
474+
475+
external_detection_timeout: 1.0
476+
external_detection_translation_x: 0.0
477+
external_detection_translation_y: 0.0
478+
external_detection_rotation_roll: 0.0
479+
external_detection_rotation_pitch: 0.0
480+
external_detection_rotation_yaw: 0.0
481+
filter_coef: 0.1
482+
483+
docks: ['home_dock', 'flex_dock1', 'flex_dock2']
484+
home_dock:
485+
type: 'mission_dock'
486+
frame: map
487+
pose: [0.0, 0.0, 0.0]
488+
flex_dock1:
489+
type: 'mission_dock'
490+
frame: map
491+
pose: [2.2, 1.4, 0.0]
492+
flex_dock2:
493+
type: 'mission_dock'
494+
frame: map
495+
pose: [1.5, 1.0, 0.0]
496+
497+
# dock_database: /my/path/to/dock_database.yaml
498+
499+
controller:
500+
max_linear_vel: 0.5

0 commit comments

Comments
 (0)