Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add namespace #59

Merged
merged 52 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e5ca1f5
added tf_prefixes to the urdf
delihus Nov 14, 2023
bc12fe8
add namespace to world list
delihus Nov 14, 2023
56863d6
tf_prefix for controller
delihus Nov 15, 2023
4698605
added namespace in mecanum test
delihus Nov 15, 2023
201444e
Added namespace to bringup
delihus Nov 15, 2023
72b4cdc
Merge remote-tracking branch 'origin/master' into add-namespace
delihus Jan 10, 2024
e5313fb
added fixed namespaces to description and controller
delihus Jan 10, 2024
5dfe0ae
Updated worldlist
delihus Jan 11, 2024
d6eb5c1
added multirobot test to controllers
delihus Jan 11, 2024
0e41f2b
Added rosbot_xl_bringup multirobot test
delihus Jan 11, 2024
e5b6395
fixed .repos
delihus Jan 11, 2024
25423fd
updated submodules
delihus Jan 11, 2024
8a60619
updated industrial
delihus Jan 11, 2024
9c76371
first simulation launch
delihus Jan 15, 2024
281e7cb
moved remapings to the urdf of intel
delihus Jan 15, 2024
c7f8fa2
updated submodules
delihus Jan 15, 2024
3cc7387
Added tf fixer | remapped pointcloud topic in .yaml
delihus Jan 15, 2024
f0e3364
added astra
delihus Jan 15, 2024
49968d6
Added zed
delihus Jan 15, 2024
d3b38c1
Added namespaced velodyne
delihus Jan 15, 2024
f601493
added remappings for velodyne
delihus Jan 15, 2024
5182083
added tests from rosbot_ros | fixed imu
delihus Jan 15, 2024
6c0a275
add to the worldlist
delihus Jan 15, 2024
a260718
lint | added multirobot simulation tests
delihus Jan 15, 2024
7499684
added multirobot tests | added tf_ros2_py dependency to the rosbot_ros
delihus Jan 15, 2024
f5ba1a5
fixed xacro test
delihus Jan 16, 2024
e3f91c7
fixed removeing gz tests
delihus Jan 16, 2024
050d634
created src insisde industrial ci
delihus Jan 16, 2024
6af9089
removed geometry2
delihus Jan 16, 2024
f33fad1
Update industrial_ci.yaml
delihus Jan 16, 2024
b476419
added psutil dep
delihus Jan 16, 2024
97799b3
added psutil dep
delihus Jan 16, 2024
d75d58a
added psutil dep
delihus Jan 16, 2024
303d06c
formatted package.xml files | removed one robot from controller tests
delihus Jan 17, 2024
82c437b
updated package.xml in rosbot_xl_description
delihus Jan 17, 2024
df4f4bb
updated tests
delihus Jan 17, 2024
03a6d8f
Removed multirobot tests
delihus Jan 18, 2024
30cf4c9
Removed multirobot tests
delihus Jan 18, 2024
a1e8368
Revert "Removed multirobot tests"
delihus Jan 18, 2024
2a8fa7d
Added delayed spawn for controllers
delihus Jan 18, 2024
75dfea9
Added spawner to worldlist
delihus Jan 18, 2024
66a91d1
bringup and controllers passes industrial
delihus Jan 23, 2024
44801d5
Testing gazebo
delihus Jan 23, 2024
c6cd90d
industrial passes
delihus Jan 24, 2024
f58d212
Passing industrial tests
delihus Jan 24, 2024
f11491f
removed comments
delihus Jan 24, 2024
fcf454a
Added bringup and controller tests
delihus Jan 25, 2024
03abd41
typo
delihus Jan 25, 2024
f1eed28
Update test_multirobot_controllers.py
delihus Jan 25, 2024
03e48e2
updated repos
delihus Jan 30, 2024
8bd47cd
rosbot_hardware_interfaces main to ros2
delihus Jan 30, 2024
dc888ca
Add namespace suggestions (#60)
rafal-gorecki Jan 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
extend-ignore = E203, B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202
extend-ignore = E203, B902,C816,D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404,I202,E203
import-order-style = google
max-line-length = 99
show-source = true
Expand Down
36 changes: 33 additions & 3 deletions .github/workflows/industrial_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,42 @@ jobs:
matrix:
ROS_DISTRO: [humble]
runs-on: ubuntu-latest
timeout-minutes: 16
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Copy to src
run: |
mkdir -p src
find . -maxdepth 1 -not -name src -not -name . -exec mv {} src/ \;

- name: Clone installation requirements
shell: bash
run: python3 -m pip install -U vcstool && vcs import . < ./rosbot_xl/rosbot_xl_hardware.repos && vcs import . < ./rosbot_xl/rosbot_xl_simulation.repos
run: |
python3 -m pip install -U vcstool
vcs import src < src/rosbot_xl/rosbot_xl_hardware.repos
vcs import src < src/rosbot_xl/rosbot_xl_simulation.repos

- name: Copy only diff_drive_controller and imu_sensor_broadcaster, waits for features from ros2-control
shell: bash
run: |
cp -r src/ros2_controllers/diff_drive_controller src/
cp -r src/ros2_controllers/imu_sensor_broadcaster src/
rm -rf src/ros2_controllers

- name: Copy only tf2_ros_py from geometry2, waits for https://github.com/ros2/geometry2/pull/641
shell: bash
run: |
cp -r src/geometry2/tf2_ros_py src/
rm -rf src/geometry2/

- name: Remove ign_ros2_control demo
shell: bash
run: |
rm -rf src/gazebosim/gz_ros2_control/ign_ros2_control_demos &&
rm -rf src/gazebosim/gz_ros2_control/gz_ros2_control_tests

- uses: ros-industrial/industrial_ci@master
env:
ROS_DISTRO: ${{matrix.ROS_DISTRO}}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ ros_components_description/
rosbot_controllers/
husarion/husarion_office_gz
gazebosim/gz_ros2_control
ros2_controllers/
diff_drive_controller/
imu_sensor_broadcaster/
tf2_ros_py/

# pyspelling
*.dic
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ repos:
rev: 23.11.0
hooks:
- id: black
args: ["--line-length=99", "--preview"]
args: ["--line-length=99", "--experimental-string-processing"]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
args: ["--ignore=E501,W503,E203"] # ignore too long line and line break before binary operator,
args: ["--ignore=E501,W503"] # ignore too long line and line break before binary operator,
# black checks it

- repo: local
Expand Down
13 changes: 13 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,16 @@ utils
tf
yaml
odometry
namespaces
namespace
delihus
microros
remappings
unbuffered
py
len
ns
psutil
src
xml
spawner
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ vcs import src < src/rosbot_xl/rosbot_xl_hardware.repos

rm -r src/rosbot_xl_gazebo

# Copy only diff_drive_controller and imu_sensor_broadcaster, waits for features from ros2-control
cp -r src/ros2_controllers/diff_drive_controller src/
cp -r src/ros2_controllers/imu_sensor_broadcaster src/
rm -rf src/ros2_controllers

# Copy only tf2_ros_py from geometry2, waits for https://github.com/ros2/geometry2/pull/641
cp -r src/geometry2/tf2_ros_py src/
rm -rf src/geometry2/

rosdep init
rosdep update --rosdistro $ROS_DISTRO
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
Expand All @@ -95,6 +104,19 @@ source /opt/ros/$ROS_DISTRO/setup.bash
vcs import src < src/rosbot_xl/rosbot_xl_hardware.repos
vcs import src < src/rosbot_xl/rosbot_xl_simulation.repos

# Copy only diff_drive_controller and imu_sensor_broadcaster, waits for features from ros2-control
cp -r src/ros2_controllers/diff_drive_controller src/
cp -r src/ros2_controllers/imu_sensor_broadcaster src/
rm -rf src/ros2_controllers

# Copy only tf2_ros_py from geometry2, waits for https://github.com/ros2/geometry2/pull/641
cp -r src/geometry2/tf2_ros_py src/
rm -rf src/geometry2/

# Remove ign_ros2_control demo
rm -rf src/gazebosim/gz_ros2_control/ign_ros2_control_demos &&
rm -rf src/gazebosim/gz_ros2_control/gz_ros2_control_tests

rosdep init
rosdep update --rosdistro $ROS_DISTRO
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
Expand Down
10 changes: 7 additions & 3 deletions rosbot_xl/rosbot_xl_hardware.repos
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ repositories:
type: git
url: https://github.com/husarion/rosbot_hardware_interfaces.git
version: main
ros_components_description:
type: git
url: https://github.com/husarion/ros_components_description.git
version: ros2
rosbot_controllers:
type: git
url: https://github.com/husarion/rosbot_controllers
version: main
ros_components_description:
ros2_controllers:
type: git
url: https://github.com/husarion/ros_components_description.git
version: ros2
url: https://github.com/delihus/ros2_controllers
version: humble
11 changes: 2 additions & 9 deletions rosbot_xl/rosbot_xl_simulation.repos
delihus marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
repositories:
gazebosim/gz_ros2_control:
husarion/husarion_office_gz:
type: git
url: https://github.com/ros-controls/gz_ros2_control.git
# on branch humble hardware isn't activated
# recently on master API breaking change was introduced, it is necessary to use commit before this change
version: b296ff2f5c3758b637a70bd496fe6ed875ab03ce

husarion/gazebo_worlds:
type: git
url: https://github.com/husarion/gazebo_worlds.git
url: https://github.com/husarion/husarion_office_gz
version: main
6 changes: 3 additions & 3 deletions rosbot_xl_bringup/config/ekf.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Ref: http://docs.ros.org/en/noetic/api/robot_localization/html/state_estimation_nodes.html

## ekf config file ###
ekf_filter_node:
/**/ekf_filter_node:
ros__parameters:
frequency: 25.0
sensor_timeout: 0.05
Expand All @@ -17,7 +17,7 @@ ekf_filter_node:
publish_tf: true
publish_acceleration: false

odom0: /rosbot_xl_base_controller/odom
odom0: rosbot_xl_base_controller/odom
odom0_config: [false, false, false, # X , Y , Z
false, false, false, # roll , pitch ,yaw
true, true, false, # dX , dY , dZ
Expand All @@ -29,7 +29,7 @@ ekf_filter_node:
odom0_differential: false
odom0_relative: true

imu0: /imu_broadcaster/imu
imu0: imu_broadcaster/imu
imu0_config: [false, false, false, # X , Y , Z
false, false, true, # roll , pitch ,yaw
false, false, false, # dX , dY , dZ
Expand Down
2 changes: 1 addition & 1 deletion rosbot_xl_bringup/config/laser_filter.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scan_to_scan_filter_chain:
/**/scan_to_scan_filter_chain:
ros__parameters:
filter1:
name: box_filter
Expand Down
87 changes: 55 additions & 32 deletions rosbot_xl_bringup/launch/bringup.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription, DeclareLaunchArgument
from launch.substitutions import (
PathJoinSubstitution,
LaunchConfiguration,
)
from launch.substitutions import PathJoinSubstitution, LaunchConfiguration
from launch.launch_description_sources import PythonLaunchDescriptionSource

from launch_ros.actions import Node, SetParameter
Expand All @@ -26,6 +23,13 @@


def generate_launch_description():
namespace = LaunchConfiguration("namespace")
declare_namespace_arg = DeclareLaunchArgument(
"namespace",
default_value="",
description="Namespace for all topics and tfs",
)

mecanum = LaunchConfiguration("mecanum")
declare_mecanum_arg = DeclareLaunchArgument(
"mecanum",
Expand Down Expand Up @@ -90,13 +94,18 @@ def generate_launch_description():
description="Which simulation engine will be used",
)

rosbot_xl_controller = get_package_share_directory("rosbot_xl_controller")
rosbot_xl_bringup = get_package_share_directory("rosbot_xl_bringup")

controller_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
PathJoinSubstitution([
get_package_share_directory("rosbot_xl_controller"),
"launch",
"controller.launch.py",
])
PathJoinSubstitution(
[
rosbot_xl_controller,
"launch",
"controller.launch.py",
]
)
),
launch_arguments={
"mecanum": mecanum,
Expand All @@ -105,44 +114,58 @@ def generate_launch_description():
"include_camera_mount": include_camera_mount,
"use_sim": use_sim,
"simulation_engine": simulation_engine,
"namespace": namespace,
}.items(),
)

ekf_config = PathJoinSubstitution([rosbot_xl_bringup, "config", "ekf.yaml"])

robot_localization_node = Node(
package="robot_localization",
executable="ekf_node",
name="ekf_filter_node",
output="screen",
parameters=[
PathJoinSubstitution([
get_package_share_directory("rosbot_xl_bringup"), "config", "ekf.yaml"
])
parameters=[ekf_config],
remappings=[
("/tf", "tf"),
("/tf_static", "tf_static"),
],
namespace=namespace,
)

laser_filter_config = PathJoinSubstitution(
[
rosbot_xl_bringup,
"config",
"laser_filter.yaml",
]
)

laser_filter_node = Node(
package="laser_filters",
executable="scan_to_scan_filter_chain",
parameters=[
PathJoinSubstitution([
get_package_share_directory("rosbot_xl_bringup"),
"config",
"laser_filter.yaml",
])
laser_filter_config,
],
remappings=[
("/tf", "tf"),
("/tf_static", "tf_static"),
],
namespace=namespace,
)

actions = [
declare_mecanum_arg,
declare_lidar_model_arg,
declare_camera_model_arg,
declare_include_camera_mount_arg,
declare_use_sim_arg,
declare_simulation_engine_arg,
SetParameter(name="use_sim_time", value=use_sim),
controller_launch,
robot_localization_node,
laser_filter_node,
]

return LaunchDescription(actions)
return LaunchDescription(
[
declare_namespace_arg,
declare_mecanum_arg,
declare_lidar_model_arg,
declare_camera_model_arg,
declare_include_camera_mount_arg,
declare_use_sim_arg,
declare_simulation_engine_arg,
SetParameter(name="use_sim_time", value=use_sim),
controller_launch,
robot_localization_node,
laser_filter_node,
]
)
20 changes: 13 additions & 7 deletions rosbot_xl_bringup/package.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<!-- Used https://github.com/colcon/colcon-bundle/blob/master/integration/test_workspace/src/test-nodes/package.xml -->
<package format="3">
<name>rosbot_xl_bringup</name>
<version>0.8.12</version>
Expand All @@ -15,22 +16,27 @@
<url type="repository">https://github.com/husarion/rosbot_xl_ros</url>
<url type="bugtracker">https://github.com/husarion/rosbot_xl_ros/issues</url>

<exec_depend>rosbot_xl_controller</exec_depend>

<!-- Launch tools dependencies -->
<exec_depend>ros2launch</exec_depend>
<exec_depend>launch</exec_depend>
<exec_depend>launch_ros</exec_depend>
<exec_depend>ament_index_python</exec_depend>

<!-- Husarion dependencies -->
<exec_depend>rosbot_xl_controller</exec_depend>

<!-- Launched packages dependencies -->
<exec_depend>laser_filters</exec_depend>
<exec_depend>robot_localization</exec_depend>

<!-- Launch and test dependencies -->
<test_depend>rclpy</test_depend>
<test_depend>python3-pytest</test_depend>
<test_depend>launch</test_depend>
<test_depend>launch_ros</test_depend>
<test_depend>launch_pytest</test_depend>

<test_depend>laser_filters</test_depend>
<test_depend>robot_localization</test_depend>
<test_depend>rosbot_xl_controller</test_depend>
<!-- Packages used in tests -->
<test_depend>tf2_ros_py</test_depend>
<test_depend>sensor_msgs</test_depend>

<export>
<build_type>ament_python</build_type>
Expand Down
Loading
Loading