From f4e1e1b0f6a89e6d4bddb0f73efb8828dbf52a85 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 28 Apr 2020 17:55:59 -0700 Subject: [PATCH 01/49] Clean out old files --- configs/sandbox_demo/bad_actor.conf | 15 -- .../sandbox_demo/navigation_sandbox.launch.py | 222 ------------------ configs/sandbox_demo/secure.conf | 13 - .../security_workshop_demo_common.conf | 52 ---- configs/sandbox_demo/unsecure.conf | 9 - example_nodes/CMakeLists.txt | 44 ---- .../launch/sandboxed_cpu_hog.launch.py | 72 ------ example_nodes/package.xml | 22 -- example_nodes/src/cpu_hog.cpp | 99 -------- 9 files changed, 548 deletions(-) delete mode 100644 configs/sandbox_demo/bad_actor.conf delete mode 100644 configs/sandbox_demo/navigation_sandbox.launch.py delete mode 100644 configs/sandbox_demo/secure.conf delete mode 100644 configs/sandbox_demo/security_workshop_demo_common.conf delete mode 100644 configs/sandbox_demo/unsecure.conf delete mode 100644 example_nodes/CMakeLists.txt delete mode 100644 example_nodes/launch/sandboxed_cpu_hog.launch.py delete mode 100644 example_nodes/package.xml delete mode 100644 example_nodes/src/cpu_hog.cpp diff --git a/configs/sandbox_demo/bad_actor.conf b/configs/sandbox_demo/bad_actor.conf deleted file mode 100644 index 8426c35..0000000 --- a/configs/sandbox_demo/bad_actor.conf +++ /dev/null @@ -1,15 +0,0 @@ -source $BYOBU_PREFIX/share/byobu/profiles/tmux - -# setup secure session -new-session -s secure -n diagnostic -d -send-keys 'glances' Enter - -setenv FOO "foo" - -source configs/sandbox_demo/security_workshop_demo_common.conf - -new-window -n bad_actor -send-keys 'ros2 run example_nodes cpu_hog 32' - -split-window -v -send-keys 'ros2 launch example_nodes sandboxed_cpu_hog.launch.py' diff --git a/configs/sandbox_demo/navigation_sandbox.launch.py b/configs/sandbox_demo/navigation_sandbox.launch.py deleted file mode 100644 index 93c1789..0000000 --- a/configs/sandbox_demo/navigation_sandbox.launch.py +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -This launch file is meant to be used to showcase the launch_ros_sandbox -package capabilities. - -When running the Turtlebot 3 security demo, the navigation nodes are sandboxed, -i.e., running in a docker container. Using the launch_ros_sandbox -SandboxedNodeContainer and SandboxedNode here, we can replace the following -launch files: - - ros-swg/turtlebot3_demo/navigation2.launch.py - ros-planning/navigation2/nav2_bringup_launch.py - ros-planning/navigation2/nav2_localization_launch.py - ros-planning/navigation2/nav2_navigation_launch.py - -For more details please see the launch_ros_sandbox project at -https://github.com/aws-robotics/launch-ros-sandbox -""" -import os - -from ament_index_python.packages import get_package_prefix, get_package_share_directory - -from nav2_common.launch import RewrittenYaml - -from launch import LaunchDescription -from launch.substitutions import LaunchConfiguration, ThisLaunchFileDir -from launch.actions import DeclareLaunchArgument, SetEnvironmentVariable -from launch.actions import DeclareLaunchArgument, SetEnvironmentVariable -from launch_ros.actions import Node - -from launch_ros_sandbox.actions import SandboxedNodeContainer -from launch_ros_sandbox.descriptions import DockerPolicy -from launch_ros_sandbox.descriptions import SandboxedNode - -TURTLEBOT3_MODEL = os.environ['TURTLEBOT3_MODEL'] - - -def generate_launch_description(): - # Get the launch directory - use_sim_time = LaunchConfiguration('use_sim_time', default=True) - autostart = LaunchConfiguration('autostart') - params_file = LaunchConfiguration('params_file') - bt_xml_file = LaunchConfiguration('bt_xml_file') - map_subscribe_transient_local = LaunchConfiguration( - 'map_subscribe_transient_local') - - # Create our own temporary YAML files that include substitutions - param_substitutions = { - 'use_sim_time': use_sim_time, - 'bt_xml_filename': bt_xml_file, - 'autostart': autostart, - 'map_subscribe_transient_local': map_subscribe_transient_local} - - configured_params = RewrittenYaml( - source_file=params_file, - rewrites=param_substitutions, - convert_types=True) - - map_dir = LaunchConfiguration( - 'map', - default=os.path.join( - get_package_share_directory('turtlebot3_navigation2'), - 'map', - 'map.yaml')) - - param_file_name = TURTLEBOT3_MODEL + '.yaml' - param_dir = LaunchConfiguration( - 'params', - default=os.path.join( - get_package_share_directory('turtlebot3_navigation2'), - 'param', - param_file_name)) - - rviz_config_dir = os.path.join( - get_package_share_directory('nav2_bringup'), - 'launch', - 'nav2_default_view.rviz') - - return LaunchDescription([ - # Set env var to print messages to stdout immediately - SetEnvironmentVariable('RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED', '1'), - - - DeclareLaunchArgument( - 'map', - default_value=map_dir, - description='Full path to map file to load'), - - DeclareLaunchArgument( - 'use_sim_time', default_value='false', - description='Use simulation (Gazebo) clock if true'), - - DeclareLaunchArgument( - 'autostart', default_value='true', - description='Automatically startup the nav2 stack'), - - DeclareLaunchArgument( - 'params_file', - default_value=param_dir, - description='Full path to the ROS2 parameters file to use'), - - DeclareLaunchArgument( - 'bt_xml_file', - default_value=os.path.join(get_package_prefix('nav2_bt_navigator'), - 'behavior_trees', 'navigate_w_replanning_and_recovery.xml'), - description='Full path to the behavior tree xml file to use'), - - DeclareLaunchArgument( - 'use_lifecycle_mgr', default_value='true', - description='Whether to launch the lifecycle manager'), - - DeclareLaunchArgument( - 'map_subscribe_transient_local', default_value='false', - description='Whether to set the map subscriber QoS to transient local'), - - # The following defines a list of SandboxedNodes running in a docker container - SandboxedNodeContainer( - sandbox_name='security_sandbox', - policy=DockerPolicy( - tag='roscon19', - repository='rosswg/turtlebot3_demo', - container_name='turtlebot3_navigation', - ), - node_descriptions=[ - SandboxedNode( - package='nav2_lifecycle_manager', - node_executable='lifecycle_manager', - node_name='lifecycle_manager', - # output='screen', - parameters=[{'use_sim_time': use_sim_time}, - {'autostart': autostart}, - {'node_names': ['map_server', - 'amcl', - 'controller_server', - 'planner_server', - 'bt_navigator']}]), - SandboxedNode( - package='nav2_map_server', - node_executable='map_server', - node_name='map_server', - # output='screen', - parameters=[configured_params]), - - SandboxedNode( - package='nav2_amcl', - node_executable='amcl', - node_name='amcl', - # output='screen', - parameters=[configured_params]), - - SandboxedNode( - package='nav2_lifecycle_manager', - node_executable='lifecycle_manager', - node_name='lifecycle_manager_localization', - # output='screen', - parameters=[{'use_sim_time': use_sim_time}, - {'autostart': autostart}, - {'node_names': ['map_server', 'amcl']}]), - - SandboxedNode( - package='nav2_controller', - node_executable='controller_server', - # output='screen', - parameters=[configured_params]), - - SandboxedNode( - package='nav2_planner', - node_executable='planner_server', - node_name='planner_server', - # output='screen', - parameters=[configured_params]), - - SandboxedNode( - package='nav2_recoveries', - node_executable='recoveries_node', - node_name='recoveries', - # output='screen', - parameters=[{'use_sim_time': use_sim_time}]), - - SandboxedNode( - package='nav2_bt_navigator', - node_executable='bt_navigator', - node_name='bt_navigator', - # output='screen', - parameters=[configured_params]), - - SandboxedNode( - package='nav2_lifecycle_manager', - node_executable='lifecycle_manager', - node_name='lifecycle_manager_navigation', - # output='screen', - parameters=[{'use_sim_time': use_sim_time}, - {'autostart': autostart}, - {'node_names': ['controller_server', - 'navfn_planner', - 'bt_navigator']}]), - ] - ), - - Node( - package='rviz2', - node_executable='rviz2', - node_name='rviz2', - arguments=['-d', rviz_config_dir], - parameters=[{'use_sim_time': use_sim_time}], - # output='screen' - ), - - ]) diff --git a/configs/sandbox_demo/secure.conf b/configs/sandbox_demo/secure.conf deleted file mode 100644 index d54baf3..0000000 --- a/configs/sandbox_demo/secure.conf +++ /dev/null @@ -1,13 +0,0 @@ -source $BYOBU_PREFIX/share/byobu/profiles/tmux - -# setup secure session -new-session -s secure -n diagnostic -d -send-keys 'glances' Enter - -setenv FOO "foo" -setenv ROS_SECURITY_ENABLE true -setenv ROS_SECURITY_STRATEGY Enforce -setenv ROS_SECURITY_ROOT_DIRECTORY $TB3_DEMO_DIR/keystore -setenv ROS_SECURITY_LOOKUP_TYPE MATCH_PREFIX - -source configs/sandbox_demo/security_workshop_demo_common.conf diff --git a/configs/sandbox_demo/security_workshop_demo_common.conf b/configs/sandbox_demo/security_workshop_demo_common.conf deleted file mode 100644 index 0f63d14..0000000 --- a/configs/sandbox_demo/security_workshop_demo_common.conf +++ /dev/null @@ -1,52 +0,0 @@ -# setup secure session -new-window -n turtlebot -send-keys 'ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py' Enter - -split-window -h -send-keys 'ros2 run turtlebot3_teleop teleop_keyboard' Enter - -split-window -v -send-keys 'ros2 topic echo /cmd_vel' Enter - -# Select teleop pane -select-pane -t 1 - -# create navigation window -new-window -n navigation -# launch navigation using the workshop demo launch script (sandbox nodes) -send-keys 'ros2 launch configs/sandbox_demo/navigation_sandbox.launch.py' Enter - -split-window -h -send-keys 'configs/initial_pose.sh' - -split-window -v -send-keys 'configs/navigate_to_pose.sh' - -# Select initial_pose pane -select-pane -t 1 - -# create mapping window -new-window -n mapping -send-keys 'ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=true' - -split-window -h -send-keys 'ros2 run nav2_map_server map_saver -f maps/map' - -split-window -v -send-keys 'ros2 topic info /map' - -# Select cartographer pane -select-pane -t 0 - -# create sros window -new-window -n sros -send-keys 'tree keystore -d' Enter - -split-window -h -send-keys 'ros2 security generate_artifacts -k keystore -p policies/tb3_gazebo_policy.xml -n /_ros2cli' - -split-window -v -send-keys 'env | grep ROS' Enter - -# reselect turtlebot window (the one with teleop) -select-window -t turtlebot diff --git a/configs/sandbox_demo/unsecure.conf b/configs/sandbox_demo/unsecure.conf deleted file mode 100644 index 29f7048..0000000 --- a/configs/sandbox_demo/unsecure.conf +++ /dev/null @@ -1,9 +0,0 @@ -source $BYOBU_PREFIX/share/byobu/profiles/tmux - -# setup secure session -new-session -s secure -n diagnostic -d -send-keys 'glances' Enter - -setenv FOO "foo" - -source configs/sandbox_demo/security_workshop_demo_common.conf diff --git a/example_nodes/CMakeLists.txt b/example_nodes/CMakeLists.txt deleted file mode 100644 index 28c3331..0000000 --- a/example_nodes/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(example_nodes) - -# Default to C99 -if(NOT CMAKE_C_STANDARD) - set(CMAKE_C_STANDARD 99) -endif() - -# Default to C++14 -if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) -endif() - -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wall -Wextra -Wpedantic) -endif() - -# find dependencies -find_package(ament_cmake REQUIRED) -find_package(rcutils REQUIRED) - -add_executable(cpu_hog src/cpu_hog.cpp) -target_include_directories(cpu_hog PUBLIC - $ - $) -ament_target_dependencies( - cpu_hog - "rcutils" -) - -install(TARGETS cpu_hog - EXPORT export_${PROJECT_NAME} - DESTINATION lib/${PROJECT_NAME}) - -install(DIRECTORY - launch - DESTINATION share/${PROJECT_NAME}/) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_package() diff --git a/example_nodes/launch/sandboxed_cpu_hog.launch.py b/example_nodes/launch/sandboxed_cpu_hog.launch.py deleted file mode 100644 index c47307b..0000000 --- a/example_nodes/launch/sandboxed_cpu_hog.launch.py +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -This launchfile demonstrates resource limitations on sandboxed nodes. - -It spins up a program that tries to fork 32 simultaneous processes that each take up as much -CPU time as possible. -However, due to the constraints put on this node by the sandbox, it is not able to significantly -disrupt the performance of the navigation demo. - -For more details please see the launch_ros_sandbox project at -https://github.com/aws-robotics/launch-ros-sandbox - -For more information on configurable resource limits, see the `docker run` documentation -https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources -""" -from launch import LaunchDescription - -from launch_ros_sandbox.actions import SandboxedNodeContainer -from launch_ros_sandbox.descriptions import DockerPolicy -from launch_ros_sandbox.descriptions import SandboxedNode - - -def generate_launch_description(): - ld = LaunchDescription() - ld.add_action( - SandboxedNodeContainer( - sandbox_name='my_sandbox', - policy=DockerPolicy( - tag='latest', - repository='rosswg/turtlebot3_demo', - container_name='sandboxed-cpu-hog', - run_args={ - # CPU quota, in microseconds per scheduler period. - # The default scheduler period is 100ms == 100000us - # Therefore the below value of 200000us limits this container to using, - # at most, 2 cpu cores' worth of processing - 'cpu_period': 100000, - 'cpu_quota': 200000, - }, - entrypoint='/ros_entrypoint.sh', - ), - node_descriptions=[ - SandboxedNode( - package='example_nodes', - node_executable='cpu_hog', - ), - ] - ) - ) - - return ld - - -if __name__ == '__main__': - import sys - from launch import LaunchService - ls = LaunchService(argv=sys.argv[1:], debug=True) - ls.include_launch_description(generate_launch_description()) - sys.exit(ls.run()) diff --git a/example_nodes/package.xml b/example_nodes/package.xml deleted file mode 100644 index d261995..0000000 --- a/example_nodes/package.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - example_nodes - 0.0.0 - Example nodes for the ROSCon 2019 security workshop - AWS RoboMaker - Apache 2.0 - - ament_cmake - - rcutils - - launch_ros_sandbox - - ament_lint_auto - ament_lint_common - - - ament_cmake - - diff --git a/example_nodes/src/cpu_hog.cpp b/example_nodes/src/cpu_hog.cpp deleted file mode 100644 index f9808ce..0000000 --- a/example_nodes/src/cpu_hog.cpp +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "rcutils/logging_macros.h" - -/* Fork some threads to hog the CPU */ -int start_hogs(uint forks) -{ - int pid, retval = 0; - uint i; - double d; - - for (i = 0; forks == 0 || i < forks; i++) { - switch (pid = fork()) { - case 0: // If I'm the child fork - // Use a backoff sleep to ensure we get good fork throughput. - usleep(3000); - - // Do meaningless work! - while (1) { - d = sqrt(std::rand()); - } - // This case never falls through, it works forever (until parent is exited) - case -1: - RCUTILS_LOG_ERROR("Worker fork failed."); - return 1; - default: - // I'm the parent fork - RCUTILS_LOG_INFO("--> Worker forked (%i)", pid); - } - } - (void) d; // For the linter - - // Wait for all child forks to exit - while (i) { - int status, ret; - - if ((pid = wait(&status)) > 0) { - if ((WIFEXITED(status)) != 0) { - if ((ret = WEXITSTATUS(status)) != 0) { - RCUTILS_LOG_INFO("Worker process %i exited %i", pid, ret); - retval += ret; - } else { - RCUTILS_LOG_INFO("<-- Worker exited (%i)", pid); - } - } else { - RCUTILS_LOG_INFO("<-- Worker signalled (%i)", pid); - } - - --i; - } else { - RCUTILS_LOG_INFO("wait() returned error: %s", strerror(errno)); - RCUTILS_LOG_ERROR("detected missing hogcpu worker children"); - ++retval; - break; - } - } - - return retval; -} - - -int main(int argc, char ** argv) -{ - int num_processes = 32; - if (argc == 2) { - num_processes = atoi(argv[1]); - } else if (argc > 2) { - RCUTILS_LOG_ERROR("Usage: cpu_hog [NUM_PROCESSES]"); - return 1; - } - if (num_processes <= 0) { - RCUTILS_LOG_ERROR("NUM_PROCESSES must be greater than 0"); - return 1; - } - RCUTILS_LOG_INFO("Forking %d cpu hogs", num_processes); - return start_hogs(num_processes); -} From 55236c990d439a5f110e432b56f8dc23591824f6 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 28 Apr 2020 17:59:55 -0700 Subject: [PATCH 02/49] Simplify README --- README.md | 83 +------------------------------------------------------ 1 file changed, 1 insertion(+), 82 deletions(-) diff --git a/README.md b/README.md index e5f8ae3..ec295de 100644 --- a/README.md +++ b/README.md @@ -59,46 +59,6 @@ Feel free to poke around, open a new window and list or echo topics and services [![](media/localize.png)](media/localize.mp4) -## Running the reconnaissance demo: - -Reconnaissance is the act of gathering preliminary data or intelligence on your target. The data is gathered in order to better plan for your attack. Reconnaissance can be performed actively (meaning that you are directly touching/connecting-to the target) or passively (meaning that your reconnaissance is being performed through an intermediary). - -The purpose of reconnaissance is to accumulate as much information as possible about a robot or robot component, including the available ROS abstractions (topics, services, etc.), the version of ROS, the target’s hardware platform and more. - -In this short tutorial we'll demonstrate the use of [`aztarna`](https://github.com/aliasrobotics/aztarna/), a tool for performing reconnaissance in a variety of robotic systems. Particularly, we'll look at the information we can obtain by performing active reconnaissance in an unsecure robot acting both as an attacker with direct access to the robot ("host/container" insider) and as an attacker with access to the local internal network where ROS 2 operates. - -### Host/container insider attacker -``` bash -rocker --x11 --nvidia rosswg/turtlebot3_demo:roscon19 "byobu -f configs/unsecure.conf attach" -``` - -### Internal network attacker -``` bash -# in Terminal (terminal 1), initialize first a swarm -docker swarm init -# in Terminal (terminal 1), create the network overlay -docker network create -d overlay \ - --subnet=10.0.0.0/24 \ - --gateway=10.0.0.1 \ - --ip-range 10.0.0.192/27 \ - --attachable \ - overlay - -# in another Terminal (terminal 2), launch demo -rocker --x11 --nvidia --network overlay rosswg/turtlebot3_demo:roscon19 "byobu -f configs/unsecure.conf attach" - -# in another Terminal (terminal 3), launch another container -docker run -it --rm --network overlay --name aztarna rosswg/turtlebot3_demo:roscon19 /bin/bash -# then perform a scan -$ aztarna -t ros2 -``` - -Cleanup afterwards: -```bash -docker network rm overlay -``` - - ## Running the secure demo: So far we've simply launched the turtlebot3 without using SROS2. To enable security, simply exit the previous byobu session and start a new one now using the secure config: @@ -120,7 +80,6 @@ These variables simply enable as well as enforce security for all ros2 nodes whi * https://design.ros2.org/articles/ros2_dds_security.html - ## Re-generate security artifacts Using the same attached session above, now lets try and generate security artifacts for ourselves, rather than simply using the same artifacts that came bundled in the demo docker image. We can start by switching over to the sros window and clearing out the existing keystore: @@ -188,51 +147,11 @@ export ROS_SECURITY_ENABLE=true Now try starting another teleop node with security disabled and check that only the secure teleop node can drive the robot. -## Sandboxed Nodes Demo - -The [ROSCon 2019](https://ros-swg.github.io/ROSCon19_Security_Workshop/) [ROS2 Security Workshop](https://ros-swg.github.io/ROSCon19_Security_Workshop/) -will present the opportunity to run the Turtlebot3 demo using the [launch-ros-sandbox](https://github.com/aws-robotics/launch-ros-sandbox) -package. Specifically, the demo uses this package to launch the Turtlebot3 navigation nodes in a docker container. See the -configs/sandbox_demo/navigation_sandbox.launch.py launch file for details. - -### Running the Security Workshop Sandbox Node Demo - -``` bash -rocker --x11 --nvidia rosswg/turtlebot3_demo "byobu -f configs/sandbox_demo/unsecure.conf attach" -``` - -Omit the `--nvidia` arg if you don't have dedicated GPU for hardware acceleration of 3D OpenGL views. - -Likewise, the following command is used to run the demo using the secure config: - -``` bash -rocker --x11 --nvidia rosswg/turtlebot3_demo "byobu -f configs/sandbox_demo/secure.conf attach" -``` - -### Demonstrating Sandbox Resource Limits - -This demo shows how robot code, acting improperly, can negatively affect the entire robotic system. - -``` bash -rocker --x11 --nvidia rosswg/turtlebot3_demo "byobu -f configs/sandbox_demo/bad_actor.conf attach" --oyr-run-arg " -v /var/run/docker.sock:/var/run/docker.sock " -``` - -After launching with the above config, there are two commands ready in the `bad_actor` byobu window. -They are ready to run a cpu hog that will fork many busy processes. -This is a contrived example - but it illustrates what could happen if a node that you are using hits an untested code path and goes into an infinite loop. - -If you run the top command (`ros2 run...`), you can see the CPU of your system jump to 100% usage (check the `diagnostic` byobu window), grinding everything else to a halt. - -However, if you kill that and run the bottom command (`ros2 launch ...`), it will launch inside a container that has a CPU resource limit set. -This launch will be able to use at most 2 CPUs worth of processing, allowing the rest of the demo to still run at a normal speed. -See `example_nodes/launch/sandboxed_cpu_hog.launch.py` for some more info on the arguments that make this happen. - - ## Developing To rebuild this demo locally if you are working on it, you can rebuild the Docker image with the same tag, so all above demo commands will work correctly. ``` bash git clone git@github.com:ros-swg/turtlebot3_demo.git cd turtlebot3_demo -docker build . -t rosswg/turtlebot3_demo +docker build --tag rosswg/turtlebot3_demo . ``` From c6df6bc77f99c3a647d0964da12c7daabc816bdf Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 28 Apr 2020 18:23:33 -0700 Subject: [PATCH 03/49] Clean up Dockerfile --- Dockerfile | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1804332..2fe8a72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,20 +52,6 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ colcon build \ --symlink-install -# fetch and install tools for reconnaissance -WORKDIR /tmp -RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ - libgmp3-dev gengetopt \ - libpcap-dev flex byacc \ - libjson-c-dev unzip \ - libunistring-dev wget \ - libxml2-dev libxslt1-dev \ - libffi-dev libssl-dev \ - tshark && \ - rm -rf /var/lib/apt/lists/* -RUN git clone https://github.com/aliasrobotics/aztarna && \ - cd aztarna && python3 setup.py install - # generate artifacts for keystore ENV TB3_DEMO_DIR $TB3_OVERLAY_WS/.. WORKDIR $TB3_DEMO_DIR From 32d7ee6e7583a8b492b9a17486929416c47d0eda Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 28 Apr 2020 18:23:59 -0700 Subject: [PATCH 04/49] Update Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2fe8a72..c542b3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM osrf/ros:dashing-desktop -# FROM osrf/ros2:nightly +ARG FROM_IMAGE=osrf/ros2:nightly +FROM $FROM_IMAGE # install helpful developer tools RUN apt-get update && apt-get install -y \ @@ -7,11 +7,11 @@ RUN apt-get update && apt-get install -y \ byobu \ fish \ glances \ + micro \ nano \ python3-argcomplete \ tree \ vim \ - && cd /usr/bin && curl https://getmic.ro | bash \ && rm -rf /var/lib/apt/lists/* # install turtlebot external packages From df25c11d335d5d65ca735ecadaa0cbb7de98caf4 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 28 Apr 2020 22:52:45 -0700 Subject: [PATCH 05/49] Stage changed for foxy source build --- .docker/overlay.repos | 37 -------- Dockerfile | 196 ++++++++++++++++++++++++++++++----------- install/overlay.repos | 13 +++ install/underlay.repos | 27 ++++++ 4 files changed, 183 insertions(+), 90 deletions(-) delete mode 100644 .docker/overlay.repos create mode 100644 install/overlay.repos create mode 100644 install/underlay.repos diff --git a/.docker/overlay.repos b/.docker/overlay.repos deleted file mode 100644 index d993590..0000000 --- a/.docker/overlay.repos +++ /dev/null @@ -1,37 +0,0 @@ -repositories: - # turtlebot3: - # type: git - # url: https://github.com/ROBOTIS-GIT/turtlebot3 - # version: ros2-devel - # turtlebot3/turtlebot3_msgs: - # type: git - # url: https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git - # version: ros2-devel - # turtlebot3/turtlebot3_simulations: - # type: git - # url: https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git - # version: ros2-devel - # cartographer/cartographer: - # type: git - # url: https://github.com/ROBOTIS-GIT/cartographer.git - # version: dashing - # cartographer/cartographer_ros: - # type: git - # url: https://github.com/ros2/cartographer_ros.git - # version: dashing - ros2/sros2: - type: git - url: https://github.com/ros2/sros2.git - version: master - launch-ros-sandbox: - type: git - url: https://github.com/aws-robotics/launch-ros-sandbox - version: master - # ros2/pcl_conversions: - # type: git - # url: https://github.com/ros2/pcl_conversions.git - # version: ros2 - # ros-planning/navigation2: - # type: git - # url: https://github.com/ros-planning/navigation2.git - # version: master \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index c542b3b..c673299 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,37 @@ ARG FROM_IMAGE=osrf/ros2:nightly -FROM $FROM_IMAGE + +# multi-stage for caching +FROM $FROM_IMAGE AS cache + +# clone underlay source +ENV UNDERLAY_WS /opt/underlay_ws +RUN mkdir -p $UNDERLAY_WS/src +WORKDIR $UNDERLAY_WS +COPY ./install/underlay.repos ./ +RUN vcs import src < underlay.repos + +# copy overlay source +ENV OVERLAY_WS /opt/overlay_ws +RUN mkdir -p $OVERLAY_WS/src +WORKDIR $OVERLAY_WS +COPY ./install/overlay.repos ./ +RUN vcs import src < overlay.repos + +# copy manifests for caching +WORKDIR /opt +RUN find ./ -name "package.xml" | \ + xargs cp --parents -t /tmp \ + && find ./ -name "COLCON_IGNORE" | \ + xargs cp --parents -t /tmp + +# multi-stage for building +FROM $FROM_IMAGE AS build # install helpful developer tools RUN apt-get update && apt-get install -y \ bash-completion \ byobu \ + ccache \ fish \ glances \ micro \ @@ -14,64 +41,127 @@ RUN apt-get update && apt-get install -y \ vim \ && rm -rf /var/lib/apt/lists/* -# install turtlebot external packages -RUN apt-get update && apt-get install -y \ - ros-$ROS_DISTRO-rqt* \ - ros-$ROS_DISTRO-turtlebot3-cartographer \ - ros-$ROS_DISTRO-turtlebot3-navigation2 \ - ros-$ROS_DISTRO-turtlebot3-simulations \ - ros-$ROS_DISTRO-turtlebot3-teleop \ +# setup keys +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 +# setup sources.list +RUN . /etc/os-release \ + && echo "deb http://packages.osrfoundation.org/gazebo/$ID-stable `lsb_release -sc` main" > /etc/apt/sources.list.d/gazebo-latest.list +# install gazebo packages +RUN apt-get update && apt-get install -q -y --no-install-recommends \ + libgazebo11-dev \ && rm -rf /var/lib/apt/lists/* -# clone overlay package repos -ENV TB3_OVERLAY_WS /opt/tb3_overlay_ws -RUN mkdir -p $TB3_OVERLAY_WS/src -WORKDIR $TB3_OVERLAY_WS -COPY .docker/overlay.repos ./ -RUN vcs import src < overlay.repos -# Install extra sources from this repo -COPY example_nodes/ src/example_nodes -# RUN vcs import src < src/ros-planning/navigation2/tools/ros2_dependencies.repos - -# install overlay package dependencies -RUN . /opt/ros/$ROS_DISTRO/setup.sh \ - && rosdep update \ - && rosdep install -y \ +# copy underlay manifests +ENV UNDERLAY_WS /opt/underlay_ws +COPY --from=cache /tmp/underlay_ws $UNDERLAY_WS +WORKDIR $UNDERLAY_WS + +# install underlay dependencies +RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ + apt-get update && rosdep install -q -y \ --from-paths src \ --ignore-src \ --skip-keys " \ - ament_mypy \ - libopensplice69 \ - rti-connext-dds-5.3.1 \ - " \ + gazebo9 \ + libgazebo9-dev \ + " \ && rm -rf /var/lib/apt/lists/* -# build overlay package source -# RUN touch $TB3_OVERLAY_WS/src/turtlebot3/turtlebot3_node/COLCON_IGNORE +# copy underlay source +COPY --from=cache $UNDERLAY_WS ./ + +# build underlay source +ARG UNDERLAY_MIXINS="ccache release" RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ colcon build \ - --symlink-install - -# generate artifacts for keystore -ENV TB3_DEMO_DIR $TB3_OVERLAY_WS/.. -WORKDIR $TB3_DEMO_DIR -COPY policies policies -RUN . $TB3_OVERLAY_WS/install/setup.sh && \ - ros2 security generate_artifacts -k keystore \ - -p policies/tb3_gazebo_policy.xml \ - -n /_ros2cli - -# copy demo files -COPY maps maps -COPY configs configs -COPY .gazebo /root/.gazebo - -# source overlay workspace from entrypoint -RUN sed --in-place \ - 's|^source .*|source "$TB3_OVERLAY_WS/install/setup.bash"|' \ - /ros_entrypoint.sh && \ - cp /etc/skel/.bashrc ~/ && \ - echo 'source "$TB3_OVERLAY_WS/install/setup.bash"' >> ~/.bashrc - -ENV TURTLEBOT3_MODEL='burger' \ - GAZEBO_MODEL_PATH=/opt/ros/$ROS_DISTRO/share/turtlebot3_gazebo/models:$GAZEBO_MODEL_PATH + --symlink-install \ + --mixin $UNDERLAY_MIXINS \ + --cmake-args \ + --no-warn-unused-cli \ + -DCMAKE_CXX_FLAGS=" \ + -Wno-deprecated-declarations \ + " + + + +# # copy overlay manifests +# ENV OVERLAY_WS /opt/overlay_ws +# COPY --from=cache /tmp/overlay_ws $OVERLAY_WS +# WORKDIR $OVERLAY_WS + +# # install overlay dependencies +# RUN . $UNDERLAY_WS/install/setup.sh && \ +# apt-get update && rosdep install -q -y \ +# --from-paths \ +# src \ +# $UNDERLAY_WS/src \ +# --ignore-src \ +# && rm -rf /var/lib/apt/lists/* + +# # copy overlay source +# COPY --from=cache $OVERLAY_WS ./ + +# # build overlay source +# ARG OVERLAY_MIXINS="release ccache" +# RUN . $UNDERLAY_WS/install/setup.sh && \ +# colcon build \ +# --symlink-install \ +# --mixin $OVERLAY_MIXINS + + + + + + +# # clone overlay package repos +# ENV TB3_OVERLAY_WS /opt/tb3_overlay_ws +# RUN mkdir -p $TB3_OVERLAY_WS/src +# WORKDIR $TB3_OVERLAY_WS +# COPY .docker/overlay.repos ./ +# RUN vcs import src < overlay.repos +# # Install extra sources from this repo +# COPY example_nodes/ src/example_nodes +# # RUN vcs import src < src/ros-planning/navigation2/tools/ros2_dependencies.repos + +# # install overlay package dependencies +# RUN . /opt/ros/$ROS_DISTRO/setup.sh \ +# && rosdep update \ +# && rosdep install -y \ +# --from-paths src \ +# --ignore-src \ +# --skip-keys " \ +# ament_mypy \ +# libopensplice69 \ +# rti-connext-dds-5.3.1 \ +# " \ +# && rm -rf /var/lib/apt/lists/* + +# # build overlay package source +# # RUN touch $TB3_OVERLAY_WS/src/turtlebot3/turtlebot3_node/COLCON_IGNORE +# RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ +# colcon build \ +# --symlink-install + +# # generate artifacts for keystore +# ENV TB3_DEMO_DIR $TB3_OVERLAY_WS/.. +# WORKDIR $TB3_DEMO_DIR +# COPY policies policies +# RUN . $TB3_OVERLAY_WS/install/setup.sh && \ +# ros2 security generate_artifacts -k keystore \ +# -p policies/tb3_gazebo_policy.xml \ +# -n /_ros2cli + +# # copy demo files +# COPY maps maps +# COPY configs configs +# COPY .gazebo /root/.gazebo + +# # source overlay workspace from entrypoint +# RUN sed --in-place \ +# 's|^source .*|source "$TB3_OVERLAY_WS/install/setup.bash"|' \ +# /ros_entrypoint.sh && \ +# cp /etc/skel/.bashrc ~/ && \ +# echo 'source "$TB3_OVERLAY_WS/install/setup.bash"' >> ~/.bashrc + +# ENV TURTLEBOT3_MODEL='burger' \ +# GAZEBO_MODEL_PATH=/opt/ros/$ROS_DISTRO/share/turtlebot3_gazebo/models:$GAZEBO_MODEL_PATH diff --git a/install/overlay.repos b/install/overlay.repos new file mode 100644 index 0000000..cc3a822 --- /dev/null +++ b/install/overlay.repos @@ -0,0 +1,13 @@ +repositories: + ROBOTIS-GIT/turtlebot3: + type: git + url: https://github.com/ROBOTIS-GIT/turtlebot3.git + version: ros2 + ROBOTIS-GIT/turtlebot3_msgs: + type: git + url: https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git + version: ros2 + ROBOTIS-GIT/turtlebot3_simulations: + type: git + url: https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git + version: ros2 \ No newline at end of file diff --git a/install/underlay.repos b/install/underlay.repos new file mode 100644 index 0000000..fbb338d --- /dev/null +++ b/install/underlay.repos @@ -0,0 +1,27 @@ +repositories: + BehaviorTree/BehaviorTree.CPP: + type: git + url: https://github.com/BehaviorTree/BehaviorTree.CPP.git + version: ros2-3.1.1 + ros/angles: + type: git + url: https://github.com/ros/angles.git + version: ros2 + ros-perception/image_common: + type: git + url: https://github.com/ros-perception/image_common.git + version: ros2 + ros-perception/vision_opencv: + type: git + # url: https://github.com/ros-perception/vision_opencv.git + # version: ros2 + url: https://github.com/LewisLiuPub/vision_opencv.git + version: ros2_cv4 + ros-planning/navigation2: + type: git + url: https://github.com/ros-planning/navigation2.git + version: master + ros-simulation/gazebo_ros_pkgs: + type: git + url: https://github.com/ros-simulation/gazebo_ros_pkgs.git + version: ros2 From 5d9b178a41e3082b4e8b61c948658ccfa15357b3 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Wed, 29 Apr 2020 18:01:10 -0700 Subject: [PATCH 06/49] Update building Dockerfile --- Dockerfile | 116 +++++++++++++++++------------------------ install/overlay.repos | 13 +++-- install/underlay.repos | 3 +- 3 files changed, 59 insertions(+), 73 deletions(-) diff --git a/Dockerfile b/Dockerfile index c673299..718c974 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ RUN mkdir -p $UNDERLAY_WS/src WORKDIR $UNDERLAY_WS COPY ./install/underlay.repos ./ RUN vcs import src < underlay.repos +# # RUN vcs import src < src/ros-planning/navigation2/tools/ros2_dependencies.repos # copy overlay source ENV OVERLAY_WS /opt/overlay_ws @@ -62,8 +63,8 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ --from-paths src \ --ignore-src \ --skip-keys " \ - gazebo9 \ - libgazebo9-dev \ + gazebo11 \ + libgazebo11-dev \ " \ && rm -rf /var/lib/apt/lists/* @@ -84,63 +85,42 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ -# # copy overlay manifests -# ENV OVERLAY_WS /opt/overlay_ws -# COPY --from=cache /tmp/overlay_ws $OVERLAY_WS -# WORKDIR $OVERLAY_WS - -# # install overlay dependencies -# RUN . $UNDERLAY_WS/install/setup.sh && \ -# apt-get update && rosdep install -q -y \ -# --from-paths \ -# src \ -# $UNDERLAY_WS/src \ -# --ignore-src \ -# && rm -rf /var/lib/apt/lists/* - -# # copy overlay source -# COPY --from=cache $OVERLAY_WS ./ - -# # build overlay source -# ARG OVERLAY_MIXINS="release ccache" -# RUN . $UNDERLAY_WS/install/setup.sh && \ -# colcon build \ -# --symlink-install \ -# --mixin $OVERLAY_MIXINS - - - - +# copy overlay manifests +ENV OVERLAY_WS /opt/overlay_ws +COPY --from=cache /tmp/overlay_ws $OVERLAY_WS +WORKDIR $OVERLAY_WS +# install overlay dependencies +RUN . $UNDERLAY_WS/install/setup.sh && \ + apt-get update && rosdep install -q -y \ + --from-paths \ + src \ + $UNDERLAY_WS/src \ + --ignore-src \ + --skip-keys " \ + gazebo11 \ + libgazebo11-dev \ + cartographer_ros \ + hls_lfcd_lds_driver \ + dynamixel_sdk \ + " \ + && rm -rf /var/lib/apt/lists/* -# # clone overlay package repos -# ENV TB3_OVERLAY_WS /opt/tb3_overlay_ws -# RUN mkdir -p $TB3_OVERLAY_WS/src -# WORKDIR $TB3_OVERLAY_WS -# COPY .docker/overlay.repos ./ -# RUN vcs import src < overlay.repos -# # Install extra sources from this repo -# COPY example_nodes/ src/example_nodes -# # RUN vcs import src < src/ros-planning/navigation2/tools/ros2_dependencies.repos +# copy overlay source +COPY --from=cache $OVERLAY_WS ./ -# # install overlay package dependencies -# RUN . /opt/ros/$ROS_DISTRO/setup.sh \ -# && rosdep update \ -# && rosdep install -y \ -# --from-paths src \ -# --ignore-src \ -# --skip-keys " \ -# ament_mypy \ -# libopensplice69 \ -# rti-connext-dds-5.3.1 \ -# " \ -# && rm -rf /var/lib/apt/lists/* - -# # build overlay package source -# # RUN touch $TB3_OVERLAY_WS/src/turtlebot3/turtlebot3_node/COLCON_IGNORE -# RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ -# colcon build \ -# --symlink-install +# build overlay source +ARG OVERLAY_MIXINS="release ccache" +RUN . $UNDERLAY_WS/install/setup.sh && \ + colcon build \ + --symlink-install \ + --mixin $OVERLAY_MIXINS \ + --packages-up-to \ + "turtlebot3_simulations" \ + "turtlebot3_navigation2" \ + --packages-skip \ + "turtlebot3_node" \ + "turtlebot3" # # generate artifacts for keystore # ENV TB3_DEMO_DIR $TB3_OVERLAY_WS/.. @@ -151,17 +131,17 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ # -p policies/tb3_gazebo_policy.xml \ # -n /_ros2cli -# # copy demo files -# COPY maps maps -# COPY configs configs -# COPY .gazebo /root/.gazebo +# copy demo files +COPY maps maps +COPY configs configs +COPY .gazebo /root/.gazebo -# # source overlay workspace from entrypoint -# RUN sed --in-place \ -# 's|^source .*|source "$TB3_OVERLAY_WS/install/setup.bash"|' \ -# /ros_entrypoint.sh && \ -# cp /etc/skel/.bashrc ~/ && \ -# echo 'source "$TB3_OVERLAY_WS/install/setup.bash"' >> ~/.bashrc +# source overlay workspace from entrypoint +RUN sed --in-place \ + 's|^source .*|source "$TB3_OVERLAY_WS/install/setup.bash"|' \ + /ros_entrypoint.sh && \ + cp /etc/skel/.bashrc ~/ && \ + echo 'source "$TB3_OVERLAY_WS/install/setup.bash"' >> ~/.bashrc -# ENV TURTLEBOT3_MODEL='burger' \ -# GAZEBO_MODEL_PATH=/opt/ros/$ROS_DISTRO/share/turtlebot3_gazebo/models:$GAZEBO_MODEL_PATH +ENV TURTLEBOT3_MODEL='burger' \ + GAZEBO_MODEL_PATH=/opt/ros/$ROS_DISTRO/share/turtlebot3_gazebo/models:$GAZEBO_MODEL_PATH diff --git a/install/overlay.repos b/install/overlay.repos index cc3a822..9e014f7 100644 --- a/install/overlay.repos +++ b/install/overlay.repos @@ -1,13 +1,18 @@ repositories: ROBOTIS-GIT/turtlebot3: type: git - url: https://github.com/ROBOTIS-GIT/turtlebot3.git - version: ros2 + # url: https://github.com/ROBOTIS-GIT/turtlebot3.git + # version: ros2 + url: https://github.com/ruffsl/turtlebot3.git + version: navigation2_simulation ROBOTIS-GIT/turtlebot3_msgs: type: git url: https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git version: ros2 ROBOTIS-GIT/turtlebot3_simulations: type: git - url: https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git - version: ros2 \ No newline at end of file + # url: https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git + # version: ros2 + url: https://github.com/ruffsl/turtlebot3_simulations.git + version: navigation2_simulation +#2 \ No newline at end of file diff --git a/install/underlay.repos b/install/underlay.repos index fbb338d..472e333 100644 --- a/install/underlay.repos +++ b/install/underlay.repos @@ -24,4 +24,5 @@ repositories: ros-simulation/gazebo_ros_pkgs: type: git url: https://github.com/ros-simulation/gazebo_ros_pkgs.git - version: ros2 + # version: ros2 + version: gazebo11_foxy From 582dd79999ab64dbb048231da75284f434d05454 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Wed, 29 Apr 2020 18:46:57 -0700 Subject: [PATCH 07/49] Update Dockerfile entrypoint --- Dockerfile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 718c974..f8a44be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,8 +83,6 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ -Wno-deprecated-declarations \ " - - # copy overlay manifests ENV OVERLAY_WS /opt/overlay_ws COPY --from=cache /tmp/overlay_ws $OVERLAY_WS @@ -118,15 +116,16 @@ RUN . $UNDERLAY_WS/install/setup.sh && \ --packages-up-to \ "turtlebot3_simulations" \ "turtlebot3_navigation2" \ + "turtlebot3_teleop" \ --packages-skip \ "turtlebot3_node" \ "turtlebot3" -# # generate artifacts for keystore -# ENV TB3_DEMO_DIR $TB3_OVERLAY_WS/.. -# WORKDIR $TB3_DEMO_DIR -# COPY policies policies -# RUN . $TB3_OVERLAY_WS/install/setup.sh && \ +# generate artifacts for keystore +ENV TB3_DEMO_DIR $OVERLAY_WS/.. +WORKDIR $TB3_DEMO_DIR +COPY policies policies +# RUN . $OVERLAY_WS/install/setup.sh && \ # ros2 security generate_artifacts -k keystore \ # -p policies/tb3_gazebo_policy.xml \ # -n /_ros2cli @@ -138,10 +137,10 @@ COPY .gazebo /root/.gazebo # source overlay workspace from entrypoint RUN sed --in-place \ - 's|^source .*|source "$TB3_OVERLAY_WS/install/setup.bash"|' \ + 's|^source .*|source "$OVERLAY_WS/install/setup.bash"|' \ /ros_entrypoint.sh && \ cp /etc/skel/.bashrc ~/ && \ - echo 'source "$TB3_OVERLAY_WS/install/setup.bash"' >> ~/.bashrc + echo 'source "$OVERLAY_WS/install/setup.bash"' >> ~/.bashrc ENV TURTLEBOT3_MODEL='burger' \ - GAZEBO_MODEL_PATH=/opt/ros/$ROS_DISTRO/share/turtlebot3_gazebo/models:$GAZEBO_MODEL_PATH + GAZEBO_MODEL_PATH=$OVERLAY_WS/install/turtlebot3_gazebo/share/turtlebot3_gazebo/models:$GAZEBO_MODEL_PATH From 7be8ecc78b2da2743afc8cca74691f08c9657662 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 30 Apr 2020 14:38:03 -0700 Subject: [PATCH 08/49] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ec295de..16501b5 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ To run this demo using docker, the following dependencies are required: * Please ensure display forwarding is working with rocker. * [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) is also useful for those with a GPU. * [off-your-rocker](https://github.com/sloretz/off-your-rocker) - * Rocker extension. Required to run the sandbox demo. Used to pass arbitrary arguments Docker arguments through rocker. + * Rocker extension, for passing through arbitrary Docker arguments. For those who can't use linux containers or for detailed instructions on how to build, you may still follow the general build steps of the [Dockerfile](Dockerfile). From 5da496fc6e3b7907c6e169fae5cb207ca2246524 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 30 Apr 2020 15:08:23 -0700 Subject: [PATCH 09/49] Update Dockerfile format --- Dockerfile | 43 ++++++++++++++++++++++-------------------- install/underlay.repos | 6 ++---- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index f8a44be..6d694d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,31 @@ ARG FROM_IMAGE=osrf/ros2:nightly +ARG UNDERLAY_WS=/opt/ros/underlay_ws +ARG OVERLAY_WS=/opt/ros/overlay_ws # multi-stage for caching FROM $FROM_IMAGE AS cache # clone underlay source -ENV UNDERLAY_WS /opt/underlay_ws -RUN mkdir -p $UNDERLAY_WS/src -WORKDIR $UNDERLAY_WS -COPY ./install/underlay.repos ./ -RUN vcs import src < underlay.repos -# # RUN vcs import src < src/ros-planning/navigation2/tools/ros2_dependencies.repos +ARG UNDERLAY_WS +WORKDIR $UNDERLAY_WS/src +COPY ./install/underlay.repos ../ +RUN vcs import ./ < ../underlay.repos \ + && find ./ -name ".git" | xargs rm -rf # copy overlay source -ENV OVERLAY_WS /opt/overlay_ws -RUN mkdir -p $OVERLAY_WS/src -WORKDIR $OVERLAY_WS -COPY ./install/overlay.repos ./ -RUN vcs import src < overlay.repos +ARG OVERLAY_WS +WORKDIR $OVERLAY_WS/src +COPY ./install/overlay.repos ../ +RUN vcs import ./ < ../overlay.repos \ + && find ./ -name ".git" | xargs rm -rf # copy manifests for caching WORKDIR /opt -RUN find ./ -name "package.xml" | \ - xargs cp --parents -t /tmp \ +RUN mkdir -p /tmp/opt \ + && find ./ -name "package.xml" | \ + xargs cp --parents -t /tmp/opt \ && find ./ -name "COLCON_IGNORE" | \ - xargs cp --parents -t /tmp + xargs cp --parents -t /tmp/opt || true # multi-stage for building FROM $FROM_IMAGE AS build @@ -53,9 +55,9 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # copy underlay manifests -ENV UNDERLAY_WS /opt/underlay_ws -COPY --from=cache /tmp/underlay_ws $UNDERLAY_WS +ARG UNDERLAY_WS WORKDIR $UNDERLAY_WS +COPY --from=cache /tmp/$UNDERLAY_WS/src ./src # install underlay dependencies RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ @@ -69,7 +71,7 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ && rm -rf /var/lib/apt/lists/* # copy underlay source -COPY --from=cache $UNDERLAY_WS ./ +COPY --from=cache $UNDERLAY_WS/src ./src # build underlay source ARG UNDERLAY_MIXINS="ccache release" @@ -84,9 +86,9 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ " # copy overlay manifests -ENV OVERLAY_WS /opt/overlay_ws -COPY --from=cache /tmp/overlay_ws $OVERLAY_WS +ARG OVERLAY_WS WORKDIR $OVERLAY_WS +COPY --from=cache /tmp/$OVERLAY_WS/src ./src # install overlay dependencies RUN . $UNDERLAY_WS/install/setup.sh && \ @@ -105,7 +107,7 @@ RUN . $UNDERLAY_WS/install/setup.sh && \ && rm -rf /var/lib/apt/lists/* # copy overlay source -COPY --from=cache $OVERLAY_WS ./ +COPY --from=cache $OVERLAY_WS/src ./src # build overlay source ARG OVERLAY_MIXINS="release ccache" @@ -136,6 +138,7 @@ COPY configs configs COPY .gazebo /root/.gazebo # source overlay workspace from entrypoint +ENV OVERLAY_WS $OVERLAY_WS RUN sed --in-place \ 's|^source .*|source "$OVERLAY_WS/install/setup.bash"|' \ /ros_entrypoint.sh && \ diff --git a/install/underlay.repos b/install/underlay.repos index 472e333..3a1d020 100644 --- a/install/underlay.repos +++ b/install/underlay.repos @@ -13,10 +13,8 @@ repositories: version: ros2 ros-perception/vision_opencv: type: git - # url: https://github.com/ros-perception/vision_opencv.git - # version: ros2 - url: https://github.com/LewisLiuPub/vision_opencv.git - version: ros2_cv4 + url: https://github.com/ros-perception/vision_opencv.git + version: ros2 ros-planning/navigation2: type: git url: https://github.com/ros-planning/navigation2.git From 5ca3279e794d7924ef8f7e7d97be72fc938a334a Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 30 Apr 2020 15:12:25 -0700 Subject: [PATCH 10/49] Tweek Dockerfile formating --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d694d0..e5a2299 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,22 +9,22 @@ FROM $FROM_IMAGE AS cache ARG UNDERLAY_WS WORKDIR $UNDERLAY_WS/src COPY ./install/underlay.repos ../ -RUN vcs import ./ < ../underlay.repos \ - && find ./ -name ".git" | xargs rm -rf +RUN vcs import ./ < ../underlay.repos && \ + find ./ -name ".git" | xargs rm -rf # copy overlay source ARG OVERLAY_WS WORKDIR $OVERLAY_WS/src COPY ./install/overlay.repos ../ -RUN vcs import ./ < ../overlay.repos \ - && find ./ -name ".git" | xargs rm -rf +RUN vcs import ./ < ../overlay.repos && \ + find ./ -name ".git" | xargs rm -rf # copy manifests for caching WORKDIR /opt -RUN mkdir -p /tmp/opt \ - && find ./ -name "package.xml" | \ - xargs cp --parents -t /tmp/opt \ - && find ./ -name "COLCON_IGNORE" | \ +RUN mkdir -p /tmp/opt && \ + find ./ -name "package.xml" | \ + xargs cp --parents -t /tmp/opt && \ + find ./ -name "COLCON_IGNORE" | \ xargs cp --parents -t /tmp/opt || true # multi-stage for building From cc773387b8e024c639a6198d3ebcc2cd1c1f7397 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 30 Apr 2020 15:22:55 -0700 Subject: [PATCH 11/49] Clean up grouping --- Dockerfile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index e5a2299..953d465 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,12 +54,10 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \ libgazebo11-dev \ && rm -rf /var/lib/apt/lists/* -# copy underlay manifests +# install underlay dependencies ARG UNDERLAY_WS WORKDIR $UNDERLAY_WS COPY --from=cache /tmp/$UNDERLAY_WS/src ./src - -# install underlay dependencies RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ apt-get update && rosdep install -q -y \ --from-paths src \ @@ -70,10 +68,8 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ " \ && rm -rf /var/lib/apt/lists/* -# copy underlay source -COPY --from=cache $UNDERLAY_WS/src ./src - # build underlay source +COPY --from=cache $UNDERLAY_WS/src ./src ARG UNDERLAY_MIXINS="ccache release" RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ colcon build \ @@ -85,12 +81,10 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ -Wno-deprecated-declarations \ " -# copy overlay manifests +# install overlay dependencies ARG OVERLAY_WS WORKDIR $OVERLAY_WS COPY --from=cache /tmp/$OVERLAY_WS/src ./src - -# install overlay dependencies RUN . $UNDERLAY_WS/install/setup.sh && \ apt-get update && rosdep install -q -y \ --from-paths \ @@ -106,10 +100,8 @@ RUN . $UNDERLAY_WS/install/setup.sh && \ " \ && rm -rf /var/lib/apt/lists/* -# copy overlay source -COPY --from=cache $OVERLAY_WS/src ./src - # build overlay source +COPY --from=cache $OVERLAY_WS/src ./src ARG OVERLAY_MIXINS="release ccache" RUN . $UNDERLAY_WS/install/setup.sh && \ colcon build \ From df5e7c0250a590e3f95f2df5cce3c4dac56d9e01 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 30 Apr 2020 15:40:48 -0700 Subject: [PATCH 12/49] Dockerfile tweek --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 953d465..3fb89b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG UNDERLAY_WS=/opt/ros/underlay_ws ARG OVERLAY_WS=/opt/ros/overlay_ws # multi-stage for caching -FROM $FROM_IMAGE AS cache +FROM $FROM_IMAGE AS cacher # clone underlay source ARG UNDERLAY_WS @@ -28,7 +28,7 @@ RUN mkdir -p /tmp/opt && \ xargs cp --parents -t /tmp/opt || true # multi-stage for building -FROM $FROM_IMAGE AS build +FROM $FROM_IMAGE AS builder # install helpful developer tools RUN apt-get update && apt-get install -y \ @@ -57,7 +57,7 @@ RUN apt-get update && apt-get install -q -y --no-install-recommends \ # install underlay dependencies ARG UNDERLAY_WS WORKDIR $UNDERLAY_WS -COPY --from=cache /tmp/$UNDERLAY_WS/src ./src +COPY --from=cacher /tmp/$UNDERLAY_WS/src ./src RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ apt-get update && rosdep install -q -y \ --from-paths src \ @@ -69,7 +69,7 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ && rm -rf /var/lib/apt/lists/* # build underlay source -COPY --from=cache $UNDERLAY_WS/src ./src +COPY --from=cacher $UNDERLAY_WS/src ./src ARG UNDERLAY_MIXINS="ccache release" RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ colcon build \ @@ -84,7 +84,7 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ # install overlay dependencies ARG OVERLAY_WS WORKDIR $OVERLAY_WS -COPY --from=cache /tmp/$OVERLAY_WS/src ./src +COPY --from=cacher /tmp/$OVERLAY_WS/src ./src RUN . $UNDERLAY_WS/install/setup.sh && \ apt-get update && rosdep install -q -y \ --from-paths \ @@ -101,7 +101,7 @@ RUN . $UNDERLAY_WS/install/setup.sh && \ && rm -rf /var/lib/apt/lists/* # build overlay source -COPY --from=cache $OVERLAY_WS/src ./src +COPY --from=cacher $OVERLAY_WS/src ./src ARG OVERLAY_MIXINS="release ccache" RUN . $UNDERLAY_WS/install/setup.sh && \ colcon build \ From 6722ebf759e2cb4c1e6d07d1a76d79b7ff3c9f2a Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 9 Jun 2020 13:07:34 -0700 Subject: [PATCH 13/49] Update Dockerfile for foxy --- Dockerfile | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3fb89b6..641ef56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG FROM_IMAGE=osrf/ros2:nightly +ARG FROM_IMAGE=ros:foxy ARG UNDERLAY_WS=/opt/ros/underlay_ws ARG OVERLAY_WS=/opt/ros/overlay_ws @@ -44,16 +44,6 @@ RUN apt-get update && apt-get install -y \ vim \ && rm -rf /var/lib/apt/lists/* -# setup keys -RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 -# setup sources.list -RUN . /etc/os-release \ - && echo "deb http://packages.osrfoundation.org/gazebo/$ID-stable `lsb_release -sc` main" > /etc/apt/sources.list.d/gazebo-latest.list -# install gazebo packages -RUN apt-get update && apt-get install -q -y --no-install-recommends \ - libgazebo11-dev \ - && rm -rf /var/lib/apt/lists/* - # install underlay dependencies ARG UNDERLAY_WS WORKDIR $UNDERLAY_WS @@ -62,10 +52,6 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ apt-get update && rosdep install -q -y \ --from-paths src \ --ignore-src \ - --skip-keys " \ - gazebo11 \ - libgazebo11-dev \ - " \ && rm -rf /var/lib/apt/lists/* # build underlay source @@ -92,8 +78,6 @@ RUN . $UNDERLAY_WS/install/setup.sh && \ $UNDERLAY_WS/src \ --ignore-src \ --skip-keys " \ - gazebo11 \ - libgazebo11-dev \ cartographer_ros \ hls_lfcd_lds_driver \ dynamixel_sdk \ From 9940adc5eeb3685220d5b75466bebb30cc121e09 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 9 Jun 2020 13:08:39 -0700 Subject: [PATCH 14/49] Prune underlay --- install/underlay.repos | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/install/underlay.repos b/install/underlay.repos index 3a1d020..32a7a8c 100644 --- a/install/underlay.repos +++ b/install/underlay.repos @@ -1,20 +1,4 @@ repositories: - BehaviorTree/BehaviorTree.CPP: - type: git - url: https://github.com/BehaviorTree/BehaviorTree.CPP.git - version: ros2-3.1.1 - ros/angles: - type: git - url: https://github.com/ros/angles.git - version: ros2 - ros-perception/image_common: - type: git - url: https://github.com/ros-perception/image_common.git - version: ros2 - ros-perception/vision_opencv: - type: git - url: https://github.com/ros-perception/vision_opencv.git - version: ros2 ros-planning/navigation2: type: git url: https://github.com/ros-planning/navigation2.git @@ -22,5 +6,4 @@ repositories: ros-simulation/gazebo_ros_pkgs: type: git url: https://github.com/ros-simulation/gazebo_ros_pkgs.git - # version: ros2 - version: gazebo11_foxy + version: ros2 From c643a0d06f7a4d7d8ac764af3cd0af6107314ea2 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 15:06:22 -0700 Subject: [PATCH 15/49] Remove underlay as nav2 has been released in foxy --- Dockerfile | 36 ++---------------------------------- install/underlay.repos | 9 --------- 2 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 install/underlay.repos diff --git a/Dockerfile b/Dockerfile index 641ef56..702d2f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,9 @@ ARG FROM_IMAGE=ros:foxy -ARG UNDERLAY_WS=/opt/ros/underlay_ws ARG OVERLAY_WS=/opt/ros/overlay_ws # multi-stage for caching FROM $FROM_IMAGE AS cacher -# clone underlay source -ARG UNDERLAY_WS -WORKDIR $UNDERLAY_WS/src -COPY ./install/underlay.repos ../ -RUN vcs import ./ < ../underlay.repos && \ - find ./ -name ".git" | xargs rm -rf - # copy overlay source ARG OVERLAY_WS WORKDIR $OVERLAY_WS/src @@ -44,38 +36,14 @@ RUN apt-get update && apt-get install -y \ vim \ && rm -rf /var/lib/apt/lists/* -# install underlay dependencies -ARG UNDERLAY_WS -WORKDIR $UNDERLAY_WS -COPY --from=cacher /tmp/$UNDERLAY_WS/src ./src -RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ - apt-get update && rosdep install -q -y \ - --from-paths src \ - --ignore-src \ - && rm -rf /var/lib/apt/lists/* - -# build underlay source -COPY --from=cacher $UNDERLAY_WS/src ./src -ARG UNDERLAY_MIXINS="ccache release" -RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ - colcon build \ - --symlink-install \ - --mixin $UNDERLAY_MIXINS \ - --cmake-args \ - --no-warn-unused-cli \ - -DCMAKE_CXX_FLAGS=" \ - -Wno-deprecated-declarations \ - " - # install overlay dependencies ARG OVERLAY_WS WORKDIR $OVERLAY_WS COPY --from=cacher /tmp/$OVERLAY_WS/src ./src -RUN . $UNDERLAY_WS/install/setup.sh && \ +RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ apt-get update && rosdep install -q -y \ --from-paths \ src \ - $UNDERLAY_WS/src \ --ignore-src \ --skip-keys " \ cartographer_ros \ @@ -87,7 +55,7 @@ RUN . $UNDERLAY_WS/install/setup.sh && \ # build overlay source COPY --from=cacher $OVERLAY_WS/src ./src ARG OVERLAY_MIXINS="release ccache" -RUN . $UNDERLAY_WS/install/setup.sh && \ +RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ colcon build \ --symlink-install \ --mixin $OVERLAY_MIXINS \ diff --git a/install/underlay.repos b/install/underlay.repos deleted file mode 100644 index 32a7a8c..0000000 --- a/install/underlay.repos +++ /dev/null @@ -1,9 +0,0 @@ -repositories: - ros-planning/navigation2: - type: git - url: https://github.com/ros-planning/navigation2.git - version: master - ros-simulation/gazebo_ros_pkgs: - type: git - url: https://github.com/ros-simulation/gazebo_ros_pkgs.git - version: ros2 From 8ef77491a89ed7c68815af2aa7523baee92dc2dd Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 15:07:08 -0700 Subject: [PATCH 16/49] Remove duplicate maps files --- Dockerfile | 1 - maps/map.pgm | Bin 15046 -> 0 bytes maps/map.yaml | 7 ------- 3 files changed, 8 deletions(-) delete mode 100644 maps/map.pgm delete mode 100644 maps/map.yaml diff --git a/Dockerfile b/Dockerfile index 702d2f0..60865ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -77,7 +77,6 @@ COPY policies policies # -n /_ros2cli # copy demo files -COPY maps maps COPY configs configs COPY .gazebo /root/.gazebo diff --git a/maps/map.pgm b/maps/map.pgm deleted file mode 100644 index 555a42e105cada637b606883ab4e52d593ee59f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15046 zcmeH~!HOF(42E;gQv`b7ZWdB#Z>8+HW$C>vrH39CLJOrYnO6#xteIxU`ZZ&DH145e z*kt0^`t<*n9q*^p{?*~b)8qTkAD`YGUY^fiem?*D_T%pB`Fyy)yFc9@US6NS|K1-T z-W-m{xBG|FX@A+;=D_BF?Z8f&Jz&jmI(Wg`8d>ai9Cddo!1IvU6n497VWSlPA)S*9 z#+OSMheE9U=r zq0+sZFRYMdFYe0~D;~5W zIxaaf1bD)gJcvK@Sbzr%4$3pNDXCZS!N8PP5gjR@|KFINfl@e?6OX&Vi^(ir5hNFh zn1{r4VdP^u4*5F$Tc?zCPVlPd(&YeCGjL8R&J10J>fj7g@FYfe^H6I2%;7tAPlz`r z4Fimx88qrhAE;C3B*SLtI#x|jR-LyHseTOkR>rs4i=S-q(8k5QaR6I9TEp?&fKQhA z2EJ4FhWHk~vv*j06W=ZIt)ye|t)xTm+msxyI}qQ_cT7)NHF;4*-%`5X@C{2&@Ara| z1tG?g_(G&daVR~NMpyqBDy_qM^eDm;LZlrlroMc2636~GY& z3ZYIKtKbO_CvfEXh9bgnR%gBz-MAt+d2dX&Xl4ELB`3x#7LU>?^PLk|Lwup{Ob4}u z^f>y;rLTc6m%aks0}scS*1J@F^ve6B2aET@xkMcmJw4P@@A2NdrL*->o8DP+qMjy6 zTe<`l($k68;ip%1?%O(exBk`j*IT!YPWU-_==&geUH!3TF|9^?7`#S2`5vR3qWHxJ z!u{eS;coG9B`3@0^FCI3I`sz|cK`$@SuI$oVIkv;Hg0WPR*L*c{j#a69k^ Duig}t diff --git a/maps/map.yaml b/maps/map.yaml deleted file mode 100644 index d8dd99d..0000000 --- a/maps/map.yaml +++ /dev/null @@ -1,7 +0,0 @@ -image: ./map.pgm -resolution: 0.050000 -origin: [-4.019254, -2.259888, 0.000000] -negate: 0 -occupied_thresh: 0.65 -free_thresh: 0.196 - From 5b46f7d6f5b704331bec37be37ad5390ad750ab4 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 15:41:39 -0700 Subject: [PATCH 17/49] Use nav2 package launch files --- Dockerfile | 1 - configs/common.conf | 4 ++-- install/overlay.repos | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60865ac..5cb0fc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,6 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ --mixin $OVERLAY_MIXINS \ --packages-up-to \ "turtlebot3_simulations" \ - "turtlebot3_navigation2" \ "turtlebot3_teleop" \ --packages-skip \ "turtlebot3_node" \ diff --git a/configs/common.conf b/configs/common.conf index 55c2692..07ac7e5 100644 --- a/configs/common.conf +++ b/configs/common.conf @@ -1,6 +1,6 @@ # setup secure session new-window -n turtlebot -send-keys 'ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py' Enter +send-keys 'gzclient' Enter split-window -h send-keys 'ros2 run turtlebot3_teleop teleop_keyboard' Enter @@ -13,7 +13,7 @@ select-pane -t 1 # create navigation window new-window -n navigation -send-keys 'ros2 launch turtlebot3_navigation2 navigation2.launch.py use_sim_time:=true map:=maps/map.yaml' # Enter +send-keys 'ros2 launch nav2_bringup tb3_simulation_launch.py headless:=True' Enter split-window -h send-keys 'configs/initial_pose.sh' diff --git a/install/overlay.repos b/install/overlay.repos index 9e014f7..a770a54 100644 --- a/install/overlay.repos +++ b/install/overlay.repos @@ -15,4 +15,3 @@ repositories: # version: ros2 url: https://github.com/ruffsl/turtlebot3_simulations.git version: navigation2_simulation -#2 \ No newline at end of file From c4fc4b2cd588b9b9602485075e16e3f5d870bec7 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 16:20:29 -0700 Subject: [PATCH 18/49] Switch to slam_toolbox from cartographer --- Dockerfile | 9 +++++---- configs/common.conf | 4 ++-- install/overlay.repos | 4 ++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5cb0fc4..045e468 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,11 +60,12 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ --symlink-install \ --mixin $OVERLAY_MIXINS \ --packages-up-to \ - "turtlebot3_simulations" \ - "turtlebot3_teleop" \ + slam_toolbox \ + turtlebot3_simulations \ + turtlebot3_teleop \ --packages-skip \ - "turtlebot3_node" \ - "turtlebot3" + turtlebot3_node \ + turtlebot3 # generate artifacts for keystore ENV TB3_DEMO_DIR $OVERLAY_WS/.. diff --git a/configs/common.conf b/configs/common.conf index 07ac7e5..ce7bb9e 100644 --- a/configs/common.conf +++ b/configs/common.conf @@ -26,7 +26,7 @@ select-pane -t 1 # create mapping window new-window -n mapping -send-keys 'ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=true' Enter +send-keys 'ros2 launch nav2_bringup tb3_simulation_launch.py headless:=True slam:=True' # Enter split-window -h send-keys 'ros2 run nav2_map_server map_saver -f maps/map' @@ -34,7 +34,7 @@ send-keys 'ros2 run nav2_map_server map_saver -f maps/map' split-window -v send-keys 'ros2 topic info /map' -# Select cartographer pane +# Select slam_toolbox pane select-pane -t 0 # create sros window diff --git a/install/overlay.repos b/install/overlay.repos index a770a54..231443a 100644 --- a/install/overlay.repos +++ b/install/overlay.repos @@ -15,3 +15,7 @@ repositories: # version: ros2 url: https://github.com/ruffsl/turtlebot3_simulations.git version: navigation2_simulation + SteveMacenski/slam_toolbox: + type: git + url: https://github.com/SteveMacenski/slam_toolbox.git + version: foxy-devel From 899eb0852e14b63d9f9f66c83b99a4d2e9456bd0 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 16:22:40 -0700 Subject: [PATCH 19/49] Clean config from old reconnaissance demo --- configs/common.conf | 9 --------- 1 file changed, 9 deletions(-) diff --git a/configs/common.conf b/configs/common.conf index ce7bb9e..7d2db1a 100644 --- a/configs/common.conf +++ b/configs/common.conf @@ -47,15 +47,6 @@ send-keys 'ros2 security generate_artifacts -k keystore -p policies/tb3_gazebo_p split-window -v send-keys 'env | grep ROS' Enter -new-window -n reconnaissance -send-keys 'aztarna -t ros2' - -split-window -h -send-keys 'tshark -i eth0 -f "udp" -Y "rtps"' - -# Select ROS2 reconnaissance pane -select-pane -t 0 - # create rqt window new-window -n rqt send-keys 'ROS_SECURITY_NODE_DIRECTORY=$TB3_DEMO_DIR/keystore/_ros2cli rqt' From 5533388ddc238582d4587f3540a2edf21c40d314 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 17:07:54 -0700 Subject: [PATCH 20/49] Update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 16501b5..f1302b5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Secure Turtlebot3 Demo -This repository includes a demo for securing a simulated Turtlebot3 using SROS2; including sensor and control topics as well the relevant portions of the cartographer and navigation2 software stacks. +This repository includes a demo for securing a simulated Turtlebot3 using SROS2; including sensor and control topics as well the relevant portions of the slam_toolbox and navigation2 software stacks. ## Setting the Demo @@ -41,7 +41,7 @@ Byobu starts a new session and launch the turtlebot3 demo over several windows: * initialize pose script * navigation goal script * `mapping` - * cartographer mapping stack + * slam_toolbox mapping stack * save map file * map topic info * `sros` @@ -55,7 +55,7 @@ You can first drive the robot around and generate a map using the teleoperation [![](media/mapping3.png)](media/mapping.mp4) -Feel free to poke around, open a new window and list or echo topics and services. You can explore the other panes as well, for example you can stop cartographer in the `mapping` window and start the navigation launchfile from the `navigation` window. You will stat by localizing the robot by initializing the pose and then setting a navigation goal via the scripts in the respective window panes. This can also be done graphically via rviz. +Feel free to poke around, open a new window and list or echo topics and services. You can explore the other panes as well, for example you can stop slam_toolbox in the `mapping` window and start the navigation launchfile from the `navigation` window. You will stat by localizing the robot by initializing the pose and then setting a navigation goal via the scripts in the respective window panes. This can also be done graphically via rviz. [![](media/localize.png)](media/localize.mp4) From 365b6174c1b5301f2e9943e8b81d70fba7b89be9 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 17:11:54 -0700 Subject: [PATCH 21/49] Update and stage autogenerated policy --- Dockerfile | 7 +- policies/tb3_gazebo_policy.xml | 1950 +++++++++++++++++--------------- 2 files changed, 1040 insertions(+), 917 deletions(-) diff --git a/Dockerfile b/Dockerfile index 045e468..c1e07e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,10 +71,9 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ ENV TB3_DEMO_DIR $OVERLAY_WS/.. WORKDIR $TB3_DEMO_DIR COPY policies policies -# RUN . $OVERLAY_WS/install/setup.sh && \ -# ros2 security generate_artifacts -k keystore \ -# -p policies/tb3_gazebo_policy.xml \ -# -n /_ros2cli +RUN . $OVERLAY_WS/install/setup.sh && \ + ros2 security generate_artifacts -k keystore \ + -p policies/tb3_gazebo_policy.xml # copy demo files COPY configs configs diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index 9c3d615..3131763 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -1,914 +1,1038 @@ - - - - - global_costmap/clear_entirely_global_costmap - - - parameter_events - rosout - - - parameter_events - - - - - local_costmap/clear_entirely_local_costmap - - - parameter_events - rosout - - - parameter_events - - - - - ~/change_state - ~/describe_parameters - ~/get_available_states - ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters - ~/get_state - ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - global_localization - request_nomotion_update - - - ~/transition_event - amcl_pose - parameter_events - particlecloud - rosout - - - clock - initialpose - map - parameter_events - tf - tf_static - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - tf - - - clock - parameter_events - scan - - - - - ~/change_state - ~/describe_parameters - ~/get_available_states - ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters - ~/get_state - ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - ~/transition_event - parameter_events - rosout - - - clock - parameter_events - - - - - ComputePathToPose - FollowPath - NavigateToPose - Spin - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - amcl_pose - odom - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - global_localization - - - parameter_events - rosout - - - parameter_events - - - - - NavigateToPose - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - move_base_simple/goal - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - finish_trajectory - start_trajectory - submap_query - write_state - - - constraint_list - landmark_poses_list - parameter_events - rosout - scan_matched_points2 - submap_list - tf - trajectory_node_list - - - clock - imu - odom - parameter_events - scan - tf - tf_static - - - - - ~/change_state - ~/describe_parameters - ~/get_available_states - ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters - ~/get_state - ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - cmd_vel - cost_cloud - ~/transition_event - evaluation - local_plan - marker - parameter_events - received_global_plan - rosout - transformed_global_plan - - - clock - odom - parameter_events - - - - - FollowPath - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - pause_physics - reset_simulation - reset_world - unpause_physics - - - clock - parameter_events - rosout - - - clock - parameter_events - - - - - clear_around_global_costmap - clear_entirely_global_costmap - clear_except_global_costmap - ~/change_state - ~/describe_parameters - ~/get_available_states - ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters - ~/get_state - ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - costmap - costmap_raw - costmap_updates - ~/transition_event - parameter_events - published_footprint - rosout - - - /clock - footprint - parameter_events - /map - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - /clock - parameter_events - /scan - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - ~/shutdown - ~/startup - - - parameter_events - rosout - - - clock - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - amcl/change_state - amcl/get_state - bt_navigator/change_state - bt_navigator/get_state - dwb_controller/change_state - dwb_controller/get_state - map_server/change_state - map_server/get_state - navfn_planner/change_state - navfn_planner/get_state - world_model/change_state - world_model/get_state - - - parameter_events - rosout - - - parameter_events - - - - - clear_around_local_costmap - clear_entirely_local_costmap - clear_except_local_costmap - ~/change_state - ~/describe_parameters - ~/get_available_states - ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters - ~/get_state - ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - costmap - costmap_raw - costmap_updates - ~/transition_event - parameter_events - published_footprint - rosout - - - /clock - footprint - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - /clock - parameter_events - /scan - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - map - parameter_events - - - - - map - ~/change_state - ~/describe_parameters - ~/get_available_states - ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters - ~/get_state - ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - map - ~/transition_event - parameter_events - rosout - - - clock - parameter_events - - - - - ~/change_state - ~/describe_parameters - ~/get_available_states - ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters - ~/get_state - ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - endpoints - ~/transition_event - parameter_events - plan - rosout - - - clock - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - GetCostmap - - - parameter_events - rosout - - - clock - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - GetRobotPose - - - parameter_events - rosout - - - parameter_events - - - - - ComputePathToPose - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - parameter_events - - - - - NavigateToPose - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - clock - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - submap_query - - - map - parameter_events - rosout - - - clock - parameter_events - submap_list - - - - - BackUp - Spin - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - cmd_vel - parameter_events - rosout - - - amcl_pose - clock - global_costmap/costmap_raw - global_costmap/published_footprint - odom - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - GetRobotPose - - - parameter_events - rosout - - - clock - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - robot_description - rosout - tf - tf_static - - - clock - joint_states - parameter_events - - - - - NavigateToPose - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - lifecycle_manager/shutdown - lifecycle_manager/startup - - - clicked_point - initialpose - goal - parameter_events - rosout - - - clock - constraint_list - endpoints - endpoints_array - global_costmap/costmap - global_costmap/costmap_updates - landmark_poses_list - local_costmap/costmap - local_costmap/costmap_updates - local_costmap/published_footprint - local_plan - map - map_updates - marker - mobile_base/sensors/bumper_pointcloud - parameter_events - particlecloud - plan - robot_description - scan - scan_matched_points2 - tf - tf_static - trajectory_node_list - visualization_marker_array - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - cmd_vel - parameter_events - rosout - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - - - parameter_events - tf - tf_static - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - odom - parameter_events - rosout - tf - - - clock - cmd_vel - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - imu - parameter_events - rosout - - - clock - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - joint_states - parameter_events - rosout - - - clock - parameter_events - - - - - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - scan - - - clock - parameter_events - - - - - GetCostmap - GetRobotPose - ~/change_state - ~/describe_parameters - ~/get_available_states - ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters - ~/get_state - ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - - - parameter_events - rosout - ~/transition_event - - - clock - parameter_events - - - + + + + + + + reinitialize_global_localization + request_nomotion_update + ~/change_state + ~/describe_parameters + ~/get_available_states + ~/get_available_transitions + ~/get_parameter_types + ~/get_parameters + ~/get_state + ~/get_transition_graph + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + initialpose + map + parameter_events + + + amcl_pose + parameter_events + particle_cloud + particlecloud + rosout + ~/transition_event + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + scan + + + parameter_events + rosout + tf + + + + + /navigate_to_pose/_action/cancel_goal + /navigate_to_pose/_action/get_result + /navigate_to_pose/_action/send_goal + ~/change_state + ~/describe_parameters + ~/get_available_states + ~/get_available_transitions + ~/get_parameter_types + ~/get_parameters + ~/get_state + ~/get_transition_graph + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + goal_pose + parameter_events + tf + tf_static + + + /navigate_to_pose/_action/feedback + /navigate_to_pose/_action/status + parameter_events + rosout + ~/transition_event + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /compute_path_to_pose/_action/cancel_goal + /compute_path_to_pose/_action/get_result + /compute_path_to_pose/_action/send_goal + /follow_path/_action/cancel_goal + /follow_path/_action/get_result + /follow_path/_action/send_goal + /global_costmap/clear_entirely_global_costmap + /local_costmap/clear_entirely_local_costmap + /navigate_to_pose/_action/cancel_goal + /navigate_to_pose/_action/get_result + /navigate_to_pose/_action/send_goal + /spin/_action/cancel_goal + /spin/_action/get_result + /spin/_action/send_goal + /wait/_action/cancel_goal + /wait/_action/get_result + /wait/_action/send_goal + + + /compute_path_to_pose/_action/feedback + /compute_path_to_pose/_action/status + /follow_path/_action/feedback + /follow_path/_action/status + /navigate_to_pose/_action/feedback + /navigate_to_pose/_action/status + /spin/_action/feedback + /spin/_action/status + /wait/_action/feedback + /wait/_action/status + clock + parameter_events + + + behavior_tree_log + parameter_events + rosout + + + + + ~/change_state + ~/describe_parameters + ~/get_available_states + ~/get_available_transitions + ~/get_parameter_types + ~/get_parameters + ~/get_state + ~/get_transition_graph + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + odom + parameter_events + + + cmd_vel + cost_cloud + evaluation + local_plan + marker + parameter_events + received_global_plan + rosout + transformed_global_plan + ~/transition_event + + + + + /follow_path/_action/cancel_goal + /follow_path/_action/get_result + /follow_path/_action/send_goal + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + /follow_path/_action/feedback + /follow_path/_action/status + parameter_events + rosout + + + + + pause_physics + reset_simulation + reset_world + unpause_physics + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + clock + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + parameter_events + + + parameter_events + rosout + + + + + clear_around_global_costmap + clear_entirely_global_costmap + clear_except_global_costmap + get_costmap + ~/change_state + ~/describe_parameters + ~/get_available_states + ~/get_available_transitions + ~/get_parameter_types + ~/get_parameters + ~/get_state + ~/get_transition_graph + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /clock + /map + footprint + parameter_events + + + /parameter_events + /rosout + clearing_endpoints + costmap + costmap_raw + costmap_updates + published_footprint + voxel_grid + ~/transition_event + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /clock + /intel_realsense_r200_depth/points + /scan + parameter_events + + + /parameter_events + /rosout + + + + + set_camera_info + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + /intel_realsense_r200_depth/camera_info + /intel_realsense_r200_depth/depth/camera_info + /intel_realsense_r200_depth/depth/image_raw + /intel_realsense_r200_depth/image_raw + /intel_realsense_r200_depth/points + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/is_active + ~/list_parameters + ~/manage_nodes + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /amcl/change_state + /amcl/get_state + /map_server/change_state + /map_server/get_state + + + clock + parameter_events + + + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/is_active + ~/list_parameters + ~/manage_nodes + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /bt_navigator/change_state + /bt_navigator/get_state + /controller_server/change_state + /controller_server/get_state + /planner_server/change_state + /planner_server/get_state + /recoveries_server/change_state + /recoveries_server/get_state + /waypoint_follower/change_state + /waypoint_follower/get_state + + + clock + parameter_events + + + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/is_active + ~/list_parameters + ~/manage_nodes + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /map_saver/change_state + /map_saver/get_state + + + clock + parameter_events + + + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + parameter_events + + + parameter_events + rosout + + + + + clear_around_local_costmap + clear_entirely_local_costmap + clear_except_local_costmap + get_costmap + ~/change_state + ~/describe_parameters + ~/get_available_states + ~/get_available_transitions + ~/get_parameter_types + ~/get_parameters + ~/get_state + ~/get_transition_graph + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /clock + footprint + parameter_events + + + /parameter_events + /rosout + clearing_endpoints + costmap + costmap_raw + costmap_updates + published_footprint + voxel_grid + ~/transition_event + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /clock + /intel_realsense_r200_depth/points + /scan + parameter_events + + + /parameter_events + /rosout + + + + + ~/change_state + ~/describe_parameters + ~/get_available_states + ~/get_available_transitions + ~/get_parameter_types + ~/get_parameters + ~/get_state + ~/get_transition_graph + ~/list_parameters + ~/save_map + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + parameter_events + rosout + ~/transition_event + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + parameter_events + + + parameter_events + rosout + + + + + ~/change_state + ~/describe_parameters + ~/get_available_states + ~/get_available_transitions + ~/get_parameter_types + ~/get_parameters + ~/get_state + ~/get_transition_graph + ~/list_parameters + ~/load_map + ~/map + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + map + parameter_events + rosout + ~/transition_event + + + + + ~/change_state + ~/describe_parameters + ~/get_available_states + ~/get_available_transitions + ~/get_parameter_types + ~/get_parameters + ~/get_state + ~/get_transition_graph + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + parameter_events + plan + rosout + ~/transition_event + + + + + /compute_path_to_pose/_action/cancel_goal + /compute_path_to_pose/_action/get_result + /compute_path_to_pose/_action/send_goal + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + /compute_path_to_pose/_action/feedback + /compute_path_to_pose/_action/status + parameter_events + rosout + + + + + /backup/_action/cancel_goal + /backup/_action/get_result + /backup/_action/send_goal + /spin/_action/cancel_goal + /spin/_action/get_result + /spin/_action/send_goal + /wait/_action/cancel_goal + /wait/_action/get_result + /wait/_action/send_goal + ~/change_state + ~/describe_parameters + ~/get_available_states + ~/get_available_transitions + ~/get_parameter_types + ~/get_parameters + ~/get_state + ~/get_transition_graph + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /local_costmap/costmap_raw + /local_costmap/published_footprint + clock + parameter_events + + + /backup/_action/feedback + /backup/_action/status + /spin/_action/feedback + /spin/_action/status + /wait/_action/feedback + /wait/_action/status + cmd_vel + parameter_events + rosout + ~/transition_event + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + parameter_events + + + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + joint_states + parameter_events + + + parameter_events + robot_description + rosout + tf + tf_static + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /FollowWaypoints/_action/cancel_goal + /FollowWaypoints/_action/get_result + /FollowWaypoints/_action/send_goal + /lifecycle_manager_localization/is_active + /lifecycle_manager_localization/manage_nodes + /lifecycle_manager_navigation/is_active + /lifecycle_manager_navigation/manage_nodes + /navigate_to_pose/_action/cancel_goal + /navigate_to_pose/_action/get_result + /navigate_to_pose/_action/send_goal + + + /FollowWaypoints/_action/feedback + /FollowWaypoints/_action/status + /global_costmap/costmap + /global_costmap/costmap_updates + /global_costmap/voxel_marked_cloud + /local_costmap/costmap + /local_costmap/costmap_updates + /local_costmap/published_footprint + /local_costmap/voxel_marked_cloud + /mobile_base/sensors/bumper_pointcloud + /navigate_to_pose/_action/feedback + /navigate_to_pose/_action/status + local_plan + map + map_updates + parameter_events + particlecloud + plan + scan + waypoints + + + clicked_point + initialpose + parameter_events + rosout + waypoints + + + + + clear_queue + deserialize_map + dynamic_map + pause_new_measurements + save_map + serialize_map + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + map + parameter_events + scan + + + graph_visualization + map + map_metadata + parameter_events + rosout + tf + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + cmd_vel + parameter_events + rosout + + + + + parameter_events + tf + tf_static + + + rosout + + + + + parameter_events + tf + tf_static + + + rosout + + + + + parameter_events + tf + tf_static + + + rosout + + + + + parameter_events + tf + tf_static + + + rosout + + + + + parameter_events + tf + tf_static + + + rosout + + + + + parameter_events + tf + tf_static + + + rosout + + + + + parameter_events + tf + tf_static + + + rosout + + + + + parameter_events + tf + tf_static + + + rosout + + + + + clock + parameter_events + tf + tf_static + + + rosout + + + + + parameter_events + tf + tf_static + + + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + cmd_vel + parameter_events + + + odom + parameter_events + rosout + tf + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + imu + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + joint_states + parameter_events + rosout + + + + + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + clock + parameter_events + + + parameter_events + rosout + scan + + + + + /FollowWaypoints/_action/cancel_goal + /FollowWaypoints/_action/get_result + /FollowWaypoints/_action/send_goal + ~/change_state + ~/describe_parameters + ~/get_available_states + ~/get_available_transitions + ~/get_parameter_types + ~/get_parameters + ~/get_state + ~/get_transition_graph + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically + + + /navigate_to_pose/_action/cancel_goal + /navigate_to_pose/_action/get_result + /navigate_to_pose/_action/send_goal + + + /navigate_to_pose/_action/feedback + /navigate_to_pose/_action/status + parameter_events + + + /FollowWaypoints/_action/feedback + /FollowWaypoints/_action/status + parameter_events + rosout + ~/transition_event + + + + + From 0dd1fbe48d00ab53eed312c06f3f8d8570cb5278 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 17:15:46 -0700 Subject: [PATCH 22/49] Remove ephermal nodes --- policies/tb3_gazebo_policy.xml | 93 +--------------------------------- 1 file changed, 1 insertion(+), 92 deletions(-) diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index 3131763..91324c0 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -818,98 +818,7 @@ rosout - - - parameter_events - tf - tf_static - - - rosout - - - - - parameter_events - tf - tf_static - - - rosout - - - - - parameter_events - tf - tf_static - - - rosout - - - - - parameter_events - tf - tf_static - - - rosout - - - - - parameter_events - tf - tf_static - - - rosout - - - - - parameter_events - tf - tf_static - - - rosout - - - - - parameter_events - tf - tf_static - - - rosout - - - - - parameter_events - tf - tf_static - - - rosout - - - - - clock - parameter_events - tf - tf_static - - - rosout - - - + parameter_events tf From 9cd2ba671aef9bf21d5ac8c60b5617f62be933bc Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 17:27:56 -0700 Subject: [PATCH 23/49] Substitute include node macro --- policies/tb3_gazebo_policy.xml | 425 ++++++--------------------------- 1 file changed, 72 insertions(+), 353 deletions(-) diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index 91324c0..7a0538e 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -3,96 +3,68 @@ + reinitialize_global_localization request_nomotion_update ~/change_state - ~/describe_parameters ~/get_available_states ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters ~/get_state ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock initialpose map - parameter_events amcl_pose - parameter_events particle_cloud particlecloud - rosout ~/transition_event + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events scan - parameter_events - rosout tf + /navigate_to_pose/_action/cancel_goal /navigate_to_pose/_action/get_result /navigate_to_pose/_action/send_goal ~/change_state - ~/describe_parameters ~/get_available_states ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters ~/get_state ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock goal_pose - parameter_events tf tf_static /navigate_to_pose/_action/feedback /navigate_to_pose/_action/status - parameter_events - rosout ~/transition_event + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically /compute_path_to_pose/_action/cancel_goal @@ -124,41 +96,25 @@ /spin/_action/status /wait/_action/feedback /wait/_action/status - clock - parameter_events behavior_tree_log - parameter_events - rosout + ~/change_state - ~/describe_parameters ~/get_available_states ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters ~/get_state ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock odom - parameter_events cmd_vel @@ -166,99 +122,67 @@ evaluation local_plan marker - parameter_events received_global_plan - rosout transformed_global_plan ~/transition_event + /follow_path/_action/cancel_goal /follow_path/_action/get_result /follow_path/_action/send_goal - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events /follow_path/_action/feedback /follow_path/_action/status - parameter_events - rosout + pause_physics reset_simulation reset_world unpause_physics - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events - clock - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - parameter_events - parameter_events - rosout + clear_around_global_costmap clear_entirely_global_costmap clear_except_global_costmap get_costmap ~/change_state - ~/describe_parameters ~/get_available_states ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters ~/get_state ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - /clock /map footprint - parameter_events /parameter_events @@ -273,19 +197,13 @@ + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - /clock /intel_realsense_r200_depth/points /scan - parameter_events /parameter_events @@ -293,18 +211,12 @@ + set_camera_info - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events /intel_realsense_r200_depth/camera_info @@ -312,38 +224,24 @@ /intel_realsense_r200_depth/depth/image_raw /intel_realsense_r200_depth/image_raw /intel_realsense_r200_depth/points - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters ~/is_active - ~/list_parameters ~/manage_nodes - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically /amcl/change_state @@ -352,42 +250,26 @@ /map_server/get_state - clock - parameter_events - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters ~/is_active - ~/list_parameters ~/manage_nodes - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically /bt_navigator/change_state @@ -402,95 +284,62 @@ /waypoint_follower/get_state - clock - parameter_events - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters ~/is_active - ~/list_parameters ~/manage_nodes - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically /map_saver/change_state /map_saver/get_state - clock - parameter_events - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - parameter_events - parameter_events - rosout + clear_around_local_costmap clear_entirely_local_costmap clear_except_local_costmap get_costmap ~/change_state - ~/describe_parameters ~/get_available_states ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters ~/get_state ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - /clock footprint - parameter_events /parameter_events @@ -505,19 +354,13 @@ + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - /clock /intel_realsense_r200_depth/points /scan - parameter_events /parameter_events @@ -525,123 +368,86 @@ + ~/change_state - ~/describe_parameters ~/get_available_states ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters ~/get_state ~/get_transition_graph - ~/list_parameters ~/save_map - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events - parameter_events - rosout ~/transition_event + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - parameter_events - parameter_events - rosout + ~/change_state - ~/describe_parameters ~/get_available_states ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters ~/get_state ~/get_transition_graph - ~/list_parameters ~/load_map ~/map - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events map - parameter_events - rosout ~/transition_event + ~/change_state - ~/describe_parameters ~/get_available_states ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters ~/get_state ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events - parameter_events plan - rosout ~/transition_event + /compute_path_to_pose/_action/cancel_goal /compute_path_to_pose/_action/get_result /compute_path_to_pose/_action/send_goal - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events /compute_path_to_pose/_action/feedback /compute_path_to_pose/_action/status - parameter_events - rosout + /backup/_action/cancel_goal /backup/_action/get_result @@ -653,22 +459,14 @@ /wait/_action/get_result /wait/_action/send_goal ~/change_state - ~/describe_parameters ~/get_available_states ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters ~/get_state ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically /local_costmap/costmap_raw /local_costmap/published_footprint - clock - parameter_events /backup/_action/feedback @@ -678,58 +476,37 @@ /wait/_action/feedback /wait/_action/status cmd_vel - parameter_events - rosout ~/transition_event + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - parameter_events - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock joint_states - parameter_events - parameter_events robot_description - rosout tf tf_static + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically /FollowWaypoints/_action/cancel_goal @@ -759,7 +536,6 @@ local_plan map map_updates - parameter_events particlecloud plan scan @@ -768,12 +544,12 @@ clicked_point initialpose - parameter_events - rosout waypoints + clear_queue deserialize_map @@ -781,147 +557,93 @@ pause_new_measurements save_map serialize_map - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock map - parameter_events scan graph_visualization map map_metadata - parameter_events - rosout tf + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically cmd_vel - parameter_events - rosout - parameter_events tf tf_static - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock cmd_vel - parameter_events odom - parameter_events - rosout tf + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events imu - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events joint_states - parameter_events - rosout + - ~/describe_parameters - ~/get_parameter_types - ~/get_parameters - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically - clock - parameter_events - parameter_events - rosout scan + /FollowWaypoints/_action/cancel_goal /FollowWaypoints/_action/get_result /FollowWaypoints/_action/send_goal ~/change_state - ~/describe_parameters ~/get_available_states ~/get_available_transitions - ~/get_parameter_types - ~/get_parameters ~/get_state ~/get_transition_graph - ~/list_parameters - ~/set_parameters - ~/set_parameters_atomically /navigate_to_pose/_action/cancel_goal @@ -931,13 +653,10 @@ /navigate_to_pose/_action/feedback /navigate_to_pose/_action/status - parameter_events /FollowWaypoints/_action/feedback /FollowWaypoints/_action/status - parameter_events - rosout ~/transition_event From 20b0c90a5ba4fd88a429b2f71f923015a7e259d8 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 17:34:32 -0700 Subject: [PATCH 24/49] Substitute include lifecycle_node macro --- policies/tb3_gazebo_policy.xml | 80 +++++----------------------------- 1 file changed, 10 insertions(+), 70 deletions(-) diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index 7a0538e..8acc1d2 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -3,16 +3,11 @@ - reinitialize_global_localization request_nomotion_update - ~/change_state - ~/get_available_states - ~/get_available_transitions - ~/get_state - ~/get_transition_graph initialpose @@ -22,7 +17,6 @@ amcl_pose particle_cloud particlecloud - ~/transition_event @@ -38,17 +32,12 @@ - /navigate_to_pose/_action/cancel_goal /navigate_to_pose/_action/get_result /navigate_to_pose/_action/send_goal - ~/change_state - ~/get_available_states - ~/get_available_transitions - ~/get_state - ~/get_transition_graph goal_pose @@ -58,7 +47,6 @@ /navigate_to_pose/_action/feedback /navigate_to_pose/_action/status - ~/transition_event @@ -102,14 +90,9 @@ - - ~/change_state - ~/get_available_states - ~/get_available_transitions - ~/get_state - ~/get_transition_graph @@ -124,7 +107,6 @@ marker received_global_plan transformed_global_plan - ~/transition_event @@ -167,18 +149,13 @@ - clear_around_global_costmap clear_entirely_global_costmap clear_except_global_costmap get_costmap - ~/change_state - ~/get_available_states - ~/get_available_transitions - ~/get_state - ~/get_transition_graph /map @@ -193,7 +170,6 @@ costmap_updates published_footprint voxel_grid - ~/transition_event @@ -325,18 +301,13 @@ - clear_around_local_costmap clear_entirely_local_costmap clear_except_local_costmap get_costmap - ~/change_state - ~/get_available_states - ~/get_available_transitions - ~/get_state - ~/get_transition_graph footprint @@ -350,11 +321,10 @@ costmap_updates published_footprint voxel_grid - ~/transition_event - @@ -371,21 +341,15 @@ - ~/change_state - ~/get_available_states - ~/get_available_transitions - ~/get_state - ~/get_transition_graph ~/save_map - ~/transition_event - @@ -398,11 +362,6 @@ - ~/change_state - ~/get_available_states - ~/get_available_transitions - ~/get_state - ~/get_transition_graph ~/load_map ~/map @@ -410,24 +369,17 @@ map - ~/transition_event - - ~/change_state - ~/get_available_states - ~/get_available_transitions - ~/get_state - ~/get_transition_graph plan - ~/transition_event @@ -446,7 +398,7 @@ - /backup/_action/cancel_goal @@ -458,11 +410,6 @@ /wait/_action/cancel_goal /wait/_action/get_result /wait/_action/send_goal - ~/change_state - ~/get_available_states - ~/get_available_transitions - ~/get_state - ~/get_transition_graph /local_costmap/costmap_raw @@ -476,7 +423,6 @@ /wait/_action/feedback /wait/_action/status cmd_vel - ~/transition_event @@ -633,17 +579,12 @@ - /FollowWaypoints/_action/cancel_goal /FollowWaypoints/_action/get_result /FollowWaypoints/_action/send_goal - ~/change_state - ~/get_available_states - ~/get_available_transitions - ~/get_state - ~/get_transition_graph /navigate_to_pose/_action/cancel_goal @@ -657,7 +598,6 @@ /FollowWaypoints/_action/feedback /FollowWaypoints/_action/status - ~/transition_event From 9d6bf39ab3a173b9d1390f3b3574262734fd1bc1 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 17:39:03 -0700 Subject: [PATCH 25/49] Prune empty rule elements --- policies/tb3_gazebo_policy.xml | 108 --------------------------------- 1 file changed, 108 deletions(-) diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index 8acc1d2..1678298 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -22,8 +22,6 @@ - - scan @@ -52,8 +50,6 @@ - - /compute_path_to_pose/_action/cancel_goal /compute_path_to_pose/_action/get_result @@ -92,10 +88,6 @@ - - - - odom @@ -117,8 +109,6 @@ /follow_path/_action/get_result /follow_path/_action/send_goal - - /follow_path/_action/feedback /follow_path/_action/status @@ -133,20 +123,10 @@ reset_world unpause_physics - - - - - - - - - - - - /intel_realsense_r200_depth/points /scan @@ -192,8 +170,6 @@ set_camera_info - - /intel_realsense_r200_depth/camera_info /intel_realsense_r200_depth/depth/camera_info @@ -209,26 +185,16 @@ ~/is_active ~/manage_nodes - - - - - - /amcl/change_state /amcl/get_state /map_server/change_state /map_server/get_state - - - - ~/is_active ~/manage_nodes - - - - - - /bt_navigator/change_state /bt_navigator/get_state @@ -259,10 +219,6 @@ /waypoint_follower/change_state /waypoint_follower/get_state - - - - ~/is_active ~/manage_nodes - - - - - - /map_saver/change_state /map_saver/get_state - - - - - - - - - - - - /intel_realsense_r200_depth/points /scan @@ -343,20 +281,10 @@ ~/save_map - - - - - - - - - - ~/load_map ~/map - - map @@ -374,10 +300,6 @@ - - - - plan @@ -390,8 +312,6 @@ /compute_path_to_pose/_action/get_result /compute_path_to_pose/_action/send_goal - - /compute_path_to_pose/_action/feedback /compute_path_to_pose/_action/status @@ -428,18 +348,10 @@ - - - - - - - - joint_states @@ -452,8 +364,6 @@ - - /FollowWaypoints/_action/cancel_goal /FollowWaypoints/_action/get_result @@ -518,8 +428,6 @@ - - cmd_vel @@ -529,14 +437,10 @@ tf tf_static - - - - cmd_vel @@ -548,10 +452,6 @@ - - - - imu @@ -559,10 +459,6 @@ - - - - joint_states @@ -570,10 +466,6 @@ - - - - scan From cb88f40ca0c7491ab64aa512e4f8692c632e6f70 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 17:44:42 -0700 Subject: [PATCH 26/49] Fix xinclude in xml header --- policies/tb3_gazebo_policy.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index 1678298..b99beca 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -1,4 +1,6 @@ - + + From 0842dfc039c3c906e85d7e89e6f4731253a23e8f Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 18:05:41 -0700 Subject: [PATCH 27/49] Use actions tag in policy --- policies/tb3_gazebo_policy.xml | 130 ++++++++------------------------- 1 file changed, 31 insertions(+), 99 deletions(-) diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index b99beca..cae757c 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -34,55 +34,29 @@ - - /navigate_to_pose/_action/cancel_goal - /navigate_to_pose/_action/get_result - /navigate_to_pose/_action/send_goal - + + /navigate_to_pose + goal_pose tf tf_static - - /navigate_to_pose/_action/feedback - /navigate_to_pose/_action/status - + + /compute_path_to_pose + /follow_path + /navigate_to_pose + /spin + /wait + - /compute_path_to_pose/_action/cancel_goal - /compute_path_to_pose/_action/get_result - /compute_path_to_pose/_action/send_goal - /follow_path/_action/cancel_goal - /follow_path/_action/get_result - /follow_path/_action/send_goal /global_costmap/clear_entirely_global_costmap /local_costmap/clear_entirely_local_costmap - /navigate_to_pose/_action/cancel_goal - /navigate_to_pose/_action/get_result - /navigate_to_pose/_action/send_goal - /spin/_action/cancel_goal - /spin/_action/get_result - /spin/_action/send_goal - /wait/_action/cancel_goal - /wait/_action/get_result - /wait/_action/send_goal - - /compute_path_to_pose/_action/feedback - /compute_path_to_pose/_action/status - /follow_path/_action/feedback - /follow_path/_action/status - /navigate_to_pose/_action/feedback - /navigate_to_pose/_action/status - /spin/_action/feedback - /spin/_action/status - /wait/_action/feedback - /wait/_action/status - behavior_tree_log @@ -106,15 +80,9 @@ - - /follow_path/_action/cancel_goal - /follow_path/_action/get_result - /follow_path/_action/send_goal - - - /follow_path/_action/feedback - /follow_path/_action/status - + + /follow_path + - - /compute_path_to_pose/_action/cancel_goal - /compute_path_to_pose/_action/get_result - /compute_path_to_pose/_action/send_goal - - - /compute_path_to_pose/_action/feedback - /compute_path_to_pose/_action/status - + + /compute_path_to_pose + - - /backup/_action/cancel_goal - /backup/_action/get_result - /backup/_action/send_goal - /spin/_action/cancel_goal - /spin/_action/get_result - /spin/_action/send_goal - /wait/_action/cancel_goal - /wait/_action/get_result - /wait/_action/send_goal - + + /backup + /spin + /wait + /local_costmap/costmap_raw /local_costmap/published_footprint - /backup/_action/feedback - /backup/_action/status - /spin/_action/feedback - /spin/_action/status - /wait/_action/feedback - /wait/_action/status cmd_vel @@ -366,21 +316,17 @@ + + /FollowWaypoints + /navigate_to_pose + - /FollowWaypoints/_action/cancel_goal - /FollowWaypoints/_action/get_result - /FollowWaypoints/_action/send_goal /lifecycle_manager_localization/is_active /lifecycle_manager_localization/manage_nodes /lifecycle_manager_navigation/is_active /lifecycle_manager_navigation/manage_nodes - /navigate_to_pose/_action/cancel_goal - /navigate_to_pose/_action/get_result - /navigate_to_pose/_action/send_goal - /FollowWaypoints/_action/feedback - /FollowWaypoints/_action/status /global_costmap/costmap /global_costmap/costmap_updates /global_costmap/voxel_marked_cloud @@ -389,8 +335,6 @@ /local_costmap/published_footprint /local_costmap/voxel_marked_cloud /mobile_base/sensors/bumper_pointcloud - /navigate_to_pose/_action/feedback - /navigate_to_pose/_action/status local_plan map map_updates @@ -475,24 +419,12 @@ - - /FollowWaypoints/_action/cancel_goal - /FollowWaypoints/_action/get_result - /FollowWaypoints/_action/send_goal - - - /navigate_to_pose/_action/cancel_goal - /navigate_to_pose/_action/get_result - /navigate_to_pose/_action/send_goal - - - /navigate_to_pose/_action/feedback - /navigate_to_pose/_action/status - - - /FollowWaypoints/_action/feedback - /FollowWaypoints/_action/status - + + /navigate_to_pose + + + /FollowWaypoints + From c5ff665d6a1abbde1d26e05b6c3bca3eef70d15b Mon Sep 17 00:00:00 2001 From: ruffsl Date: Fri, 17 Jul 2020 18:22:11 -0700 Subject: [PATCH 28/49] Update sros2 env --- configs/secure.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/secure.conf b/configs/secure.conf index f73ad45..2f2543e 100644 --- a/configs/secure.conf +++ b/configs/secure.conf @@ -7,7 +7,7 @@ send-keys 'glances' Enter setenv FOO "foo" setenv ROS_SECURITY_ENABLE true setenv ROS_SECURITY_STRATEGY Enforce -setenv ROS_SECURITY_ROOT_DIRECTORY $TB3_DEMO_DIR/keystore -setenv ROS_SECURITY_LOOKUP_TYPE MATCH_PREFIX +setenv ROS_SECURITY_KEYSTORE $TB3_DEMO_DIR/keystore +setenv ROS_SECURITY_ENCLAVE_OVERRIDE / source configs/common.conf \ No newline at end of file From 1d76c2a951ffd68667496a51fad7395670754f78 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Sat, 18 Jul 2020 13:42:40 +0200 Subject: [PATCH 29/49] update rosdep database before installing dependencies Signed-off-by: Mikael Arguedas --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c1e07e5..c8535d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,8 @@ ARG OVERLAY_WS WORKDIR $OVERLAY_WS COPY --from=cacher /tmp/$OVERLAY_WS/src ./src RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ - apt-get update && rosdep install -q -y \ + apt-get -qq update && rosdep update --rosdistro $ROS_DISTRO && \ + rosdep install -q -y \ --from-paths \ src \ --ignore-src \ From 5d624aafff00065a8b787f30097b90493ae66b23 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Sat, 18 Jul 2020 13:48:53 +0200 Subject: [PATCH 30/49] copy common policies from sros2 Signed-off-by: Mikael Arguedas --- policies/common/lifecycle_node.xml | 12 ++++++------ policies/common/node/parameters.xml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/policies/common/lifecycle_node.xml b/policies/common/lifecycle_node.xml index 3c14bec..6dbe1c0 100644 --- a/policies/common/lifecycle_node.xml +++ b/policies/common/lifecycle_node.xml @@ -4,13 +4,13 @@ - ~change_state - ~get_available_states - ~get_available_transitions - ~get_state - ~get_transition_graph + ~/change_state + ~/get_available_states + ~/get_available_transitions + ~/get_state + ~/get_transition_graph - ~transition_event + ~/transition_event diff --git a/policies/common/node/parameters.xml b/policies/common/node/parameters.xml index f6ef2bb..dbed939 100644 --- a/policies/common/node/parameters.xml +++ b/policies/common/node/parameters.xml @@ -5,11 +5,11 @@ - ~describe_parameters - ~get_parameter_types - ~get_parameters - ~list_parameters - ~set_parameters - ~set_parameters_atomically + ~/describe_parameters + ~/get_parameter_types + ~/get_parameters + ~/list_parameters + ~/set_parameters + ~/set_parameters_atomically From 1b8329beb492f62db2acbc5af857539d8d87dd35 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Sat, 18 Jul 2020 14:25:37 +0200 Subject: [PATCH 31/49] map_server is a lifecycle node, gazebo publishes clock, missing RViZ subscription Signed-off-by: Mikael Arguedas --- policies/tb3_gazebo_policy.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index cae757c..c7dad64 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -93,6 +93,9 @@ reset_world unpause_physics + + /clock + - ~/load_map @@ -341,6 +344,7 @@ particlecloud plan scan + visualization_marker_array waypoints From 60ea750153ddcca0069058da13da43def4d8f2fe Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 23 Jul 2020 15:47:55 -0700 Subject: [PATCH 32/49] Use released package for slam-toolbox --- Dockerfile | 5 +++-- install/overlay.repos | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index c8535d7..6cd5cd4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,9 @@ ARG OVERLAY_WS WORKDIR $OVERLAY_WS COPY --from=cacher /tmp/$OVERLAY_WS/src ./src RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ - apt-get -qq update && rosdep update --rosdistro $ROS_DISTRO && \ + apt-get -qq update && apt-get install -y \ + ros-$ROS_DISTRO-slam-toolbox && \ + rosdep update --rosdistro $ROS_DISTRO && \ rosdep install -q -y \ --from-paths \ src \ @@ -61,7 +63,6 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ --symlink-install \ --mixin $OVERLAY_MIXINS \ --packages-up-to \ - slam_toolbox \ turtlebot3_simulations \ turtlebot3_teleop \ --packages-skip \ diff --git a/install/overlay.repos b/install/overlay.repos index 231443a..a770a54 100644 --- a/install/overlay.repos +++ b/install/overlay.repos @@ -15,7 +15,3 @@ repositories: # version: ros2 url: https://github.com/ruffsl/turtlebot3_simulations.git version: navigation2_simulation - SteveMacenski/slam_toolbox: - type: git - url: https://github.com/SteveMacenski/slam_toolbox.git - version: foxy-devel From a7982b36f2b53cee77da4b025e01fe1faf057ee2 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 23 Jul 2020 16:14:21 -0700 Subject: [PATCH 33/49] Updates for map saver --- configs/common.conf | 5 +++-- policies/tb3_gazebo_policy.xml | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configs/common.conf b/configs/common.conf index 7d2db1a..3550ec4 100644 --- a/configs/common.conf +++ b/configs/common.conf @@ -29,10 +29,11 @@ new-window -n mapping send-keys 'ros2 launch nav2_bringup tb3_simulation_launch.py headless:=True slam:=True' # Enter split-window -h -send-keys 'ros2 run nav2_map_server map_saver -f maps/map' +send-keys 'mkdir maps' Enter +send-keys 'ros2 run nav2_map_server map_saver_cli -f maps/my_map' split-window -v -send-keys 'ros2 topic info /map' +send-keys 'ros2 topic info -v /map' # Select slam_toolbox pane select-pane -t 0 diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index c7dad64..3417520 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -258,6 +258,9 @@ + + map + Date: Thu, 23 Jul 2020 17:28:56 -0700 Subject: [PATCH 34/49] Update debug config --- configs/debug.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/debug.conf b/configs/debug.conf index a99d46f..414a4e9 100644 --- a/configs/debug.conf +++ b/configs/debug.conf @@ -7,7 +7,7 @@ send-keys 'glances' Enter setenv FOO "foo" setenv ROS_SECURITY_ENABLE true setenv ROS_SECURITY_STRATEGY Enforce -setenv ROS_SECURITY_NODE_DIRECTORY $TB3_DEMO_DIR/keystore/_ros2cli -setenv ROS_SECURITY_LOOKUP_TYPE MATCH_PREFIX +setenv ROS_SECURITY_KEYSTORE $TB3_DEMO_DIR/keystore +setenv ROS_SECURITY_ENCLAVE_OVERRIDE / source configs/common.conf From d93e80a87775650e3dd56685031b5bede2c8a3a2 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 23 Jul 2020 17:29:30 -0700 Subject: [PATCH 35/49] Update nav2 scripts --- configs/initial_pose.sh | 4 ++-- configs/navigate_to_pose.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/initial_pose.sh b/configs/initial_pose.sh index e4ab72c..be109e6 100755 --- a/configs/initial_pose.sh +++ b/configs/initial_pose.sh @@ -6,8 +6,8 @@ header: pose: pose: position: - x: -2.7 - y: 0.4 + x: -2.0 + y: -0.5 z: 0.0 orientation: x: 0.0 diff --git a/configs/navigate_to_pose.sh b/configs/navigate_to_pose.sh index 7935903..cce0e25 100755 --- a/configs/navigate_to_pose.sh +++ b/configs/navigate_to_pose.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -ros2 action send_goal /NavigateToPose nav2_msgs/action/NavigateToPose " +ros2 action send_goal /navigate_to_pose nav2_msgs/action/NavigateToPose " pose: pose: position: From ff6ec0130401b5ea42405661a1e6e3abd3dbbf08 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 23 Jul 2020 20:35:03 -0700 Subject: [PATCH 36/49] Add option to use rti connext --- Dockerfile | 22 ++++++++++++++++++++ configs/secure.conf | 1 + configs/unsecure.conf | 1 + rti/.gitignore | 4 ++++ rti/NDDS_QOS_PROFILES.xml | 43 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 71 insertions(+) create mode 100644 rti/.gitignore create mode 100644 rti/NDDS_QOS_PROFILES.xml diff --git a/Dockerfile b/Dockerfile index 6cd5cd4..4fe66ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,6 +69,28 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ turtlebot3_node \ turtlebot3 +# # install RTI Connext +# ENV RTI_NC_LICENSE_ACCEPTED yes +# RUN apt-get update && apt-get install -y \ +# ros-$ROS_DISTRO-rmw-connext-cpp \ +# && rm -rf /var/lib/apt/lists/* +# # set up environment +# ENV NDDSHOME /opt/rti.com/rti_connext_dds-5.3.1 +# ENV PATH "$NDDSHOME/bin":$PATH +# ENV LD_LIBRARY_PATH "$NDDSHOME/lib/x64Linux3gcc5.4.0":$LD_LIBRARY_PATH +# # install RTI Security +# WORKDIR $NDDSHOME +# # ADD https://s3.amazonaws.com/RTI/Bundles/5.3.1/Evaluation/rti_connext_dds_secure-5.3.1-eval-x64Linux3gcc5.4.0.tar.gz ./ +# # RUN tar -xvf rti_connext_dds_secure-5.3.1-eval-x64Linux3gcc5.4.0.tar.gz -C ./ +# COPY ./rti ./ +# RUN rtipkginstall rti_security_plugins-5.3.1-eval-x64Linux3gcc5.4.0.rtipkg && \ +# rtipkginstall openssl-1.0.2n-5.3.1-host-x64Linux.rtipkg && \ +# tar -xvf openssl-1.0.2n-target-x64Linux3gcc5.4.0.tar.gz +# ENV PATH "$NDDSHOME/openssl-1.0.2n/x64Linux3gcc5.4.0/release/bin":$PATH +# ENV LD_LIBRARY_PATH "$NDDSHOME/openssl-1.0.2n/x64Linux3gcc5.4.0/release/lib":$LD_LIBRARY_PATH +# # install RTI QoS +# ENV NDDS_QOS_PROFILES "$NDDSHOME/NDDS_QOS_PROFILES.xml" + # generate artifacts for keystore ENV TB3_DEMO_DIR $OVERLAY_WS/.. WORKDIR $TB3_DEMO_DIR diff --git a/configs/secure.conf b/configs/secure.conf index 2f2543e..90c3be0 100644 --- a/configs/secure.conf +++ b/configs/secure.conf @@ -5,6 +5,7 @@ new-session -s secure -n diagnostic -d send-keys 'glances' Enter setenv FOO "foo" +# setenv RMW_IMPLEMENTATION rmw_connext_cpp setenv ROS_SECURITY_ENABLE true setenv ROS_SECURITY_STRATEGY Enforce setenv ROS_SECURITY_KEYSTORE $TB3_DEMO_DIR/keystore diff --git a/configs/unsecure.conf b/configs/unsecure.conf index a2b5a54..ce955b7 100644 --- a/configs/unsecure.conf +++ b/configs/unsecure.conf @@ -5,5 +5,6 @@ new-session -s secure -n diagnostic -d send-keys 'glances' Enter setenv FOO "foo" +# setenv RMW_IMPLEMENTATION rmw_connext_cpp source configs/common.conf \ No newline at end of file diff --git a/rti/.gitignore b/rti/.gitignore new file mode 100644 index 0000000..87e7c5a --- /dev/null +++ b/rti/.gitignore @@ -0,0 +1,4 @@ +*.dat +*.rtipkg +*.run +*.tar.gz \ No newline at end of file diff --git a/rti/NDDS_QOS_PROFILES.xml b/rti/NDDS_QOS_PROFILES.xml new file mode 100644 index 0000000..cc90467 --- /dev/null +++ b/rti/NDDS_QOS_PROFILES.xml @@ -0,0 +1,43 @@ + + + + + + ALL + ALL + TIMESTAMPED + /tmp/log.xml + + + + + 65535 + + + + + dds.transport.UDPv4.builtin.parent.message_size_max + 65535 + + + dds.transport.UDPv4.builtin.send_socket_buffer_size + 65535 + + + dds.transport.UDPv4.builtin.recv_socket_buffer_size + 65535 + + + dds.transport.shmem.builtin.parent.message_size_max + 65535 + + + dds.transport.shmem.builtin.receive_buffer_size + 65535 + + + + + + + \ No newline at end of file From 40857f5a467758436182dda3cb38cbd8e390458f Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 23 Jul 2020 20:35:22 -0700 Subject: [PATCH 37/49] Add option for admin profile --- policies/tb3_gazebo_policy.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index 3417520..769cee9 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -4,6 +4,14 @@ + From 19fac4ae0e935d391da28ecbc314e6818225f3b5 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 23 Jul 2020 20:37:52 -0700 Subject: [PATCH 38/49] Fix newlines --- configs/secure.conf | 2 +- configs/unsecure.conf | 2 +- rti/.gitignore | 2 +- rti/NDDS_QOS_PROFILES.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/secure.conf b/configs/secure.conf index 90c3be0..a59c885 100644 --- a/configs/secure.conf +++ b/configs/secure.conf @@ -11,4 +11,4 @@ setenv ROS_SECURITY_STRATEGY Enforce setenv ROS_SECURITY_KEYSTORE $TB3_DEMO_DIR/keystore setenv ROS_SECURITY_ENCLAVE_OVERRIDE / -source configs/common.conf \ No newline at end of file +source configs/common.conf diff --git a/configs/unsecure.conf b/configs/unsecure.conf index ce955b7..0aa4c1c 100644 --- a/configs/unsecure.conf +++ b/configs/unsecure.conf @@ -7,4 +7,4 @@ send-keys 'glances' Enter setenv FOO "foo" # setenv RMW_IMPLEMENTATION rmw_connext_cpp -source configs/common.conf \ No newline at end of file +source configs/common.conf diff --git a/rti/.gitignore b/rti/.gitignore index 87e7c5a..73d1538 100644 --- a/rti/.gitignore +++ b/rti/.gitignore @@ -1,4 +1,4 @@ *.dat *.rtipkg *.run -*.tar.gz \ No newline at end of file +*.tar.gz diff --git a/rti/NDDS_QOS_PROFILES.xml b/rti/NDDS_QOS_PROFILES.xml index cc90467..7fc45d5 100644 --- a/rti/NDDS_QOS_PROFILES.xml +++ b/rti/NDDS_QOS_PROFILES.xml @@ -40,4 +40,4 @@ - \ No newline at end of file + From d55b8e7837438288f4b99c83cf0230ae465405f3 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 1 Mar 2021 16:51:44 -0800 Subject: [PATCH 39/49] Set DEBIAN_FRONTEND to noninteractive --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 4fe66ec..9097f12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ RUN mkdir -p /tmp/opt && \ # multi-stage for building FROM $FROM_IMAGE AS builder +ARG DEBIAN_FRONTEND=noninteractive # install helpful developer tools RUN apt-get update && apt-get install -y \ From f3dd64a1d1f859545843bd73d8ca176c2acb2102 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 1 Mar 2021 16:53:24 -0800 Subject: [PATCH 40/49] Rename repos folder --- {install => overlay}/overlay.repos | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {install => overlay}/overlay.repos (100%) diff --git a/install/overlay.repos b/overlay/overlay.repos similarity index 100% rename from install/overlay.repos rename to overlay/overlay.repos From 244a8298c0e2d1f6464d9e6293449e9b6e7afccf Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 1 Mar 2021 16:57:08 -0800 Subject: [PATCH 41/49] Add meta package for demo --- overlay/src/turtlebot3_demo/CMakeLists.txt | 4 +++ overlay/src/turtlebot3_demo/package.xml | 30 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 overlay/src/turtlebot3_demo/CMakeLists.txt create mode 100644 overlay/src/turtlebot3_demo/package.xml diff --git a/overlay/src/turtlebot3_demo/CMakeLists.txt b/overlay/src/turtlebot3_demo/CMakeLists.txt new file mode 100644 index 0000000..3f964a4 --- /dev/null +++ b/overlay/src/turtlebot3_demo/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.5) +project(turtlebot3_demo) +find_package(ament_cmake REQUIRED) +ament_package() \ No newline at end of file diff --git a/overlay/src/turtlebot3_demo/package.xml b/overlay/src/turtlebot3_demo/package.xml new file mode 100644 index 0000000..dd6552b --- /dev/null +++ b/overlay/src/turtlebot3_demo/package.xml @@ -0,0 +1,30 @@ + + + + turtlebot3_demo + + 0.0.0 + + + ROS 2 packages for TurtleBot3 demo + + + Apache 2.0 + + https://github.com/ros-swg/turtlebot3_demo + https://github.com/ros-swg/turtlebot3_demo/issues + + Ruffin White + Ruffin White + Mikael Arguedas + + ament_cmake + + navigation2 + slam_toolbox + turtlebot3_simulations + + + ament_cmake + + \ No newline at end of file From e3ed186a9f91267655b6cf383049f347eda8e9ea Mon Sep 17 00:00:00 2001 From: ruffsl Date: Mon, 1 Mar 2021 16:57:40 -0800 Subject: [PATCH 42/49] Comment out uneeded repos --- overlay/overlay.repos | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/overlay/overlay.repos b/overlay/overlay.repos index a770a54..1ebdded 100644 --- a/overlay/overlay.repos +++ b/overlay/overlay.repos @@ -1,17 +1,17 @@ repositories: - ROBOTIS-GIT/turtlebot3: - type: git - # url: https://github.com/ROBOTIS-GIT/turtlebot3.git - # version: ros2 - url: https://github.com/ruffsl/turtlebot3.git - version: navigation2_simulation - ROBOTIS-GIT/turtlebot3_msgs: - type: git - url: https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git - version: ros2 - ROBOTIS-GIT/turtlebot3_simulations: - type: git - # url: https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git - # version: ros2 - url: https://github.com/ruffsl/turtlebot3_simulations.git - version: navigation2_simulation + # ROBOTIS-GIT/turtlebot3: + # type: git + # # url: https://github.com/ROBOTIS-GIT/turtlebot3.git + # # version: ros2 + # url: https://github.com/ruffsl/turtlebot3.git + # version: navigation2_simulation + # ROBOTIS-GIT/turtlebot3_msgs: + # type: git + # url: https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git + # version: ros2 + # ROBOTIS-GIT/turtlebot3_simulations: + # type: git + # # url: https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git + # # version: ros2 + # url: https://github.com/ruffsl/turtlebot3_simulations.git + # version: navigation2_simulation From 15eb7e0a80ebb87daf99912d36821041c70df055 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 2 Mar 2021 12:23:42 -0800 Subject: [PATCH 43/49] Install from release binaries --- Dockerfile | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9097f12..4b92966 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,10 +6,10 @@ FROM $FROM_IMAGE AS cacher # copy overlay source ARG OVERLAY_WS -WORKDIR $OVERLAY_WS/src -COPY ./install/overlay.repos ../ -RUN vcs import ./ < ../overlay.repos && \ - find ./ -name ".git" | xargs rm -rf +WORKDIR $OVERLAY_WS +COPY ./overlay ./ +RUN vcs import src < overlay.repos && \ + find src -name ".git" | xargs rm -rf || true # copy manifests for caching WORKDIR /opt @@ -42,18 +42,11 @@ ARG OVERLAY_WS WORKDIR $OVERLAY_WS COPY --from=cacher /tmp/$OVERLAY_WS/src ./src RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ - apt-get -qq update && apt-get install -y \ - ros-$ROS_DISTRO-slam-toolbox && \ - rosdep update --rosdistro $ROS_DISTRO && \ + apt-get update && rosdep update \ + --rosdistro $ROS_DISTRO && \ rosdep install -q -y \ - --from-paths \ - src \ + --from-paths src \ --ignore-src \ - --skip-keys " \ - cartographer_ros \ - hls_lfcd_lds_driver \ - dynamixel_sdk \ - " \ && rm -rf /var/lib/apt/lists/* # build overlay source @@ -62,13 +55,7 @@ ARG OVERLAY_MIXINS="release ccache" RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ colcon build \ --symlink-install \ - --mixin $OVERLAY_MIXINS \ - --packages-up-to \ - turtlebot3_simulations \ - turtlebot3_teleop \ - --packages-skip \ - turtlebot3_node \ - turtlebot3 + --mixin $OVERLAY_MIXINS # # install RTI Connext # ENV RTI_NC_LICENSE_ACCEPTED yes From 951e632291c48346d24d939fea7ebb2e9a75bee0 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 2 Mar 2021 12:26:59 -0800 Subject: [PATCH 44/49] Launch gazebo from turtlebot3_gazebo as nav2_bringup seems fails to load entire world --- configs/common.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/common.conf b/configs/common.conf index 3550ec4..0e1373b 100644 --- a/configs/common.conf +++ b/configs/common.conf @@ -1,6 +1,6 @@ # setup secure session new-window -n turtlebot -send-keys 'gzclient' Enter +send-keys 'ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py' Enter split-window -h send-keys 'ros2 run turtlebot3_teleop teleop_keyboard' Enter @@ -13,7 +13,7 @@ select-pane -t 1 # create navigation window new-window -n navigation -send-keys 'ros2 launch nav2_bringup tb3_simulation_launch.py headless:=True' Enter +send-keys 'ros2 launch nav2_bringup tb3_simulation_launch.py use_simulator:=False' Enter split-window -h send-keys 'configs/initial_pose.sh' @@ -26,7 +26,7 @@ select-pane -t 1 # create mapping window new-window -n mapping -send-keys 'ros2 launch nav2_bringup tb3_simulation_launch.py headless:=True slam:=True' # Enter +send-keys 'ros2 launch nav2_bringup tb3_simulation_launch.py use_simulator:=False slam:=True' # Enter split-window -h send-keys 'mkdir maps' Enter From 7bb75519ded9f9727583d6c512e32914a67e5581 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 2 Mar 2021 12:43:27 -0800 Subject: [PATCH 45/49] Upgrade when installing dependencies --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 4b92966..2e2553e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,6 +44,7 @@ COPY --from=cacher /tmp/$OVERLAY_WS/src ./src RUN . /opt/ros/$ROS_DISTRO/setup.sh && \ apt-get update && rosdep update \ --rosdistro $ROS_DISTRO && \ + apt-get upgrade -y && \ rosdep install -q -y \ --from-paths src \ --ignore-src \ From 66a44ec62e1bee353eeec0824dec4b8944f76ea2 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 2 Mar 2021 14:44:49 -0800 Subject: [PATCH 46/49] Add option to use rmw_connextdds --- Dockerfile | 15 +++++++++++++++ configs/secure.conf | 1 + configs/unsecure.conf | 1 + overlay/overlay.repos | 4 ++++ 4 files changed, 21 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2e2553e..18c71f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,6 +37,21 @@ RUN apt-get update && apt-get install -y \ vim \ && rm -rf /var/lib/apt/lists/* +# # install RTI Connext DDS +# # set up environment +# ENV NDDSHOME /opt/rti.com/rti_connext_dds-6.0.1 +# WORKDIR $NDDSHOME +# COPY ./rti ./ +# RUN yes | ./rti_connext_dds-6.0.1-eval-x64Linux3gcc5.4.0.run && \ +# mv y/*/* ./ && rm -rf y +# # set RTI DDS environment +# ENV CONNEXTDDS_DIR $NDDSHOME +# ENV PATH "$NDDSHOME/bin":$PATH +# ENV LD_LIBRARY_PATH "$NDDSHOME/lib/x64Linux3gcc5.4.0":$LD_LIBRARY_PATH +# # set RTI openssl environment +# ENV PATH "$NDDSHOME/third_party/openssl-1.1.1d/x64Linux4gcc7.3.0/release/bin":$PATH +# ENV LD_LIBRARY_PATH "$NDDSHOME/third_party/openssl-1.1.1d/x64Linux4gcc7.3.0/release/lib":$LD_LIBRARY_PATH + # install overlay dependencies ARG OVERLAY_WS WORKDIR $OVERLAY_WS diff --git a/configs/secure.conf b/configs/secure.conf index a59c885..b77a0d0 100644 --- a/configs/secure.conf +++ b/configs/secure.conf @@ -6,6 +6,7 @@ send-keys 'glances' Enter setenv FOO "foo" # setenv RMW_IMPLEMENTATION rmw_connext_cpp +# setenv RMW_IMPLEMENTATION rmw_connextdds setenv ROS_SECURITY_ENABLE true setenv ROS_SECURITY_STRATEGY Enforce setenv ROS_SECURITY_KEYSTORE $TB3_DEMO_DIR/keystore diff --git a/configs/unsecure.conf b/configs/unsecure.conf index 0aa4c1c..013fd54 100644 --- a/configs/unsecure.conf +++ b/configs/unsecure.conf @@ -6,5 +6,6 @@ send-keys 'glances' Enter setenv FOO "foo" # setenv RMW_IMPLEMENTATION rmw_connext_cpp +# setenv RMW_IMPLEMENTATION rmw_connextdds source configs/common.conf diff --git a/overlay/overlay.repos b/overlay/overlay.repos index 1ebdded..7ab9b81 100644 --- a/overlay/overlay.repos +++ b/overlay/overlay.repos @@ -1,4 +1,8 @@ repositories: + # rticommunity/rmw_connextdds: + # type: git + # url: https://github.com/rticommunity/rmw_connextdds.git + # version: master # ROBOTIS-GIT/turtlebot3: # type: git # # url: https://github.com/ROBOTIS-GIT/turtlebot3.git From d46b623aa1039b90793b736f71d8a8d1c2ce60f5 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 2 Mar 2021 14:56:02 -0800 Subject: [PATCH 47/49] Default to admin profile for now --- policies/tb3_gazebo_policy.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index 769cee9..a27c3a8 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -4,15 +4,15 @@ - - + + From eae58c01ef61497afdb0c0d659077cc9e7c27625 Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 2 Mar 2021 15:48:58 -0800 Subject: [PATCH 48/49] Update admin enclave for rqt --- configs/common.conf | 4 ++-- policies/tb3_gazebo_policy.xml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/configs/common.conf b/configs/common.conf index 0e1373b..4c2db22 100644 --- a/configs/common.conf +++ b/configs/common.conf @@ -43,14 +43,14 @@ new-window -n sros send-keys 'tree keystore -d' Enter split-window -h -send-keys 'ros2 security generate_artifacts -k keystore -p policies/tb3_gazebo_policy.xml -n /_ros2cli' +send-keys 'ros2 security generate_artifacts -k keystore -p policies/tb3_gazebo_policy.xml -e /admin' split-window -v send-keys 'env | grep ROS' Enter # create rqt window new-window -n rqt -send-keys 'ROS_SECURITY_NODE_DIRECTORY=$TB3_DEMO_DIR/keystore/_ros2cli rqt' +send-keys 'ROS_SECURITY_ENCLAVE_OVERRIDE=/admin rqt' # reselect turtlebot window (the one with teleop) select-window -t turtlebot diff --git a/policies/tb3_gazebo_policy.xml b/policies/tb3_gazebo_policy.xml index a27c3a8..04aec40 100644 --- a/policies/tb3_gazebo_policy.xml +++ b/policies/tb3_gazebo_policy.xml @@ -443,5 +443,17 @@ --> + + + + + * + + + * + + + + From 5314f1484519d8b74e856742b5f32a4d9fffa9eb Mon Sep 17 00:00:00 2001 From: ruffsl Date: Tue, 2 Mar 2021 15:49:46 -0800 Subject: [PATCH 49/49] Depend on desktop for rqt plugins and etc --- overlay/src/turtlebot3_demo/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/overlay/src/turtlebot3_demo/package.xml b/overlay/src/turtlebot3_demo/package.xml index dd6552b..ba9b4c7 100644 --- a/overlay/src/turtlebot3_demo/package.xml +++ b/overlay/src/turtlebot3_demo/package.xml @@ -21,6 +21,7 @@ ament_cmake navigation2 + desktop slam_toolbox turtlebot3_simulations