ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.52k stars 1.28k forks source link

Docker container does not include SLAM Toolbox #1826

Closed Michael-Equi closed 4 years ago

Michael-Equi commented 4 years ago

When running ros2 launch nav2_bringup tb3_simulation_launch.py slam:=True launch command with on the latest docker container I get the following error:

Caught exception in launch (see debug for traceback): "package 'slam_toolbox' not found, searching: ['/opt/overlay_ws/install/launch_files', '/opt/overlay_ws/install/br-perception', '/opt/overlay_ws/install/br-navigation', '/opt/overlay_ws/install/nav2_system_tests', '/opt/overlay_ws/install/nav2_bringup', '/opt/overlay_ws/install/navigation2', '/opt/overlay_ws/install/nav2_dwb_controller', '/opt/overlay_ws/install/nav2_controller', '/opt/overlay_ws/install/dwb_plugins', '/opt/overlay_ws/install/dwb_critics', '/opt/overlay_ws/install/dwb_core', '/opt/overlay_ws/install/nav_2d_utils', '/opt/overlay_ws/install/dwb_msgs', '/opt/overlay_ws/install/nav_2d_msgs', '/opt/overlay_ws/install/nav2_waypoint_follower', '/opt/overlay_ws/install/nav2_recoveries', '/opt/overlay_ws/install/nav2_planner', '/opt/overlay_ws/install/nav2_navfn_planner', '/opt/overlay_ws/install/nav2_core', '/opt/overlay_ws/install/costmap_queue', '/opt/overlay_ws/install/nav2_costmap_2d', '/opt/overlay_ws/install/nav2_voxel_grid', '/opt/overlay_ws/install/nav2_rviz_plugins', '/opt/overlay_ws/install/nav2_map_server', '/opt/overlay_ws/install/nav2_lifecycle_manager', '/opt/overlay_ws/install/nav2_bt_navigator', '/opt/overlay_ws/install/nav2_behavior_tree', '/opt/overlay_ws/install/nav2_amcl', '/opt/overlay_ws/install/nav2_util', '/opt/overlay_ws/install/nav2_msgs', '/opt/overlay_ws/install/nav2_gazebo_spawner', '/opt/overlay_ws/install/nav2_common', '/opt/underlay_ws/install/vision_opencv', '/opt/underlay_ws/install/opencv_tests', '/opt/underlay_ws/install/image_common', '/opt/underlay_ws/install/gazebo_ros_pkgs', '/opt/underlay_ws/install/gazebo_plugins', '/opt/underlay_ws/install/image_transport', '/opt/underlay_ws/install/image_geometry', '/opt/underlay_ws/install/gazebo_ros', '/opt/underlay_ws/install/gazebo_msgs', '/opt/underlay_ws/install/gazebo_dev', '/opt/underlay_ws/install/cv_bridge', '/opt/underlay_ws/install/camera_info_manager', '/opt/underlay_ws/install/camera_calibration_parsers', '/opt/underlay_ws/install/behaviortree_cpp_v3', '/opt/underlay_ws/install/angles', '/opt/ros/foxy']"

Without the slam:=True flag the file launches fine.

SteveMacenski commented 4 years ago

@Michael-Equi please add Slam toolbox's rosdep key to https://github.com/ros-planning/navigation2/blob/master/nav2_bringup/bringup/package.xml. That will have it installed on released distributions.

SteveMacenski commented 4 years ago

It occurs to me that this creates a circular dependency, creating a chicken and egg problem for releases. Its not a problem once things are released but it does make my life a little harder.

What you should probably do is install slam toolbox on your docker image if you'd like to use it. There's no strict requirement that you use SLAM Toolbox for anything in particular. The other option is to use docker container composition and use this as a base that your new docker image will install SLAM Toolbox.

Michael-Equi commented 4 years ago

Would you suggest closing the PR and that I just tackle it that way?

SteveMacenski commented 4 years ago

See my comment in the PR, I think you just need to add it to the ros2_dependencies file. @AlexeyMerzlyakov and I added direct support for it in the slam variable so I think we should properly support it even if its a pain for me down the line a bit