Skip to content
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

fix nav2 params and launch file to publish Local and global costmaps in multi robots example #2471

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nav2_bringup/bringup/launch/multi_tb3_simulation_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def generate_launch_description():

# Start Gazebo with plugin providing the robot spawing service
start_gazebo_cmd = ExecuteProcess(
cmd=[simulator, '--verbose', '-s', 'libgazebo_ros_factory.so', world],
cmd=[simulator, '--verbose', '-s', 'libgazebo_ros_init.so',
'-s', 'libgazebo_ros_factory.so', world],
output='screen')

# Define commands for spawing the robots into Gazebo
Expand Down
2 changes: 1 addition & 1 deletion nav2_bringup/bringup/launch/tb3_simulation_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def generate_launch_description():
# Specify the actions
start_gazebo_server_cmd = ExecuteProcess(
condition=IfCondition(use_simulator),
cmd=['gzserver', '-s', 'libgazebo_ros_init.so', world],
cmd=['gzserver', '-s', 'libgazebo_ros_init.so', '-s', 'libgazebo_ros_factory.so', world],
cwd=[launch_dir], output='screen')

start_gazebo_client_cmd = ExecuteProcess(
Expand Down
4 changes: 4 additions & 0 deletions nav2_bringup/bringup/params/nav2_multirobot_params_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ bt_navigator:
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
# nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
# They can be set here or via a RewrittenYaml remap from a parent launch file to Nav2.
# if enable_groot_monitoring is set to True, ports need to be different for each robot !!
enable_groot_monitoring: False
groot_zmq_publisher_port: 1666
groot_zmq_server_port: 1667
plugin_lib_names:
- nav2_compute_path_to_pose_action_bt_node
- nav2_compute_path_through_poses_action_bt_node
Expand Down
4 changes: 4 additions & 0 deletions nav2_bringup/bringup/params/nav2_multirobot_params_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ bt_navigator:
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
# nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
# They can be set here or via a RewrittenYaml remap from a parent launch file to Nav2.
# if enable_groot_monitoring is set to True, ports need to be different for each robot !!
enable_groot_monitoring: False
groot_zmq_publisher_port: 1789
groot_zmq_server_port: 1887
plugin_lib_names:
- nav2_compute_path_to_pose_action_bt_node
- nav2_compute_path_through_poses_action_bt_node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def main():
parser.add_argument('-z', type=float, default=0,
help='the z component of the initial position [meters]')
parser.add_argument('-k', '--timeout', type=float, default=10.0,
help="Seconds to wait. Block until the future is complete if negative. Don't wait if 0.")
help="Seconds to wait. Block until the future is complete if negative. \
Don't wait if 0.")

group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('-t', '--turtlebot_type', type=str,
Expand Down