Add assembly configuration integration and refactor launches
- **Added support for assembly configuration in `rbs_bringup` and `rbs_robot` launches**: - Introduced new launch arguments: `use_rbs_utils` and `assembly_config_name`. - Integrated `rbs_utils`'s `utils.launch.py` for handling assembly configurations. - **Simplified `skills.launch.py`**: - Removed redundant `assembly_config` node setup. - **Enhanced `rbs_utils`**: - Added installation of `launch` files in `CMakeLists.txt`. - Created a new `utils.launch.py` for dynamically loading assembly configurations. - Refactored `assembly_config_service.py` to utilize `get_asm_config` for streamlined configuration file resolution. - Improved `rbs_bringup` setup to include additional parameters and nodes for assembly configuration. These changes centralize assembly configuration handling and enhance modularity across launch setups.
This commit is contained in:
parent
b1e20696fe
commit
ef4b015491
6 changed files with 93 additions and 18 deletions
|
@ -48,6 +48,9 @@ def launch_setup(context, *args, **kwargs):
|
|||
ee_link_name = LaunchConfiguration("ee_link_name").perform(context)
|
||||
base_link_name = LaunchConfiguration("base_link_name").perform(context)
|
||||
|
||||
use_rbs_utils = LaunchConfiguration("use_sim_time")
|
||||
assembly_config_name = LaunchConfiguration("assembly_config_name")
|
||||
|
||||
remappings = []
|
||||
if multi_robot == "true":
|
||||
remappings.append([("/tf", "tf"), ("/tf_static", "tf_static")])
|
||||
|
@ -148,11 +151,33 @@ def launch_setup(context, *args, **kwargs):
|
|||
condition=IfCondition(use_skills),
|
||||
)
|
||||
|
||||
|
||||
# assembly config loader
|
||||
utils = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
[
|
||||
PathJoinSubstitution(
|
||||
[
|
||||
FindPackageShare("rbs_utils"),
|
||||
"launch",
|
||||
"utils.launch.py",
|
||||
]
|
||||
)
|
||||
]
|
||||
),
|
||||
launch_arguments={
|
||||
"use_sim_time": use_sim_time,
|
||||
"assembly_config_name": assembly_config_name
|
||||
}.items(),
|
||||
condition=IfCondition(use_rbs_utils),
|
||||
)
|
||||
|
||||
nodes_to_start = [
|
||||
robot_state_publisher,
|
||||
control,
|
||||
moveit,
|
||||
skills,
|
||||
utils,
|
||||
]
|
||||
return nodes_to_start
|
||||
|
||||
|
@ -364,6 +389,20 @@ def generate_launch_description():
|
|||
description="Base link name if robot arm",
|
||||
)
|
||||
)
|
||||
declared_arguments.append(
|
||||
DeclareLaunchArgument(
|
||||
"assembly_config_name",
|
||||
default_value="",
|
||||
description="Assembly config name",
|
||||
)
|
||||
)
|
||||
declared_arguments.append(
|
||||
DeclareLaunchArgument(
|
||||
"use_rbs_utils",
|
||||
default_value="true",
|
||||
description="Whwther use utils",
|
||||
)
|
||||
)
|
||||
|
||||
return LaunchDescription(
|
||||
declared_arguments + [OpaqueFunction(function=launch_setup)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue