-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nav2 now goes correctly to goal (at least in simulation)
- Loading branch information
Showing
9 changed files
with
74 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import os | ||
import yaml | ||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
from launch.actions import ExecuteProcess | ||
from launch.substitutions import LaunchConfiguration | ||
import launch_ros.actions | ||
|
||
|
||
def generate_launch_description(): | ||
|
||
ld = LaunchDescription() | ||
|
||
# map file | ||
map_file_path = os.path.join( | ||
get_package_share_directory('ezbot_robot'), | ||
'maps', | ||
'testMap', | ||
'testMap.yaml' | ||
) | ||
|
||
map_server_cmd = Node( | ||
package='nav2_map_server', | ||
executable='map_server', | ||
output='screen', | ||
namespace='map', | ||
parameters=[{'yaml_filename': map_file_path}, | ||
{'frame_id': 'map'}], | ||
remappings=[('/map/map', '/map')] | ||
) | ||
|
||
|
||
lifecycle_nodes = ['map_server'] | ||
autostart = True | ||
|
||
start_lifecycle_manager_cmd = launch_ros.actions.Node( | ||
package='nav2_lifecycle_manager', | ||
executable='lifecycle_manager', | ||
name='lifecycle_manager', | ||
namespace='map', | ||
output='screen', | ||
emulate_tty=True, # https://github.com/ros2/launch/issues/188 | ||
parameters=[{'autostart': autostart}, | ||
{'node_names': lifecycle_nodes}]) | ||
|
||
|
||
ld.add_action(map_server_cmd) | ||
ld.add_action(start_lifecycle_manager_cmd) | ||
|
||
return ld |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
yaml_filename: "yaml_filename" | ||
image: blackandwhite.jpg | ||
resolution: 0.0100 | ||
origin: [1.0, 2.0, 0.0] | ||
negate: 0 | ||
occupied_thresh: 0.65 | ||
free_thresh: 0.196 |