Skip to content

Commit

Permalink
Adding Nav2 / Open Navigation Docking (ros-navigation#4406)
Browse files Browse the repository at this point in the history
* adding docking temp build test

* add missing exmport

* fix test

* adding server to bringup

* add docking server to Nav2 package; migrate to msgs package

* migrate msgs

* in line versions with rest of stack

* removing docking msgs from main server cmake

* fix bug

* linting and logging

* bump cache

* fix tests with rclpy API action spinning

* add full metapackage repos
  • Loading branch information
SteveMacenski authored Jun 11, 2024
1 parent a5587fc commit fa68b4d
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
19 changes: 19 additions & 0 deletions nav2_bringup/launch/navigation_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def generate_launch_description():
'collision_monitor',
'bt_navigator',
'waypoint_follower',
'docking_server',
]

# Map fully qualified names to relative ones so the node's namespace can be prepended.
Expand Down Expand Up @@ -212,6 +213,17 @@ def generate_launch_description():
arguments=['--ros-args', '--log-level', log_level],
remappings=remappings,
),
Node(
package='opennav_docking',
executable='opennav_docking',
name='docking_server',
output='screen',
respawn=use_respawn,
respawn_delay=2.0,
parameters=[configured_params],
arguments=['--ros-args', '--log-level', log_level],
remappings=remappings,
),
Node(
package='nav2_lifecycle_manager',
executable='lifecycle_manager',
Expand Down Expand Up @@ -287,6 +299,13 @@ def generate_launch_description():
parameters=[configured_params],
remappings=remappings,
),
ComposableNode(
package='opennav_docking',
plugin='opennav_docking::DockingServer',
name='docking_server',
parameters=[configured_params],
remappings=remappings,
),
ComposableNode(
package='nav2_lifecycle_manager',
plugin='nav2_lifecycle_manager::LifecycleManager',
Expand Down
45 changes: 45 additions & 0 deletions nav2_bringup/params/nav2_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,3 +373,48 @@ collision_monitor:
min_height: 0.15
max_height: 2.0
enabled: True

docking_server:
ros__parameters:
controller_frequency: 50.0
initial_perception_timeout: 5.0
wait_charge_timeout: 5.0
dock_approach_timeout: 30.0
undock_linear_tolerance: 0.05
undock_angular_tolerance: 0.1
max_retries: 3
base_frame: "base_link"
fixed_frame: "odom"
dock_backwards: false
dock_prestaging_tolerance: 0.5

# Types of docks
dock_plugins: ['simple_charging_dock']
simple_charging_dock:
plugin: 'opennav_docking::SimpleChargingDock'
docking_threshold: 0.05
staging_x_offset: -0.7
use_external_detection_pose: true
use_battery_status: false # true
use_stall_detection: false # true

external_detection_timeout: 1.0
external_detection_translation_x: -0.18
external_detection_translation_y: 0.0
external_detection_rotation_roll: -1.57
external_detection_rotation_pitch: -1.57
external_detection_rotation_yaw: 0.0
filter_coef: 0.1

# Dock instances
docks: ['home_dock'] # Input your docks here
home_dock:
type: 'simple_charging_dock'
frame: map
pose: [0.0, 0.0, 0.0]

controller:
k_phi: 3.0
k_delta: 2.0
v_linear_min: 0.15
v_linear_max: 0.15

0 comments on commit fa68b4d

Please sign in to comment.