Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Commit 1a6ecc6

Browse files
committed
Changes in description package
1 parent 21ca200 commit 1a6ecc6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1656
-655
lines changed

rosbot_xl/rosbot_xl_hardware.repos

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
repositories:
2-
rosbot_hardware_interfaces:
3-
type: git
4-
url: https://github.com/husarion/rosbot_hardware_interfaces.git
5-
version: main
6-
ros_components_description:
2+
husarion_controllers:
73
type: git
8-
url: https://github.com/husarion/ros_components_description.git
9-
version: a6473588eee97feaee3481f9eba4f746b1f4476e # New features can break some functions
4+
url: https://github.com/husarion/husarion_controllers
5+
version: 053c5b1320352c496ac2d02c8bc44c695d8dd4ad
106
micro_ros_msgs:
117
type: git
128
url: https://github.com/micro-ROS/micro_ros_msgs.git
13-
version: humble
9+
version: 4594d9db17db735b1e655141fb4afb4cdcfc5789
1410
micro-ROS-Agent:
1511
type: git
1612
url: https://github.com/micro-ROS/micro-ROS-Agent.git
17-
version: humble
18-
husarion_controllers:
13+
version: af007872b034d1ed31de4815377031350ab0034b
14+
ros_components_description:
1915
type: git
20-
url: https://github.com/husarion/husarion_controllers
21-
version: 217b09830f5f42930098b9992eda41710702b625
22-
ros2_controllers:
16+
url: https://github.com/husarion/ros_components_description.git
17+
version: d34d27edb3abc12ee6d197d0d513e00fe9a5604e
18+
rosbot_hardware_interfaces:
2319
type: git
24-
url: https://github.com/delihus/ros2_controllers
25-
version: humble
20+
url: https://github.com/husarion/rosbot_hardware_interfaces.git
21+
version: b699e375a677ef53fa31c5fc27766c2df35e39c3
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
repositories:
2+
husarion_controllers:
3+
type: git
4+
url: https://github.com/husarion/husarion_controllers
5+
version: 053c5b1320352c496ac2d02c8bc44c695d8dd4ad
26
husarion_gz_worlds:
37
type: git
48
url: https://github.com/husarion/husarion_gz_worlds
5-
version: main
9+
version: ce6069b167682f3e2528975a3f6968ec666a639d
10+
ros_components_description:
11+
type: git
12+
url: https://github.com/husarion/ros_components_description.git
13+
version: d34d27edb3abc12ee6d197d0d513e00fe9a5604e

rosbot_xl_bringup/launch/bringup.launch.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,6 @@ def generate_launch_description():
8989
description="Whether simulation is used",
9090
)
9191

92-
simulation_engine = LaunchConfiguration("simulation_engine")
93-
declare_simulation_engine_arg = DeclareLaunchArgument(
94-
"simulation_engine",
95-
default_value="ignition-gazebo",
96-
description="Which simulation engine will be used",
97-
)
98-
9992
combined_launch_deprecated = LaunchConfiguration("combined_launch_deprecated")
10093
declare_combined_launch_deprecated_arg = DeclareLaunchArgument(
10194
"combined_launch_deprecated",
@@ -121,7 +114,6 @@ def generate_launch_description():
121114
"camera_model": camera_model,
122115
"include_camera_mount": include_camera_mount,
123116
"use_sim": use_sim,
124-
"simulation_engine": simulation_engine,
125117
"namespace": namespace,
126118
}.items(),
127119
)
@@ -175,7 +167,6 @@ def generate_launch_description():
175167
declare_camera_model_arg,
176168
declare_include_camera_mount_arg,
177169
declare_use_sim_arg,
178-
declare_simulation_engine_arg,
179170
declare_combined_launch_deprecated_arg,
180171
SetParameter(name="use_sim_time", value=use_sim),
181172
microros_launch,

rosbot_xl_controller/launch/controller.launch.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,6 @@ def generate_launch_description():
168168
description="Whether simulation is used",
169169
)
170170

