From 6fd6fbf0a0835d6ec164f579cb2f00de7ae94849 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Thu, 2 Jan 2025 13:04:55 +0800 Subject: [PATCH] Efc cleanup (#163) * Bump major versions Signed-off-by: Aaron Chong * Added nav1 and nav2 to names to make it clearer Signed-off-by: Aaron Chong * Revert schedule and free fleet branch Signed-off-by: Aaron Chong --------- Signed-off-by: Aaron Chong --- .../minimal-zenoh-bridge-ros1/Dockerfile | 6 ++-- .../minimal-zenoh-bridge-ros2dds/Dockerfile | 4 +-- README.md | 33 ++++++++++--------- free_fleet/package.xml | 2 +- free_fleet_adapter/package.xml | 2 +- .../test_nav1_move_base_handler.py | 4 +-- .../integration/test_nav1_robot_adapter.py | 24 +++++++------- .../tests/integration/test_nav1_tf_handler.py | 4 +-- .../integration/test_nav2_robot_adapter.py | 20 +++++------ .../tests/integration/test_nav2_tf_handler.py | 4 +-- .../nav1_tb3_simulation_fleet_config.yaml | 7 ++-- ... => nav2_tb3_simulation_fleet_config.yaml} | 6 ++-- ...ue_multi_tb3_simulation_fleet_config.yaml} | 6 ++-- ...tb3_zenoh_bridge_ros1_client_config.json5} | 2 +- ..._zenoh_bridge_ros2dds_client_config.json5} | 2 +- ..._zenoh_bridge_ros2dds_client_config.json5} | 0 .../free_fleet_examples/nav1_get_tf.py | 1 - .../nav1_move_base_cancel.py | 1 - .../nav1_move_base_simple_goal.py | 1 - .../free_fleet_examples/nav2_get_tf.py | 1 - .../nav2_send_navigate_to_pose.py | 2 -- ...2_tb3_simulation_fleet_adapter.launch.xml} | 2 +- ...i_tb3_simulation_fleet_adapter.launch.xml} | 2 +- .../turtlebot3_world.building.yaml | 2 +- free_fleet_examples/package.xml | 2 +- 25 files changed, 70 insertions(+), 70 deletions(-) rename free_fleet_examples/config/fleet/{tb3_simulation_fleet_config.yaml => nav2_tb3_simulation_fleet_config.yaml} (94%) rename free_fleet_examples/config/fleet/{unique_multi_tb3_simulation_fleet_config.yaml => nav2_unique_multi_tb3_simulation_fleet_config.yaml} (92%) rename free_fleet_examples/config/zenoh/{turtlebot3_zenoh_bridge_ros1_client_config.json5 => nav1_tb3_zenoh_bridge_ros1_client_config.json5} (94%) rename free_fleet_examples/config/zenoh/{turtlebot3_1_zenoh_bridge_ros2dds_client_config.json5 => nav2_tb3_zenoh_bridge_ros2dds_client_config.json5} (93%) rename free_fleet_examples/config/zenoh/{unique_multi_tb3_zenoh_bridge_ros2dds_client_config.json5 => nav2_unique_multi_tb3_zenoh_bridge_ros2dds_client_config.json5} (100%) rename free_fleet_examples/launch/{tb3_simulation_fleet_adapter.launch.xml => nav2_tb3_simulation_fleet_adapter.launch.xml} (89%) rename free_fleet_examples/launch/{unique_multi_tb3_simulation_fleet_adapter.launch.xml => nav2_unique_multi_tb3_simulation_fleet_adapter.launch.xml} (88%) diff --git a/.github/docker/minimal-zenoh-bridge-ros1/Dockerfile b/.github/docker/minimal-zenoh-bridge-ros1/Dockerfile index 0d46dff3..6e45ba7b 100644 --- a/.github/docker/minimal-zenoh-bridge-ros1/Dockerfile +++ b/.github/docker/minimal-zenoh-bridge-ros1/Dockerfile @@ -19,7 +19,7 @@ RUN mkdir -p /zenoh-bridge && cd /zenoh-bridge \ && cargo build --package zenoh-bridge-ros1 --bin zenoh-bridge-ros1 --release RUN cd /zenoh-bridge \ - && wget -O turtlebot3_zenoh_bridge_ros1_client_config.json5 https://raw.githubusercontent.com/open-rmf/free_fleet/refs/heads/$FREE_FLEET_BRANCH/free_fleet_examples/config/zenoh/turtlebot3_zenoh_bridge_ros1_client_config.json5 + && wget -O nav1_tb3_zenoh_bridge_ros1_client_config.json5 https://raw.githubusercontent.com/open-rmf/free_fleet/refs/heads/$FREE_FLEET_BRANCH/free_fleet_examples/config/zenoh/nav1_tb3_zenoh_bridge_ros1_client_config.json5 RUN rm -rf \ /var/lib/apt/lists \ @@ -29,8 +29,8 @@ RUN rm -rf \ FROM docker.io/ros:$ROS_DISTRO-ros-base -COPY --from=0 /zenoh-bridge/turtlebot3_zenoh_bridge_ros1_client_config.json5 /zenoh-bridge/turtlebot3_zenoh_bridge_ros1_client_config.json5 +COPY --from=0 /zenoh-bridge/nav1_tb3_zenoh_bridge_ros1_client_config.json5 /zenoh-bridge/nav1_tb3_zenoh_bridge_ros1_client_config.json5 COPY --from=0 /zenoh-bridge/zenoh-plugin-ros1/target/release/zenoh-bridge-ros1 /zenoh-bridge/zenoh-bridge-ros1 -ENTRYPOINT ["bash", "-c", ". /opt/ros/$ROS_DISTRO/setup.bash && /zenoh-bridge/zenoh-bridge-ros1 -c /zenoh-bridge/turtlebot3_zenoh_bridge_ros1_client_config.json5"] +ENTRYPOINT ["bash", "-c", ". /opt/ros/$ROS_DISTRO/setup.bash && /zenoh-bridge/zenoh-bridge-ros1 -c /zenoh-bridge/nav1_tb3_zenoh_bridge_ros1_client_config.json5"] diff --git a/.github/docker/minimal-zenoh-bridge-ros2dds/Dockerfile b/.github/docker/minimal-zenoh-bridge-ros2dds/Dockerfile index c3227c75..60cf6a81 100644 --- a/.github/docker/minimal-zenoh-bridge-ros2dds/Dockerfile +++ b/.github/docker/minimal-zenoh-bridge-ros2dds/Dockerfile @@ -11,7 +11,7 @@ RUN mkdir -p /zenoh-bridge && cd /zenoh-bridge \ && rm zenoh-plugin-ros2dds.zip RUN cd /zenoh-bridge \ - && wget -O turtlebot3_1_zenoh_bridge_ros2dds_client_config.json5 https://raw.githubusercontent.com/open-rmf/free_fleet/refs/heads/$FREE_FLEET_BRANCH/free_fleet_examples/config/zenoh/turtlebot3_1_zenoh_bridge_ros2dds_client_config.json5 + && wget -O nav2_tb3_zenoh_bridge_ros2dds_client_config.json5 https://raw.githubusercontent.com/open-rmf/free_fleet/refs/heads/$FREE_FLEET_BRANCH/free_fleet_examples/config/zenoh/nav2_tb3_zenoh_bridge_ros2dds_client_config.json5 ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp @@ -19,4 +19,4 @@ RUN rm -rf \ /var/lib/apt/lists \ /dist -ENTRYPOINT ["bash", "-c", ". /opt/ros/$ROS_DISTRO/setup.bash && /zenoh-bridge/zenoh-bridge-ros2dds -c /zenoh-bridge/turtlebot3_1_zenoh_bridge_ros2dds_client_config.json5"] +ENTRYPOINT ["bash", "-c", ". /opt/ros/$ROS_DISTRO/setup.bash && /zenoh-bridge/zenoh-bridge-ros2dds -c /zenoh-bridge/nav2_tb3_zenoh_bridge_ros2dds_client_config.json5"] diff --git a/README.md b/README.md index 73afc458..46605987 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations ~/turtlebot3_sim ![](../media/ff_tb3_faster_smaller.gif) -This simulates running an isolated (by `ROS_DOMAIN_ID`) turtlebot3 with a ROS 2 navigation stack, and setting up RMF with `free_fleet_adapter` (on a different `ROS_DOMAIN_ID`), allowing the fleet adapter to command the robot via a configured `zenoh-bridge-ros2dds` with the namespace `turtlebot3_1`. +This simulates running an isolated (by `ROS_DOMAIN_ID`) turtlebot3 with a ROS 2 navigation stack, and setting up RMF with `free_fleet_adapter` (on a different `ROS_DOMAIN_ID`), allowing the fleet adapter to command the robot via a configured `zenoh-bridge-ros2dds` with the namespace `nav2_tb3`. Launch simulation and set up the initial position of the robot (see gif), @@ -134,7 +134,7 @@ source /opt/ros/jazzy/setup.bash export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp cd PATH_TO_EXTRACTED_ZENOH_BRIDGE -./zenoh-bridge-ros2dds -c ~/ff_ws/src/free_fleet/free_fleet_examples/config/zenoh/turtlebot3_1_zenoh_bridge_ros2dds_client_config.json5 +./zenoh-bridge-ros2dds -c ~/ff_ws/src/free_fleet/free_fleet_examples/config/zenoh/nav2_tb3_zenoh_bridge_ros2dds_client_config.json5 ``` Listen to transforms over `zenoh`, @@ -142,7 +142,7 @@ Listen to transforms over `zenoh`, ```bash source ~/ff_ws/install/setup.bash ros2 run free_fleet_examples nav2_get_tf.py \ - --namespace turtlebot3_1 + --namespace nav2_tb3 ``` Start a `navigate_to_pose` action over `zenoh`, using example values, @@ -151,7 +151,7 @@ Start a `navigate_to_pose` action over `zenoh`, using example values, source ~/ff_ws/install/setup.bash ros2 run free_fleet_examples nav2_send_navigate_to_pose.py \ --frame-id map \ - --namespace turtlebot3_1 \ + --namespace nav2_tb3 \ -x 1.808 \ -y 0.503 ``` @@ -165,13 +165,16 @@ export ROS_DOMAIN_ID=55 ros2 launch free_fleet_examples turtlebot3_world_rmf_common.launch.xml ``` -Launch the `free_fleet_adapter` with the current example's configurations, verify that `turtlebot3_1` has been added to fleet `turtletbot`. +Launch the `free_fleet_adapter` with the current example's configurations, verify that `nav2_tb3` has been added to fleet `turtletbot3`. ```bash source ~/ff_ws/install/setup.bash export ROS_DOMAIN_ID=55 -ros2 launch free_fleet_examples tb3_simulation_fleet_adapter.launch.xml +ros2 launch free_fleet_examples nav2_tb3_simulation_fleet_adapter.launch.xml + +# Or launch with the rmf-web API server address +# ros2 launch free_fleet_examples nav2_tb3_simulation_fleet_adapter.launch.xml server_uri:="ws://localhost:8000/_internal" ``` Dispatch an example RMF patrol tasks using [`rmf-web`](https://github.com/open-rmf/rmf-web) on the same `ROS_DOMAIN_ID` as the RMF core packages, or use the `dispatch_patrol` script, @@ -224,7 +227,7 @@ source /opt/ros/jazzy/setup.bash export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp cd PATH_TO_EXTRACTED_ZENOH_BRIDGE -./zenoh-bridge-ros2dds -c ~/ff_ws/src/free_fleet/free_fleet_examples/config/zenoh/unique_multi_tb3_zenoh_bridge_ros2dds_client_config.json5 +./zenoh-bridge-ros2dds -c ~/ff_ws/src/free_fleet/free_fleet_examples/config/zenoh/nav2_unique_multi_tb3_zenoh_bridge_ros2dds_client_config.json5 ``` Start the RMF core packages on a different `ROS_DOMAIN_ID` to simulate running on a different machine, @@ -237,17 +240,17 @@ export ROS_DOMAIN_ID=55 ros2 launch free_fleet_examples turtlebot3_world_rmf_common.launch.xml ``` -Launch the `free_fleet_adapter` with the current example's configurations, verify that `turtlebot3_1` has been added to fleet `turtlebot3`. +Launch the `free_fleet_adapter` with the current example's configurations, verify that `nav2_tb3` has been added to fleet `turtlebot3`. ```bash source ~/ff_ws/install/setup.bash export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp export ROS_DOMAIN_ID=55 -ros2 launch free_fleet_examples unique_multi_tb3_simulation_fleet_adapter.launch.xml +ros2 launch free_fleet_examples nav2_unique_multi_tb3_simulation_fleet_adapter.launch.xml # Or launch with the rmf-web API server address -# ros2 launch free_fleet_examples unique_multi_tb3_simulation_fleet_adapter.launch.xml server_uri:="ws://localhost:8000/_internal" +# ros2 launch free_fleet_examples nav2_unique_multi_tb3_simulation_fleet_adapter.launch.xml server_uri:="ws://localhost:8000/_internal" ``` Dispatch example RMF patrol tasks using [`rmf-web`](https://github.com/open-rmf/rmf-web) on the same `ROS_DOMAIN_ID` as the RMF core packages, or use the `dispatch_patrol` scripts, which will cause the robot to negotiate as they perform their tasks. @@ -312,7 +315,7 @@ export TURTLEBOT3_MODEL=burger roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=/PATH_TO_navigation2/nav2_bringup/maps/tb3_sandbox.yaml ``` -In the ROS 1 Noetic environment, set up prerequisites of [zenoh-plugin-ros1](https://github.com/aaronchongth/zenoh-plugin-ros1), build `zenoh-bridge-ros1` in release, and start it with the [provided config in examples](free_fleet_examples/config/zenoh/turtlebot3_zenoh_bridge_ros1_client_config.json5). See the [relevant docker file](.github/docker/minimal-zenoh-bridge-ros1/Dockerfile) for reference. +In the ROS 1 Noetic environment, set up prerequisites of [zenoh-plugin-ros1](https://github.com/aaronchongth/zenoh-plugin-ros1), build `zenoh-bridge-ros1` in release, and start it with the [provided config in examples](free_fleet_examples/config/zenoh/nav1_tb3_zenoh_bridge_ros1_client_config.json5). See the [relevant docker file](.github/docker/minimal-zenoh-bridge-ros1/Dockerfile) for reference. ```bash # Get the config file @@ -325,7 +328,7 @@ cargo build --package zenoh-bridge-ros1 --bin zenoh-bridge-ros1 --release # Use cargo run, or just run the executable directly source /opt/ros/noetic/setup.bash -./target/release/zenoh-bridge-ros1 -c PATH_TO_free_fleet/free_fleet_examples/config/zenoh/turtlebot3_zenoh_bridge_ros1_client_config.json5 +./target/release/zenoh-bridge-ros1 -c PATH_TO_free_fleet/free_fleet_examples/config/zenoh/nav1_tb3_zenoh_bridge_ros1_client_config.json5 ``` On the machine where the free fleet adapter will run, start the common launch files and the free fleet adapter, @@ -337,7 +340,7 @@ export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 launch free_fleet_examples turtlebot3_world_rmf_common.launch.xml ``` -Launch the `free_fleet_adapter` with the current example's configurations, verify that `tb3_0` has been added to fleet `turtlebot3`. +Launch the `free_fleet_adapter` with the current example's configurations, verify that `nav1_tb3` has been added to fleet `turtlebot3`. ```bash source ~/ff_ws/install/setup.bash @@ -356,13 +359,13 @@ source ~/ff_ws/install/setup.bash export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp export ROS_DOMAIN_ID=55 -# tb3_0 to run clockwise around the map +# nav1_tb3 to run clockwise around the map ros2 run rmf_demos_tasks dispatch_patrol \ -p north_west north_east south_east south_west \ -n 3 \ -st 0 \ -F turtlebot3 \ - -R tb3_0 + -R nav1_tb3 ``` ## Troubleshooting diff --git a/free_fleet/package.xml b/free_fleet/package.xml index 17bf6b8e..67892257 100644 --- a/free_fleet/package.xml +++ b/free_fleet/package.xml @@ -2,7 +2,7 @@ free_fleet - 0.1.0 + 2.0.0 A free fleet management library Aaron Chong Apache License 2.0 diff --git a/free_fleet_adapter/package.xml b/free_fleet_adapter/package.xml index 0d00c058..c459277b 100644 --- a/free_fleet_adapter/package.xml +++ b/free_fleet_adapter/package.xml @@ -2,7 +2,7 @@ free_fleet_adapter - 0.1.0 + 2.0.0 Free fleet Open-RMF fleet adapter based on fleet_adapter_template Aaron Chong Apache License 2.0 diff --git a/free_fleet_adapter/tests/integration/test_nav1_move_base_handler.py b/free_fleet_adapter/tests/integration/test_nav1_move_base_handler.py index ad18616b..d261f2db 100644 --- a/free_fleet_adapter/tests/integration/test_nav1_move_base_handler.py +++ b/free_fleet_adapter/tests/integration/test_nav1_move_base_handler.py @@ -39,7 +39,7 @@ def tearDownClass(cls): def test_move_base_statuses_do_not_exist(self): move_base_handler = Nav1MoveBaseHandler( - 'missing_turtlebot3_1', self.zenoh_session, self.node + 'missing_nav1_tb3', self.zenoh_session, self.node ) statuses_exists = False @@ -54,7 +54,7 @@ def test_move_base_statuses_do_not_exist(self): def test_command_status_and_cancel(self): move_base_handler = Nav1MoveBaseHandler( - 'tb3_0', self.zenoh_session, self.node + 'nav1_tb3', self.zenoh_session, self.node ) status_array = None diff --git a/free_fleet_adapter/tests/integration/test_nav1_robot_adapter.py b/free_fleet_adapter/tests/integration/test_nav1_robot_adapter.py index ea346de8..c2f4236b 100644 --- a/free_fleet_adapter/tests/integration/test_nav1_robot_adapter.py +++ b/free_fleet_adapter/tests/integration/test_nav1_robot_adapter.py @@ -26,12 +26,12 @@ import zenoh -class TestNav2RobotAdapter(unittest.TestCase): +class TestNav1RobotAdapter(unittest.TestCase): @classmethod def setUpClass(cls): rclpy.init() - cls.node = rclpy.create_node('test_nav2_robot_adapter') + cls.node = rclpy.create_node('test_nav1_robot_adapter') cls.zenoh_session = zenoh.open(zenoh.Config()) @classmethod @@ -44,7 +44,7 @@ def test_non_existent_robot_pose(self): tf_buffer = Buffer() robot_adapter = Nav1RobotAdapter( - name='missing_turtlebot3_1', + name='missing_nav1_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -69,7 +69,7 @@ def test_robot_pose(self): tf_buffer = Buffer() robot_adapter = Nav1RobotAdapter( - name='tb3_0', + name='nav1_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -94,7 +94,7 @@ def test_robot_battery_soc(self): tf_buffer = Buffer() robot_adapter = Nav1RobotAdapter( - name='tb3_0', + name='nav1_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -122,7 +122,7 @@ def test_robot_unable_to_update(self): tf_buffer = Buffer() robot_adapter = Nav1RobotAdapter( - name='tb3_0', + name='nav1_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -161,7 +161,7 @@ def test_idle_robot_navigate_is_done(self): tf_buffer = Buffer() robot_adapter = Nav1RobotAdapter( - name='tb3_0', + name='nav1_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -187,7 +187,7 @@ def test_robot_stop_without_command(self): tf_buffer = Buffer() robot_adapter = Nav1RobotAdapter( - name='tb3_0', + name='nav1_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -216,7 +216,7 @@ def test_robot_handle_navigate_to_invalid_map(self): tf_buffer = Buffer() robot_adapter = Nav1RobotAdapter( - name='tb3_0', + name='nav1_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -255,7 +255,7 @@ def test_robot_handle_navigate_to_pose(self): tf_buffer = Buffer() robot_adapter = Nav1RobotAdapter( - name='tb3_0', + name='nav1_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -292,7 +292,7 @@ def test_robot_stop_navigate(self): tf_buffer = Buffer() robot_adapter = Nav1RobotAdapter( - name='tb3_0', + name='nav1_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -332,7 +332,7 @@ def test_robot_execute_unknown_action(self): tf_buffer = Buffer() robot_adapter = Nav1RobotAdapter( - name='tb3_0', + name='nav1_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', diff --git a/free_fleet_adapter/tests/integration/test_nav1_tf_handler.py b/free_fleet_adapter/tests/integration/test_nav1_tf_handler.py index 7f5b40c6..9cf0310d 100644 --- a/free_fleet_adapter/tests/integration/test_nav1_tf_handler.py +++ b/free_fleet_adapter/tests/integration/test_nav1_tf_handler.py @@ -42,7 +42,7 @@ def test_tf_does_not_exist(self): tf_buffer = Buffer() tf_handler = Nav1TfHandler( - 'missing_turtlebot3_1', self.zenoh_session, tf_buffer, self.node + 'missing_nav1_tb3', self.zenoh_session, tf_buffer, self.node ) transform_exists = False @@ -59,7 +59,7 @@ def test_tf_exists(self): tf_buffer = Buffer() tf_handler = Nav1TfHandler( - 'tb3_0', self.zenoh_session, tf_buffer, self.node + 'nav1_tb3', self.zenoh_session, tf_buffer, self.node ) transform_exists = False diff --git a/free_fleet_adapter/tests/integration/test_nav2_robot_adapter.py b/free_fleet_adapter/tests/integration/test_nav2_robot_adapter.py index 83d2dad2..1514775f 100644 --- a/free_fleet_adapter/tests/integration/test_nav2_robot_adapter.py +++ b/free_fleet_adapter/tests/integration/test_nav2_robot_adapter.py @@ -44,7 +44,7 @@ def test_non_existent_robot_pose(self): tf_buffer = Buffer() robot_adapter = Nav2RobotAdapter( - name='missing_turtlebot3_1', + name='missing_nav2_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -69,7 +69,7 @@ def test_robot_pose(self): tf_buffer = Buffer() robot_adapter = Nav2RobotAdapter( - name='turtlebot3_1', + name='nav2_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -94,7 +94,7 @@ def test_robot_battery_soc(self): tf_buffer = Buffer() robot_adapter = Nav2RobotAdapter( - name='turtlebot3_1', + name='nav2_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -112,7 +112,7 @@ def test_robot_unable_to_update(self): tf_buffer = Buffer() robot_adapter = Nav2RobotAdapter( - name='turtlebot3_1', + name='nav2_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -141,7 +141,7 @@ def test_idle_robot_navigate_is_done(self): tf_buffer = Buffer() robot_adapter = Nav2RobotAdapter( - name='turtlebot3_1', + name='nav2_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -157,7 +157,7 @@ def test_robot_stop_without_command(self): tf_buffer = Buffer() robot_adapter = Nav2RobotAdapter( - name='turtlebot3_1', + name='nav2_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -176,7 +176,7 @@ def test_robot_handle_navigate_to_invalid_map(self): tf_buffer = Buffer() robot_adapter = Nav2RobotAdapter( - name='turtlebot3_1', + name='nav2_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -205,7 +205,7 @@ def test_robot_handle_navigate_to_pose(self): tf_buffer = Buffer() robot_adapter = Nav2RobotAdapter( - name='turtlebot3_1', + name='nav2_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -236,7 +236,7 @@ def test_robot_stop_navigate(self): tf_buffer = Buffer() robot_adapter = Nav2RobotAdapter( - name='turtlebot3_1', + name='nav2_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', @@ -270,7 +270,7 @@ def test_robot_execute_unknown_action(self): tf_buffer = Buffer() robot_adapter = Nav2RobotAdapter( - name='turtlebot3_1', + name='nav2_tb3', configuration=None, robot_config_yaml={ 'initial_map': 'L1', diff --git a/free_fleet_adapter/tests/integration/test_nav2_tf_handler.py b/free_fleet_adapter/tests/integration/test_nav2_tf_handler.py index 71df2512..5b077d6c 100644 --- a/free_fleet_adapter/tests/integration/test_nav2_tf_handler.py +++ b/free_fleet_adapter/tests/integration/test_nav2_tf_handler.py @@ -42,7 +42,7 @@ def test_tf_does_not_exist(self): tf_buffer = Buffer() tf_handler = Nav2TfHandler( - 'missing_turtlebot3_1', self.zenoh_session, tf_buffer, self.node + 'missing_nav2_tb3', self.zenoh_session, tf_buffer, self.node ) transform_exists = False @@ -59,7 +59,7 @@ def test_tf_exists(self): tf_buffer = Buffer() tf_handler = Nav2TfHandler( - 'turtlebot3_1', self.zenoh_session, tf_buffer, self.node + 'nav2_tb3', self.zenoh_session, tf_buffer, self.node ) transform_exists = False diff --git a/free_fleet_examples/config/fleet/nav1_tb3_simulation_fleet_config.yaml b/free_fleet_examples/config/fleet/nav1_tb3_simulation_fleet_config.yaml index c63a0050..548ad2cc 100644 --- a/free_fleet_examples/config/fleet/nav1_tb3_simulation_fleet_config.yaml +++ b/free_fleet_examples/config/fleet/nav1_tb3_simulation_fleet_config.yaml @@ -33,15 +33,16 @@ rmf_fleet: finishing_request: "nothing" # [park, charge, nothing] responsive_wait: True # Should responsive wait be on/off for the whole fleet by default? False if not specified. robots: - tb3_0: - charger: "turtlebot3_1_charger" + nav1_tb3: + charger: "tb3_charger" responsive_wait: False # Should responsive wait be on/off for this specific robot? Overrides the fleet-wide setting. # For Nav1RobotAdapter navigation_stack: 1 initial_map: "L1" maps: L1: - map_url: "/opt/ros/jazzy/share/nav2_bringup/maps/turtlebot3_world.yaml" + # The nav1 robot will generally no access to this nav2_bringup package, this should point to where the nav1 map is stored. + map_url: "/tmp/navigation2/nav2_bringup/maps/tb3_sandbox.yaml" # initial_pose: [-1.6000019311904907, -0.5031192898750305, 0] robot_state_update_frequency: 10.0 # Hz diff --git a/free_fleet_examples/config/fleet/tb3_simulation_fleet_config.yaml b/free_fleet_examples/config/fleet/nav2_tb3_simulation_fleet_config.yaml similarity index 94% rename from free_fleet_examples/config/fleet/tb3_simulation_fleet_config.yaml rename to free_fleet_examples/config/fleet/nav2_tb3_simulation_fleet_config.yaml index b8bb20ef..37e8fec6 100644 --- a/free_fleet_examples/config/fleet/tb3_simulation_fleet_config.yaml +++ b/free_fleet_examples/config/fleet/nav2_tb3_simulation_fleet_config.yaml @@ -33,15 +33,15 @@ rmf_fleet: finishing_request: "nothing" # [park, charge, nothing] responsive_wait: True # Should responsive wait be on/off for the whole fleet by default? False if not specified. robots: - turtlebot3_1: - charger: "turtlebot3_1_charger" + nav2_tb3: + charger: "tb3_charger" responsive_wait: False # Should responsive wait be on/off for this specific robot? Overrides the fleet-wide setting. # For Nav2RobotAdapter navigation_stack: 2 initial_map: "L1" maps: L1: - map_url: "/opt/ros/jazzy/share/nav2_bringup/maps/turtlebot3_world.yaml" + map_url: "/opt/ros/jazzy/share/nav2_bringup/maps/tb3_sandbox.yaml" # initial_pose: [-1.6000019311904907, -0.5031192898750305, 0] robot_state_update_frequency: 10.0 # Hz diff --git a/free_fleet_examples/config/fleet/unique_multi_tb3_simulation_fleet_config.yaml b/free_fleet_examples/config/fleet/nav2_unique_multi_tb3_simulation_fleet_config.yaml similarity index 92% rename from free_fleet_examples/config/fleet/unique_multi_tb3_simulation_fleet_config.yaml rename to free_fleet_examples/config/fleet/nav2_unique_multi_tb3_simulation_fleet_config.yaml index 62e1a982..a51d9ed5 100644 --- a/free_fleet_examples/config/fleet/unique_multi_tb3_simulation_fleet_config.yaml +++ b/free_fleet_examples/config/fleet/nav2_unique_multi_tb3_simulation_fleet_config.yaml @@ -37,20 +37,22 @@ rmf_fleet: charger: "robot1_charger" responsive_wait: False # Should responsive wait be on/off for this specific robot? Overrides the fleet-wide setting. # For Nav2RobotAdapter + navigation_stack: 2 initial_map: "L1" maps: L1: - map_url: "/opt/ros/jazzy/share/nav2_bringup/maps/turtlebot3_world.yaml" + map_url: "/opt/ros/jazzy/share/nav2_bringup/maps/tb3_sandbox.yaml" # initial_pose: [0.056320589035749435, 0.5160754323005676, 0] robot2: charger: "robot2_charger" responsive_wait: False # Should responsive wait be on/off for this specific robot? Overrides the fleet-wide setting. # For Nav2RobotAdapter + navigation_stack: 2 initial_map: "L1" maps: L1: - map_url: "/opt/ros/jazzy/share/nav2_bringup/maps/turtlebot3_world.yaml" + map_url: "/opt/ros/jazzy/share/nav2_bringup/maps/tb3_sandbox.yaml" # initial_pose: [-0.03754809871315956, -0.5848855972290039, 0] robot_state_update_frequency: 10.0 # Hz diff --git a/free_fleet_examples/config/zenoh/turtlebot3_zenoh_bridge_ros1_client_config.json5 b/free_fleet_examples/config/zenoh/nav1_tb3_zenoh_bridge_ros1_client_config.json5 similarity index 94% rename from free_fleet_examples/config/zenoh/turtlebot3_zenoh_bridge_ros1_client_config.json5 rename to free_fleet_examples/config/zenoh/nav1_tb3_zenoh_bridge_ros1_client_config.json5 index c36dd7d1..9f20fc40 100644 --- a/free_fleet_examples/config/zenoh/turtlebot3_zenoh_bridge_ros1_client_config.json5 +++ b/free_fleet_examples/config/zenoh/nav1_tb3_zenoh_bridge_ros1_client_config.json5 @@ -1,7 +1,7 @@ { plugins: { ros1: { - bridge_namespace: "tb3_0", + bridge_namespace: "nav1_tb3", subscriber_bridging_mode: "disabled", publisher_bridging_mode: "disabled", service_bridging_mode: "disabled", diff --git a/free_fleet_examples/config/zenoh/turtlebot3_1_zenoh_bridge_ros2dds_client_config.json5 b/free_fleet_examples/config/zenoh/nav2_tb3_zenoh_bridge_ros2dds_client_config.json5 similarity index 93% rename from free_fleet_examples/config/zenoh/turtlebot3_1_zenoh_bridge_ros2dds_client_config.json5 rename to free_fleet_examples/config/zenoh/nav2_tb3_zenoh_bridge_ros2dds_client_config.json5 index bad22011..9057cb28 100644 --- a/free_fleet_examples/config/zenoh/turtlebot3_1_zenoh_bridge_ros2dds_client_config.json5 +++ b/free_fleet_examples/config/zenoh/nav2_tb3_zenoh_bridge_ros2dds_client_config.json5 @@ -1,7 +1,7 @@ { plugins: { ros2dds: { - namespace: "/turtlebot3_1", + namespace: "/nav2_tb3", allow: { publishers: [".*/tf", ".*/battery_state"], subscribers: [], diff --git a/free_fleet_examples/config/zenoh/unique_multi_tb3_zenoh_bridge_ros2dds_client_config.json5 b/free_fleet_examples/config/zenoh/nav2_unique_multi_tb3_zenoh_bridge_ros2dds_client_config.json5 similarity index 100% rename from free_fleet_examples/config/zenoh/unique_multi_tb3_zenoh_bridge_ros2dds_client_config.json5 rename to free_fleet_examples/config/zenoh/nav2_unique_multi_tb3_zenoh_bridge_ros2dds_client_config.json5 diff --git a/free_fleet_examples/free_fleet_examples/nav1_get_tf.py b/free_fleet_examples/free_fleet_examples/nav1_get_tf.py index 2191ff34..ce2681ff 100644 --- a/free_fleet_examples/free_fleet_examples/nav1_get_tf.py +++ b/free_fleet_examples/free_fleet_examples/nav1_get_tf.py @@ -28,7 +28,6 @@ def main(argv=sys.argv): - # Init rclpy and adapter rclpy.init(args=argv) args_without_ros = rclpy.utilities.remove_ros_args(argv) node = rclpy.node.Node('nav1_get_tf') diff --git a/free_fleet_examples/free_fleet_examples/nav1_move_base_cancel.py b/free_fleet_examples/free_fleet_examples/nav1_move_base_cancel.py index 321a846c..12dad578 100644 --- a/free_fleet_examples/free_fleet_examples/nav1_move_base_cancel.py +++ b/free_fleet_examples/free_fleet_examples/nav1_move_base_cancel.py @@ -25,7 +25,6 @@ def main(argv=sys.argv): - # Init rclpy and adapter rclpy.init(args=argv) args_without_ros = rclpy.utilities.remove_ros_args(argv) node = rclpy.node.Node('nav1_move_base_cancel') diff --git a/free_fleet_examples/free_fleet_examples/nav1_move_base_simple_goal.py b/free_fleet_examples/free_fleet_examples/nav1_move_base_simple_goal.py index f253d52f..077b290c 100644 --- a/free_fleet_examples/free_fleet_examples/nav1_move_base_simple_goal.py +++ b/free_fleet_examples/free_fleet_examples/nav1_move_base_simple_goal.py @@ -27,7 +27,6 @@ def main(argv=sys.argv): - # Init rclpy and adapter rclpy.init(args=argv) args_without_ros = rclpy.utilities.remove_ros_args(argv) node = rclpy.node.Node('nav1_move_base_simple_goal') diff --git a/free_fleet_examples/free_fleet_examples/nav2_get_tf.py b/free_fleet_examples/free_fleet_examples/nav2_get_tf.py index 993236a8..54a8ddbc 100755 --- a/free_fleet_examples/free_fleet_examples/nav2_get_tf.py +++ b/free_fleet_examples/free_fleet_examples/nav2_get_tf.py @@ -26,7 +26,6 @@ def main(argv=sys.argv): - # Init rclpy and adapter rclpy.init(args=argv) args_without_ros = rclpy.utilities.remove_ros_args(argv) node = rclpy.node.Node('nav2_get_tf') diff --git a/free_fleet_examples/free_fleet_examples/nav2_send_navigate_to_pose.py b/free_fleet_examples/free_fleet_examples/nav2_send_navigate_to_pose.py index a9077ff5..edf86557 100755 --- a/free_fleet_examples/free_fleet_examples/nav2_send_navigate_to_pose.py +++ b/free_fleet_examples/free_fleet_examples/nav2_send_navigate_to_pose.py @@ -77,7 +77,6 @@ def main(argv=sys.argv): pose_stamped = GeometryMsgs_PoseStamped(header=header, pose=pose) - # goal_id = [i for i in range(1, 17)] goal_id = np.random.randint(0, 255, size=(16)).astype('uint8').tolist() print(goal_id) req = NavigateToPose_SendGoal_Request( @@ -130,7 +129,6 @@ def main(argv=sys.argv): rep = NavigateToPose_GetResult_Response.deserialize( reply.ok.payload.to_bytes() ) - # print("Result: {0}".format(rep.sequence)) print(f'Result: {rep.status}') if rep.status == GoalStatus.STATUS_ABORTED.value: print( diff --git a/free_fleet_examples/launch/tb3_simulation_fleet_adapter.launch.xml b/free_fleet_examples/launch/nav2_tb3_simulation_fleet_adapter.launch.xml similarity index 89% rename from free_fleet_examples/launch/tb3_simulation_fleet_adapter.launch.xml rename to free_fleet_examples/launch/nav2_tb3_simulation_fleet_adapter.launch.xml index 6ae2f209..5c9e208b 100644 --- a/free_fleet_examples/launch/tb3_simulation_fleet_adapter.launch.xml +++ b/free_fleet_examples/launch/nav2_tb3_simulation_fleet_adapter.launch.xml @@ -7,7 +7,7 @@ - + diff --git a/free_fleet_examples/launch/unique_multi_tb3_simulation_fleet_adapter.launch.xml b/free_fleet_examples/launch/nav2_unique_multi_tb3_simulation_fleet_adapter.launch.xml similarity index 88% rename from free_fleet_examples/launch/unique_multi_tb3_simulation_fleet_adapter.launch.xml rename to free_fleet_examples/launch/nav2_unique_multi_tb3_simulation_fleet_adapter.launch.xml index fe83b13d..b4935d50 100644 --- a/free_fleet_examples/launch/unique_multi_tb3_simulation_fleet_adapter.launch.xml +++ b/free_fleet_examples/launch/nav2_unique_multi_tb3_simulation_fleet_adapter.launch.xml @@ -7,7 +7,7 @@ - + diff --git a/free_fleet_examples/maps/turtlebot3_world/turtlebot3_world.building.yaml b/free_fleet_examples/maps/turtlebot3_world/turtlebot3_world.building.yaml index c2a3e1d2..0a82e303 100644 --- a/free_fleet_examples/maps/turtlebot3_world/turtlebot3_world.building.yaml +++ b/free_fleet_examples/maps/turtlebot3_world/turtlebot3_world.building.yaml @@ -77,7 +77,7 @@ levels: - [212.191, 219.821, 0, ""] - [190.124, 219.28299999999999, 0, ""] - [167.94900000000001, 212.06999999999999, 0, south_west] - - [163.96700000000001, 196.24700000000001, 0, turtlebot3_1_charger, {is_charger: [4, true]}] + - [163.96700000000001, 196.24700000000001, 0, tb3_charger, {is_charger: [4, true]}] - [164.28899999999999, 174.934, 0, ""] - [188.29400000000001, 147.054, 0, ""] - [212.62100000000001, 147.26900000000001, 0, ""] diff --git a/free_fleet_examples/package.xml b/free_fleet_examples/package.xml index 7e1d9530..6a500461 100644 --- a/free_fleet_examples/package.xml +++ b/free_fleet_examples/package.xml @@ -2,7 +2,7 @@ free_fleet_examples - 0.1.0 + 2.0.0 A package containing example maps and configs for running free fleet Aaron Chong Apache License 2.0