diff --git a/README.md b/README.md index b6a697b9..de0312cd 100644 --- a/README.md +++ b/README.md @@ -28,88 +28,85 @@ ROS2 hardware controllers configuration for ROSbots. Available in [ROS_API.md](./ROS_API.md) -## Usage on hardware - -To run the software on real ROSbot 2R, 2 PRO, also communication with the CORE2 will be necessary. -First update your firmware to make sure that you use the latest version, then run the `micro-ROS` agent. -For detailed instructions refer to the [rosbot_ros2_firmware repository](https://github.com/husarion/rosbot_ros2_firmware). - -## Source build +## Quick start ### Prerequisites -Install all necessary tools: +1. Install all necessary tools: -```bash -sudo apt-get update -sudo apt-get install -y python3-pip ros-dev-tools stm32flash -``` + ```bash + sudo apt-get update + sudo apt-get install -y python3-pip ros-dev-tools stm32flash + ``` -Create workspace folder and clone `rosbot_ros` repository: +2. Create workspace folder and clone `rosbot_ros` repository: -```bash -mkdir -p ros2_ws -cd ros2_ws -git clone https://github.com/husarion/rosbot_ros src/rosbot_ros -``` + ```bash + mkdir -p ros2_ws + cd ros2_ws + git clone https://github.com/husarion/rosbot_ros src/rosbot_ros + ``` -### Build and run on hardware +### Build -Building: +1. Configure environment -```bash -export HUSARION_ROS_BUILD_TYPE=hardware + The repository is used to run the code both on the real robot and in the simulation. Specify `HUSARION_ROS_BUILD_TYPE` the variable according to your needs. -source /opt/ros/$ROS_DISTRO/setup.bash + Real robot: -vcs import src < src/rosbot_ros/rosbot/rosbot_hardware.repos + ``` bash + export HUSARION_ROS_BUILD_TYPE=hardware + ``` -rm -r src/rosbot_ros/rosbot_gazebo + Simulation: -sudo rosdep init -rosdep update --rosdistro $ROS_DISTRO -rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y -colcon build --symlink-install --packages-up-to rosbot --cmake-args -DCMAKE_BUILD_TYPE=Release -``` + ```bash + export HUSARION_ROS_BUILD_TYPE=simulation + ``` -Flash firmware: +2. Install dependencies: -```bash -sudo su -source install/setup.bash -ros2 run rosbot_utils flash_firmware -exit -``` + ``` bash + ./src/rosbot_ros/rosbot/install_dependencies.sh + ``` -Running: +3. Build: -```bash -source install/setup.bash -ros2 launch rosbot_bringup combined.launch.py -``` + ```bash + source /opt/ros/$ROS_DISTRO/setup.bash + colcon build --symlink-install --packages-up-to rosbot --cmake-args -DCMAKE_BUILD_TYPE=Release + ``` -### Build and run Gazebo simulation +>[!NOTE] +> To build code on a real robot you need to run above commands on the Panther Built-in Computer. -Building: +### Running -```bash -export HUSARION_ROS_BUILD_TYPE=simulation +#### Real robot -source /opt/ros/$ROS_DISTRO/setup.bash +1. Flash firmware: -vcs import src < src/rosbot_ros/rosbot/rosbot_hardware.repos -vcs import src < src/rosbot_ros/rosbot/rosbot_simulation.repos + ```bash + sudo su + source install/setup.bash + ros2 run rosbot_utils flash_firmware + exit + ``` -# Build only imu_sensor_broadcaster from ros2_controllers -cp -r src/ros2_controllers/imu_sensor_broadcaster src && rm -rf src/ros2_controllers +> ![NOTE] +> To run the software on real ROSbot 2R, 2 PRO, communication with the CORE2 will be necessary. +> First update your firmware to make sure that you use the latest version, then run the `micro-ROS` agent. +> For detailed instructions refer to the [rosbot_ros2_firmware repository](https://github.com/husarion/rosbot_ros2_firmware). -sudo rosdep init -rosdep update --rosdistro $ROS_DISTRO -rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y -colcon build --symlink-install --packages-up-to rosbot --cmake-args -DCMAKE_BUILD_TYPE=Release -``` +2. Launch: + + ```bash + source install/setup.bash + ros2 launch rosbot_bringup combined.launch.py + ``` -Running: +#### Simulation ```bash source install/setup.bash diff --git a/docker/Dockerfile.hardware b/docker/Dockerfile similarity index 72% rename from docker/Dockerfile.hardware rename to docker/Dockerfile index 19d85ec2..8523f18f 100644 --- a/docker/Dockerfile.hardware +++ b/docker/Dockerfile @@ -1,10 +1,13 @@ ARG ROS_DISTRO=humble +ARG BUILD_TYPE=hardware FROM husarnet/ros:${ROS_DISTRO}-ros-core +ARG BUILD_TYPE + WORKDIR /ros2_ws -ENV HUSARION_ROS_BUILD_TYPE=hardware +ENV HUSARION_ROS_BUILD_TYPE=$BUILD_TYPE COPY .. src/rosbot_ros @@ -14,13 +17,7 @@ RUN apt-get update && apt-get install -y \ stm32flash \ ros-${ROS_DISTRO}-teleop-twist-keyboard && \ # Setup workspace - vcs import src < src/rosbot_ros/rosbot/rosbot_hardware.repos && \ - rm -r src/rosbot_ros/rosbot_gazebo && \ - # Install dependencies - rosdep init && \ - rosdep update --rosdistro $ROS_DISTRO && \ - rosdep install --from-paths src -y -i && \ - # Build + ./src/rosbot_ros/rosbot/install_dependencies.sh && \ source /opt/ros/$ROS_DISTRO/setup.bash && \ colcon build --symlink-install --packages-up-to rosbot --cmake-args -DCMAKE_BUILD_TYPE=Release && \ # Get version diff --git a/docker/Dockerfile.simulation b/docker/Dockerfile.simulation deleted file mode 100644 index dc90ab5b..00000000 --- a/docker/Dockerfile.simulation +++ /dev/null @@ -1,35 +0,0 @@ -ARG ROS_DISTRO=humble - -FROM husarnet/ros:${ROS_DISTRO}-ros-core - -WORKDIR /ros2_ws - -ENV HUSARION_ROS_BUILD_TYPE=simulation - -COPY .. src/rosbot_ros - -RUN apt-get update && apt-get install -y \ - python3-pip \ - ros-dev-tools \ - stm32flash \ - ros-${ROS_DISTRO}-teleop-twist-keyboard && \ - # Setup workspace - vcs import src < src/rosbot_ros/rosbot/rosbot_hardware.repos && \ - vcs import src < src/rosbot_ros/rosbot/rosbot_simulation.repos && \ - cp -r src/ros2_controllers/imu_sensor_broadcaster src && rm -rf src/ros2_controllers && \ - # Install dependencies - rosdep init && \ - rosdep update --rosdistro $ROS_DISTRO && \ - rosdep install --from-paths src -y -i && \ - # Build - source /opt/ros/$ROS_DISTRO/setup.bash && \ - colcon build --symlink-install --packages-up-to rosbot --cmake-args -DCMAKE_BUILD_TYPE=Release && \ - # Get version - echo $(cat /ros2_ws/src/rosbot/package.xml | grep '' | sed -r 's/.*([0-9]+.[0-9]+.[0-9]+)<\/version>/\1/g') >> /version.txt && \ - # Size optimization - export SUDO_FORCE_REMOVE=yes && \ - apt-get remove -y \ - ros-dev-tools && \ - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/docker/compose.hardware.yaml b/docker/compose.hardware.yaml index 3ebcf58e..42f4a181 100644 --- a/docker/compose.hardware.yaml +++ b/docker/compose.hardware.yaml @@ -8,7 +8,9 @@ services: rosbot: build: context: .. - dockerfile: docker/Dockerfile.hardware + dockerfile: docker/Dockerfile + args: + BUILD_TYPE: hardware network_mode: host ipc: host restart: unless-stopped diff --git a/docker/compose.simulation.yaml b/docker/compose.simulation.yaml index 9194cda1..a99972bf 100644 --- a/docker/compose.simulation.yaml +++ b/docker/compose.simulation.yaml @@ -22,7 +22,9 @@ services: rosbot: build: context: .. - dockerfile: docker/Dockerfile.simulation + dockerfile: docker/Dockerfile + args: + BUILD_TYPE: simulation network_mode: host ipc: host <<: [ *gpu-config] diff --git a/rosbot/install_dependencies.sh b/rosbot/install_dependencies.sh new file mode 100755 index 00000000..3f364c12 --- /dev/null +++ b/rosbot/install_dependencies.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Check if env HUSARION_ROS_BUILD_TYPE is set +if [ -z "$HUSARION_ROS_BUILD_TYPE" ]; then + echo "HUSARION_ROS_BUILD_TYPE is not set. Please set it to 'hardware' or 'simulation'" + exit 1 +fi + +# Define a function to run commands with or without sudo +run_with_sudo() { + if [ "$(id -u)" -ne 0 ]; then + sudo "$@" + else + "$@" + fi +} + +# Install tools +run_with_sudo apt-get update +run_with_sudo apt-get install -y python3-pip ros-dev-tools stm32flash + +# Import repositories +vcs import src < src/rosbot_ros/rosbot/rosbot_$HUSARION_ROS_BUILD_TYPE.repos +if [ "$HUSARION_ROS_BUILD_TYPE" == "simulation" ]; then + cp -r src/ros2_controllers/imu_sensor_broadcaster src + rm -rf src/ros2_controllers +fi + +# Install dependencies +if ! [ -d /etc/ros/rosdep ]; then + run_with_sudo rosdep init +fi +rosdep update --rosdistro $ROS_DISTRO +rosdep install --from-paths src -y -i diff --git a/rosbot/rosbot_hardware.repos b/rosbot/rosbot_hardware.repos index 55bca8c2..fe402a5f 100644 --- a/rosbot/rosbot_hardware.repos +++ b/rosbot/rosbot_hardware.repos @@ -1,12 +1,4 @@ repositories: - rosbot_hardware_interfaces: - type: git - url: https://github.com/husarion/rosbot_hardware_interfaces.git - version: da1805839aaa21b8341a9c39498c96d9a1a4f87d - ros_components_description: - type: git - url: https://github.com/husarion/ros_components_description.git - version: 1cb25600afa5941d21d48c0af8e63ad2eb3afaa0 husarion_controllers: type: git url: https://github.com/husarion/husarion_controllers @@ -19,3 +11,11 @@ repositories: type: git url: https://github.com/micro-ROS/micro-ROS-Agent.git version: 30377bbd86ff7ea93ca69a3b37997fd235385e1f + ros_components_description: + type: git + url: https://github.com/husarion/ros_components_description.git + version: 1cb25600afa5941d21d48c0af8e63ad2eb3afaa0 + rosbot_hardware_interfaces: + type: git + url: https://github.com/husarion/rosbot_hardware_interfaces.git + version: da1805839aaa21b8341a9c39498c96d9a1a4f87d diff --git a/rosbot/rosbot_simulation.repos b/rosbot/rosbot_simulation.repos index ee822f11..9c168c64 100644 --- a/rosbot/rosbot_simulation.repos +++ b/rosbot/rosbot_simulation.repos @@ -1,8 +1,16 @@ repositories: + husarion_controllers: + type: git + url: https://github.com/husarion/husarion_controllers + version: 217b09830f5f42930098b9992eda41710702b625 husarion_gz_worlds: type: git url: https://github.com/husarion/husarion_gz_worlds version: c0ff83a476f6e0bc250c763a806bf1769a00f515 + ros_components_description: + type: git + url: https://github.com/husarion/ros_components_description.git + version: 1cb25600afa5941d21d48c0af8e63ad2eb3afaa0 ros2_controllers: # Bug: There is no nice way to change `sensor_name` imu_bradcaster param when spawning multiple robots -> ros2_control refer only to single imu entity type: git url: https://github.com/husarion/ros2_controllers/ diff --git a/rosbot_bringup/launch/bringup.launch.py b/rosbot_bringup/launch/bringup.launch.py index e3e1588f..ded94962 100644 --- a/rosbot_bringup/launch/bringup.launch.py +++ b/rosbot_bringup/launch/bringup.launch.py @@ -14,60 +14,53 @@ from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription +# from launch.conditions import UnlessCondition from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import ( EnvironmentVariable, LaunchConfiguration, PathJoinSubstitution, ) -from launch_ros.actions import Node, SetParameter +from launch_ros.actions import Node from launch_ros.substitutions import FindPackageShare def generate_launch_description(): namespace = LaunchConfiguration("namespace") + use_sim = LaunchConfiguration("use_sim", default="False") + declare_namespace_arg = DeclareLaunchArgument( "namespace", default_value=EnvironmentVariable("ROBOT_NAMESPACE", default_value=""), description="Namespace for all topics and tfs", ) - use_sim = LaunchConfiguration("use_sim") - declare_use_sim_arg = DeclareLaunchArgument( - "use_sim", - default_value="False", - description="Whether simulation is used", - ) - - rosbot_controller = FindPackageShare("rosbot_controller") rosbot_bringup = FindPackageShare("rosbot_bringup") - - mecanum = LaunchConfiguration("mecanum") - declare_mecanum_arg = DeclareLaunchArgument( - "mecanum", - default_value="False", - description=( - "Whether to use mecanum drive controller (otherwise diff drive controller is used)" - ), - ) + rosbot_controller = FindPackageShare("rosbot_controller") controller_launch = IncludeLaunchDescription( PythonLaunchDescriptionSource( - PathJoinSubstitution( - [ - rosbot_controller, - "launch", - "controller.launch.py", - ] - ) + PathJoinSubstitution([rosbot_controller, "launch", "controller.launch.py"]) ), launch_arguments={ - "use_sim": use_sim, - "mecanum": mecanum, "namespace": namespace, + "use_sim": use_sim, }.items(), ) + healthcheck_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + PathJoinSubstitution([rosbot_bringup, "launch", "healthcheck.launch.py"]) + ) + ) + + # microros_launch = IncludeLaunchDescription( + # PythonLaunchDescriptionSource( + # PathJoinSubstitution([rosbot_bringup, "launch", "microros.launch.py"]) + # ), + # condition=UnlessCondition([use_sim]), + # ) + ekf_config = PathJoinSubstitution([rosbot_bringup, "config", "ekf.yaml"]) robot_localization_node = Node( @@ -98,12 +91,11 @@ def generate_launch_description(): actions = [ declare_namespace_arg, - declare_mecanum_arg, - declare_use_sim_arg, - SetParameter(name="use_sim_time", value=use_sim), controller_launch, - robot_localization_node, + healthcheck_launch, + # microros_launch, laser_filter_node, + robot_localization_node, ] return LaunchDescription(actions) diff --git a/rosbot_bringup/launch/healthcheck.launch.py b/rosbot_bringup/launch/healthcheck.launch.py new file mode 100644 index 00000000..a6011646 --- /dev/null +++ b/rosbot_bringup/launch/healthcheck.launch.py @@ -0,0 +1,98 @@ +# Copyright 2020 ros2_control Development Team +# Copyright 2024 Husarion sp. z o.o. +# +# 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. + +import os +import subprocess + +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument, EmitEvent, OpaqueFunction, TimerAction +from launch.conditions import IfCondition +from launch.events import Shutdown +from launch.substitutions import LaunchConfiguration + + +def check_controller_status(context): + use_sim = LaunchConfiguration("use_sim", default="False").perform(context) + nodes_to_check = [ + "/controller_manager", + "/ekf_filter_node", + "/imu_broadcaster", + "/joint_state_broadcaster", + "/laser_scan_box_filter", + "/robot_state_publisher", + "/rosbot_base_controller", + "/scan_to_scan_filter_chain", + ] + if use_sim == "True": + additional_nodes = [ + "/gz_ros2_control", + "/ros_gz_bridge", + ] + else: + additional_nodes = [ + "/imu_sensor_node", + "/rosbot_ros2_firmware", + "/rosbot_system_node", + ] + nodes_to_check.extend(additional_nodes) + + namespace = LaunchConfiguration("namespace", default="").perform(context) + ns = "/" + namespace if namespace else "" + nodes_to_check = [ns + node for node in nodes_to_check] + + def get_missing_nodes(): + env = os.environ.copy() + env["ROS_LOCALHOST_ONLY"] = "1" + + result = subprocess.run( + ["ros2", "node", "list"], + stdout=subprocess.PIPE, + text=True, + env=env, + ) + active_nodes = result.stdout.splitlines() + return [node for node in nodes_to_check if node not in active_nodes] + + missing_nodes = get_missing_nodes() + green_color = "\033[92m" + red_color = "\033[91m" + reset_color = "\033[0m" + + if missing_nodes: + print( + f"{red_color}Error: some nodes are missing: {missing_nodes}. Emitting shutdown...{reset_color}" + ) + return [EmitEvent(event=Shutdown())] + else: + print(f"{green_color}All systems are up and running!{reset_color}") + + +def generate_launch_description(): + healthcheck = LaunchConfiguration("healthcheck") + + declare_healthcheck_arg = DeclareLaunchArgument( + "healthcheck", + default_value="True", + description="Check if all node are up and ready, if not emit shutdown signal.", + choices=["True", "true", "False", "false"], + ) + + check_controller = TimerAction( + period=15.0, + actions=[OpaqueFunction(function=check_controller_status)], + condition=IfCondition(healthcheck), + ) + + return LaunchDescription([declare_healthcheck_arg, check_controller]) diff --git a/rosbot_bringup/launch/microros.launch.py b/rosbot_bringup/launch/microros.launch.py new file mode 100644 index 00000000..d625f222 --- /dev/null +++ b/rosbot_bringup/launch/microros.launch.py @@ -0,0 +1,111 @@ +# Copyright 2024 Husarion sp. z o.o. +# +# 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. + +import os + +from launch import LaunchDescription +from launch.actions import ( + DeclareLaunchArgument, + LogInfo, + OpaqueFunction, + SetEnvironmentVariable, +) +from launch.substitutions import LaunchConfiguration, PathJoinSubstitution +from launch_ros.actions import Node +from launch_ros.substitutions import FindPackageShare + + +def generate_microros_agent_node(context, *args, **kwargs): + env_setup_actions = [] + + ros_domain_id = os.environ.get("ROS_DOMAIN_ID") + if ros_domain_id: + env_setup_actions.append( + SetEnvironmentVariable(name="XRCE_DOMAIN_ID_OVERRIDE", value=ros_domain_id) + ) + + port = LaunchConfiguration("port").perform(context) + serial_baudrate = LaunchConfiguration("serial_baudrate").perform(context) + localhost_only_fastrtps_profiles_file = LaunchConfiguration( + "localhost_only_fastrtps_profiles_file" + ).perform(context) + + if os.environ.get("ROS_LOCALHOST_ONLY") == "1": + env_setup_actions.extend( + [ + LogInfo( + msg=[ + "ROS_LOCALHOST_ONLY set to 1. Using FASTRTPS_DEFAULT_PROFILES_FILE=", + localhost_only_fastrtps_profiles_file, + ".", + ] + ), + SetEnvironmentVariable(name="RMW_IMPLEMENTATION", value="rmw_fastrtps_cpp"), + SetEnvironmentVariable( + name="FASTRTPS_DEFAULT_PROFILES_FILE", + value=localhost_only_fastrtps_profiles_file, + ), + ] + ) + + microros_agent_node = Node( + package="micro_ros_agent", + executable="micro_ros_agent", + arguments=["serial", "-D", port, "-b", serial_baudrate], + output="screen", + ) + + return env_setup_actions + [microros_agent_node] + else: + microros_agent_node = Node( + package="micro_ros_agent", + executable="micro_ros_agent", + arguments=["serial", "-D", port, "-b", serial_baudrate], + output="screen", + ) + + return env_setup_actions + [microros_agent_node] + + +def generate_launch_description(): + declare_port_arg = DeclareLaunchArgument( + "port", + default_value="/dev/ttySERIAL", + description="Serial port for micro-ROS agent", + ) + + declare_serial_baudrate_arg = DeclareLaunchArgument( + "serial_baudrate", default_value="576000", description="Baud rate for serial communication" + ) + + fastrtps_profiles_file = PathJoinSubstitution( + [FindPackageShare("rosbot_bringup"), "config", "microros_localhost_only.xml"] + ) + declare_localhost_only_fastrtps_profiles_file_arg = DeclareLaunchArgument( + "localhost_only_fastrtps_profiles_file", + default_value=fastrtps_profiles_file, + description=( + "Path to the Fast RTPS default profiles file for Micro-ROS agent for localhost only" + " setup" + ), + ) + + return LaunchDescription( + [ + declare_port_arg, + declare_serial_baudrate_arg, + declare_localhost_only_fastrtps_profiles_file_arg, + OpaqueFunction(function=generate_microros_agent_node), + ] + ) diff --git a/rosbot_bringup/package.xml b/rosbot_bringup/package.xml index f44fddd8..51afb56c 100644 --- a/rosbot_bringup/package.xml +++ b/rosbot_bringup/package.xml @@ -21,8 +21,8 @@ laser_filters rosbot_controller robot_localization - micro_ros_agent - micro_ros_msgs + micro_ros_agent + micro_ros_msgs python3-pytest launch diff --git a/rosbot_controller/launch/controller.launch.py b/rosbot_controller/launch/controller.launch.py index d169d7a8..1505b89a 100644 --- a/rosbot_controller/launch/controller.launch.py +++ b/rosbot_controller/launch/controller.launch.py @@ -23,26 +23,28 @@ PathJoinSubstitution, PythonExpression, ) -from launch_ros.actions import Node, SetParameter +from launch_ros.actions import Node from launch_ros.substitutions import FindPackageShare def generate_launch_description(): namespace = LaunchConfiguration("namespace") + mecanum = LaunchConfiguration("mecanum") + simulation_engine = LaunchConfiguration("simulation_engine") + use_sim = LaunchConfiguration("use_sim", default="False") + declare_namespace_arg = DeclareLaunchArgument( "namespace", default_value="", description="Adds a namespace to all running nodes.", ) - mecanum = LaunchConfiguration("mecanum") declare_mecanum_arg = DeclareLaunchArgument( "mecanum", default_value="False", description="Whether to use mecanum drive controller (otherwise diff drive controller is used)", ) - simulation_engine = LaunchConfiguration("simulation_engine") declare_simulation_engine_arg = DeclareLaunchArgument( "simulation_engine", default_value="ignition-gazebo", @@ -50,13 +52,6 @@ def generate_launch_description(): choices=["ignition-gazebo", "webots"], ) - use_sim = LaunchConfiguration("use_sim") - declare_use_sim_arg = DeclareLaunchArgument( - "use_sim", - default_value="False", - description="Whether simulation is used", - ) - controller_config_name = PythonExpression( [ "'mecanum_drive_controller.yaml' if ", @@ -183,8 +178,6 @@ def generate_launch_description(): declare_namespace_arg, declare_mecanum_arg, declare_simulation_engine_arg, - declare_use_sim_arg, - SetParameter("use_sim_time", value=use_sim), control_node, robot_state_pub_node, delayed_spawner_nodes, diff --git a/rosbot_controller/package.xml b/rosbot_controller/package.xml index 5066af4c..a0e82f6c 100644 --- a/rosbot_controller/package.xml +++ b/rosbot_controller/package.xml @@ -19,15 +19,12 @@ launch launch_ros - xacro controller_manager robot_state_publisher - rosbot_description ros_components_description - rosbot_hardware_interfaces - + rosbot_hardware_interfaces joint_state_broadcaster imu_sensor_broadcaster diff_drive_controller @@ -37,14 +34,11 @@ launch launch_ros launch_pytest - xacro sensor_msgs nav_msgs - rosbot_description ros_components_description - controller_manager joint_state_broadcaster imu_sensor_broadcaster diff --git a/rosbot_gazebo/launch/simulation.launch.py b/rosbot_gazebo/launch/simulation.launch.py index 44c92a71..d79df561 100644 --- a/rosbot_gazebo/launch/simulation.launch.py +++ b/rosbot_gazebo/launch/simulation.launch.py @@ -28,7 +28,6 @@ def generate_launch_description(): namespace = LaunchConfiguration("namespace") - mecanum = LaunchConfiguration("mecanum") x = LaunchConfiguration("x", default="0.0") y = LaunchConfiguration("y", default="2.0") z = LaunchConfiguration("z", default="0.0") @@ -42,14 +41,6 @@ def generate_launch_description(): description="Namespace for all topics and tfs", ) - declare_mecanum_arg = DeclareLaunchArgument( - "mecanum", - default_value="False", - description=( - "Whether to use mecanum drive controller (otherwise diff drive controller is used)" - ), - ) - declare_robots_arg = DeclareLaunchArgument( "robots", default_value="", @@ -100,7 +91,6 @@ def generate_launch_description(): ) ), launch_arguments={ - "mecanum": mecanum, "use_sim": "True", "namespace": robot_name, "x": init_pose["x"], @@ -117,7 +107,6 @@ def generate_launch_description(): return LaunchDescription( [ declare_namespace_arg, - declare_mecanum_arg, declare_robots_arg, SetParameter(name="use_sim_time", value=True), gz_sim, diff --git a/rosbot_gazebo/launch/spawn.launch.py b/rosbot_gazebo/launch/spawn.launch.py index 64134d39..d0b28cee 100644 --- a/rosbot_gazebo/launch/spawn.launch.py +++ b/rosbot_gazebo/launch/spawn.launch.py @@ -26,7 +26,6 @@ def generate_launch_description(): - mecanum = LaunchConfiguration("mecanum") namespace = LaunchConfiguration("namespace") x = LaunchConfiguration("x") y = LaunchConfiguration("y") @@ -35,14 +34,6 @@ def generate_launch_description(): pitch = LaunchConfiguration("pitch") yaw = LaunchConfiguration("yaw") - declare_mecanum_arg = DeclareLaunchArgument( - "mecanum", - default_value="False", - description=( - "Whether to use mecanum drive controller (otherwise diff drive controller is used)" - ), - ) - declare_namespace_arg = DeclareLaunchArgument( "namespace", default_value="", @@ -155,7 +146,6 @@ def generate_launch_description(): ) ), launch_arguments={ - "mecanum": mecanum, "use_sim": "True", "namespace": namespace, }.items(), @@ -163,7 +153,6 @@ def generate_launch_description(): return LaunchDescription( [ - declare_mecanum_arg, declare_namespace_arg, declare_x_arg, declare_y_arg, diff --git a/rosbot_gazebo/package.xml b/rosbot_gazebo/package.xml index 5c7a01a9..31f93620 100644 --- a/rosbot_gazebo/package.xml +++ b/rosbot_gazebo/package.xml @@ -17,29 +17,23 @@ Jakub Delicat Rafal Gorecki - rosbot_bringup - - launch - launch_ros - - husarion_gz_worlds - ros_gz_sim - - ros_gz_bridge - ign_ros2_control - nav2_common - - python3-pytest - launch - launch_ros - launch_pytest - - tf_transformations - python-transforms3d-pip - nav_msgs - geometry_msgs + rosbot_bringup + launch + launch_ros + husarion_gz_worlds + ros_gz_sim + ros_gz_bridge + ign_ros2_control + nav2_common + + python3-pytest + launch + launch_ros + launch_pytest + tf_transformations + python-transforms3d-pip + nav_msgs + geometry_msgs ament_python