171-
simulation_engine = LaunchConfiguration("simulation_engine")
172-
declare_simulation_engine_arg = DeclareLaunchArgument(
173-
"simulation_engine",
174-
default_value="ignition-gazebo",
175-
description="Which simulation engine will be used",
176-
)
177-
178171
controller_config_name = PythonExpression(
179172
[
180173
"'mecanum_drive_controller.yaml' if ",
@@ -214,8 +207,6 @@ def generate_launch_description():
214207
include_camera_mount,
215208
" use_sim:=",
216209
use_sim,
217-
" simulation_engine:=",
218-
simulation_engine,
219210
" namespace:=",
220211
namespace,
221212
]
@@ -233,7 +224,7 @@ def generate_launch_description():
233224
("imu_sensor_node/imu", "/_imu/data_raw"),
234225
("~/motors_cmd", "/_motors_cmd"),
235226
("~/motors_response", "/_motors_response"),
236-
("rosbot_base_controller/cmd_vel_unstamped", "cmd_vel"),
227+
("rosbot_base_controller/cmd_vel", "cmd_vel"),
237228
("/tf", "tf"),
238229
("/tf_static", "tf_static"),
239230
],
@@ -258,7 +249,6 @@ def generate_launch_description():
258249
declare_camera_model_arg,
259250
declare_include_camera_mount_arg,
260251
declare_use_sim_arg,
261-
declare_simulation_engine_arg,
262252
SetParameter(name="use_sim_time", value=use_sim),
263253
control_node,
264254
robot_state_pub_node,

