-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added namespaces to ros2_control Signed-off-by: Jakub Delicat <[email protected]> * removed action group Signed-off-by: Jakub Delicat <[email protected]> * Added namespace to robot description Signed-off-by: Jakub Delicat <[email protected]> * added tests for namespaces in rosbot_controller Signed-off-by: Jakub Delicat <[email protected]> * update worldlist Signed-off-by: Jakub Delicat <[email protected]> * fixed ros2_control namespaces | added namespace to ekf Signed-off-by: Jakub Delicat <[email protected]> * added mecanum Signed-off-by: Jakub Delicat <[email protected]> * added ros2_controllers to .gitignore Signed-off-by: Jakub Delicat <[email protected]> * ignored ros2_controllers during Industrial CI Signed-off-by: Jakub Delicat <[email protected]> * fixed tests Signed-off-by: Jakub Delicat <[email protected]> * added tf_prefix to imu_sensor_broadcaster Signed-off-by: Jakub Delicat <[email protected]> * copied only diff_drive and imu_broadcaster Signed-off-by: Jakub Delicat <[email protected]> * changed comments | changed timeout for controller test Signed-off-by: Jakub Delicat <[email protected]> * param changed to parameter Signed-off-by: Jakub Delicat <[email protected]> * Multi robot diff drive example Signed-off-by: Jakub Delicat <[email protected]> * imu also works Signed-off-by: Jakub Delicat <[email protected]> * Added use_multirobot_system | found imu error Signed-off-by: Jakub Delicat <[email protected]> * changed all topics to ns Signed-off-by: Jakub Delicat <[email protected]> * removed tf_prefix from xacro tests Signed-off-by: Jakub Delicat <[email protected]> * removed comments | add use_multirobot_system arg Signed-off-by: Jakub Delicat <[email protected]> * moved multi robot system controllers config to rosbot_controller Signed-off-by: Jakub Delicat <[email protected]> * fixed rosbot_gazebo test Signed-off-by: Jakub Delicat <[email protected]> * separated namespaced tests | added multirobot gazebo example with broken imu Signed-off-by: Jakub Delicat <[email protected]> * add multicontroller test Signed-off-by: Jakub Delicat <[email protected]> * add multibringup test Signed-off-by: Jakub Delicat <[email protected]> * add multibringup test Signed-off-by: Jakub Delicat <[email protected]> * Added remove rosbot_macro Signed-off-by: Jakub Delicat <[email protected]> * fixed miss spelling Signed-off-by: Jakub Delicat <[email protected]> * The change from robot_hardware_interface seems to be unnecessary Signed-off-by: Jakub Delicat <[email protected]> * moved multirobot tests to arrays Signed-off-by: Jakub Delicat <[email protected]> * move rosbot_hardware_interfaces to main Signed-off-by: Jakub Delicat <[email protected]> * Fixed len Signed-off-by: Jakub Delicat <[email protected]> * Added updated controllers info to readme Signed-off-by: Jakub Delicat <[email protected]> * Update README.md Co-authored-by: rafal-gorecki <[email protected]> * Update README.md --------- Signed-off-by: Jakub Delicat <[email protected]> Co-authored-by: rafal-gorecki <[email protected]>
- Loading branch information
1 parent
3f9cfcc
commit 5762b53
Showing
33 changed files
with
1,495 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,3 +120,8 @@ Palacios | |
env | ||
pids | ||
pgrep | ||
namespace | ||
TODO | ||
delipl | ||
microros | ||
namespaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Copyright 2021 Open Source Robotics Foundation, Inc. | ||
# Copyright 2023 Intel Corporation. All Rights Reserved. | ||
# Copyright 2023 Husarion | ||
# | ||
# 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 launch_pytest | ||
import pytest | ||
import rclpy | ||
|
||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch.actions import IncludeLaunchDescription, TimerAction | ||
from launch.substitutions import PathJoinSubstitution | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from test_utils import BringupTestNode | ||
|
||
robot_names = ["rosbot1", "rosbot2", "rosbot3", "rosbot4"] | ||
|
||
|
||
@launch_pytest.fixture | ||
def generate_test_description(): | ||
rosbot_bringup = get_package_share_directory("rosbot_bringup") | ||
actions = [] | ||
for i in range(len(robot_names)): | ||
bringup_launch = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
PathJoinSubstitution( | ||
[ | ||
rosbot_bringup, | ||
"launch", | ||
"bringup.launch.py", | ||
] | ||
) | ||
), | ||
launch_arguments={ | ||
"use_sim": "False", | ||
"mecanum": "False", | ||
"use_gpu": "False", | ||
"namespace": robot_names[i], | ||
}.items(), | ||
) | ||
if i > 0: | ||
delayed_bringup_launch = TimerAction(period=i * 10.0, actions=[bringup_launch]) | ||
actions.append(delayed_bringup_launch) | ||
else: | ||
actions.append(bringup_launch) | ||
|
||
return LaunchDescription(actions) | ||
|
||
|
||
@pytest.mark.launch(fixture=generate_test_description) | ||
def test_multirobot_bringup_startup_success(): | ||
for robot_name in robot_names: | ||
rclpy.init() | ||
try: | ||
node = BringupTestNode("test_bringup", namespace=robot_name) | ||
node.create_test_subscribers_and_publishers() | ||
node.start_publishing_fake_hardware() | ||
|
||
node.start_node_thread() | ||
msgs_received_flag = node.odom_msg_event.wait(timeout=20.0) | ||
assert msgs_received_flag, ( | ||
f"Expected {robot_name}/odometry/filtered message but it was not received. " | ||
"Check robot_localization!" | ||
) | ||
|
||
finally: | ||
rclpy.shutdown() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Copyright 2021 Open Source Robotics Foundation, Inc. | ||
# Copyright 2023 Intel Corporation. All Rights Reserved. | ||
# Copyright 2023 Husarion | ||
# | ||
# 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 launch_pytest | ||
import pytest | ||
import rclpy | ||
|
||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch.actions import IncludeLaunchDescription | ||
from launch.substitutions import PathJoinSubstitution | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from test_utils import BringupTestNode | ||
|
||
|
||
@launch_pytest.fixture | ||
def generate_test_description(): | ||
rosbot_bringup = get_package_share_directory("rosbot_bringup") | ||
bringup_launch = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource( | ||
PathJoinSubstitution( | ||
[ | ||
rosbot_bringup, | ||
"launch", | ||
"bringup.launch.py", | ||
] | ||
) | ||
), | ||
launch_arguments={ | ||
"use_sim": "False", | ||
"mecanum": "False", | ||
"use_gpu": "False", | ||
"namespace": "rosbot2r", | ||
}.items(), | ||
) | ||
|
||
return LaunchDescription([bringup_launch]) | ||
|
||
|
||
@pytest.mark.launch(fixture=generate_test_description) | ||
def test_namespaced_bringup_startup_success(): | ||
rclpy.init() | ||
try: | ||
node = BringupTestNode("test_bringup", namespace="rosbot2r") | ||
node.create_test_subscribers_and_publishers() | ||
node.start_publishing_fake_hardware() | ||
|
||
node.start_node_thread() | ||
msgs_received_flag = node.odom_msg_event.wait(timeout=10.0) | ||
assert ( | ||
msgs_received_flag | ||
), "Expected odometry/filtered message but it was not received. Check robot_localization!" | ||
|
||
finally: | ||
rclpy.shutdown() |
Oops, something went wrong.