rosbot_xl_controller/test/test_xacro.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
def test_rosbot_description_parsing():
2323
mecanum_values = ["true", "false"]
2424
use_sim_values = ["true", "false"]
25-
simulation_engine_values = ["ignition-gazebo", "webots"] # 'gazebo-classic'
2625
lidar_models = [
2726
"None",
2827
"slamtec_rplidar_a2",
@@ -48,7 +47,6 @@ def test_rosbot_description_parsing():
4847
itertools.product(
4948
mecanum_values,
5049
use_sim_values,
51-
simulation_engine_values,
5250
lidar_models,
5351
camera_models,
5452
)
@@ -58,14 +56,12 @@ def test_rosbot_description_parsing():
5856
(
5957
mecanum,
6058
use_sim,
61-
simulation_engine,
6259
lidar_model,
6360
camera_model,
6461
) = combination
6562
mappings = {
6663
"mecanum": mecanum,
6764
"use_sim": use_sim,
68-
"simulation_engine": simulation_engine,
6965
"lidar_model": lidar_model,
7066
"camera_model": camera_model,
7167
}
@@ -76,6 +72,6 @@ def test_rosbot_description_parsing():
7672
except xacro.XacroException as e:
7773
assert False, (
7874
f"xacro parsing failed: {str(e)} for mecanum: {mecanum}, "
79-
f"use_sim: {use_sim}, simulation_engine: {simulation_engine}, "
75+
f"use_sim: {use_sim}, "
8076
f"lidar_model: {lidar_model}, camera_model: {camera_model}, "
8177
)

rosbot_xl_description/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ project(rosbot_xl_description)
44
find_package(ament_cmake REQUIRED)
55

66
install(DIRECTORY
7+
config
8+
launch
79
meshes
810
urdf
911
DESTINATION share/${PROJECT_NAME}
1012
)
1113

12-
ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/${PROJECT_NAME}.sh.in")
14+
ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/${PROJECT_NAME}.sh.in")
1315
ament_package()
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# By default Husarion UGV is loaded without any components.
2+
3+
components: []
4+
5+
# If you want to add for example LDR01, LDR06 and CAM01 to your Panther look at this example below:
6+
7+
# components:
8+
# - type: LDR01
9+
# parent_link: cover_link
10+
# xyz: 0.0 0.1 0.0
11+
# rpy: 0.0 0.0 0.0
12+
# device_namespace: main_lidar
13+
14+
# - type: LDR06
15+
# parent_link: cover_link
16+
# xyz: 0.0 -0.1 0.0
17+
# rpy: 0.0 0.0 0.0
18+
# device_namespace: second_lidar
19+
20+
# - type: CAM01
21+
# name: camera
22+
# parent_link: cover_link
23+
# xyz: 0.1 0.0 0.0
24+
# rpy: 0.0 0.0 0.0
25+
# device_namespace: front_cam

rosbot_xl_description/env-hooks/rosbot_xl_description.sh.in renamed to rosbot_xl_description/hooks/rosbot_xl_description.sh.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
ament_prepend_unique_value GAZEBO_MODEL_PATH "@CMAKE_INSTALL_PREFIX@/share"
22
ament_prepend_unique_value GZ_SIM_RESOURCE_PATH "@CMAKE_INSTALL_PREFIX@/share"
3-
ament_prepend_unique_value IGN_GAZEBO_RESOURCE_PATH "@CMAKE_INSTALL_PREFIX@/share"
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
#!/usr/bin/env python3
2+
3+
# Copyright 2020 ros2_control Development Team
4+
# Copyright 2024 Husarion sp. z o.o.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
from launch import LaunchDescription
19+
from launch.actions import DeclareLaunchArgument
20+
from launch.conditions import IfCondition
21+
from launch.substitutions import (
22+
Command,
23+
FindExecutable,
24+
LaunchConfiguration,
25+
PathJoinSubstitution,
26+
PythonExpression,
27+
)
28+
from launch_ros.actions import Node, SetParameter
29+
from launch_ros.substitutions import FindPackageShare
30+
31+
32+
33+
def generate_launch_description():
34+
namespace = LaunchConfiguration("namespace")
35+
mecanum = LaunchConfiguration("mecanum")
36+
use_joint_state_publisher = LaunchConfiguration("use_joint_state_publisher",default="True")
37+
use_sim = LaunchConfiguration("use_sim")
38+
39+
declare_namespace_arg = DeclareLaunchArgument(
40+
"namespace",
41+
default_value="",
42+
description="Namespace for all topics and tfs",
43+
)
44+
45+
declare_mecanum_arg = DeclareLaunchArgument(
46+
"mecanum",
47+
default_value="False",
48+
description="Whether to use mecanum drive controller, otherwise use diff drive",
49+
)
50+
51+
declare_use_sim_arg = DeclareLaunchArgument(
52+
"use_sim",
53+
default_value="False",
54+
description="Whether simulation is used",
55+
)
56+
57+
controller_config_name = PythonExpression(
58+
[
59+
"'mecanum_drive_controller.yaml' if ",
60+
mecanum,
61+
" else 'diff_drive_controller.yaml'",
62+
]
63+
)
64+
65+
controller_config_path = PathJoinSubstitution(
66+
[
67+
FindPackageShare("rosbot_xl_controller"),
68+
"config",
69+
controller_config_name,
70+
]
71+
)
72+
73+
robot_description_content = Command(
74+
[
75+
PathJoinSubstitution([FindExecutable(name="xacro")]),
76+
" ",
77+
PathJoinSubstitution(
78+
[
79+
FindPackageShare("rosbot_xl_description"),
80+
"urdf",
81+
"rosbot_xl.urdf.xacro",
82+
]
83+
),
84+
" controller_config_file:=",
85+
controller_config_path,
86+
" mecanum:=",
87+
mecanum,
88+
" use_sim:=",
89+
use_sim,
90+
" namespace:=",
91+
namespace,
92+
]
93+
)
94+
robot_description = {"robot_description": robot_description_content}
95+
96+
robot_state_pub_node = Node(
97+
package="robot_state_publisher",
98+
executable="robot_state_publisher",
99+
output="both",
100+
parameters=[robot_description],
101+
remappings=[("/tf", "tf"), ("/tf_static", "tf_static")],
102+
namespace=namespace,
103+
)
104+
105+
joint_state_publisher_node = Node(
106+
package="joint_state_publisher",
107+
executable="joint_state_publisher",
108+
namespace=namespace,
109+
emulate_tty=True,
110+
condition=IfCondition(use_joint_state_publisher),
111+
)
112+
113+
return LaunchDescription(
114+
[
115+
declare_namespace_arg,
116+
declare_mecanum_arg,
117+
declare_use_sim_arg,
118+
SetParameter(name="use_sim_time", value=use_sim),
119+
robot_state_pub_node,
120+
joint_state_publisher_node,
121+
]
122+
)

0 commit comments

Comments
 (0)