mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-02-11 09:20:40 +00:00
43 lines
1.3 KiB
Python
43 lines
1.3 KiB
Python
from moveit_configs_utils import MoveItConfigsBuilder
|
|
from moveit_configs_utils.launches import generate_spawn_controllers_launch
|
|
|
|
import os
|
|
|
|
from launch import LaunchDescription
|
|
from launch.actions import (
|
|
DeclareLaunchArgument,
|
|
IncludeLaunchDescription,
|
|
)
|
|
from launch.conditions import IfCondition
|
|
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
|
from launch.substitutions import LaunchConfiguration
|
|
|
|
from launch_ros.actions import Node
|
|
from launch_ros.parameter_descriptions import ParameterValue
|
|
|
|
from srdfdom.srdf import SRDF
|
|
|
|
from moveit_configs_utils.launch_utils import (
|
|
add_debuggable_node,
|
|
DeclareBooleanLaunchArg,
|
|
)
|
|
|
|
|
|
def generate_launch_description():
|
|
moveit_config = MoveItConfigsBuilder("ASTRA_Arm", package_name="astra_arm_moveit_config").to_moveit_configs()
|
|
# return generate_spawn_controllers_launch(moveit_config)
|
|
controller_names = moveit_config.trajectory_execution.get(
|
|
"moveit_simple_controller_manager", {}
|
|
).get("controller_names", [])
|
|
ld = LaunchDescription()
|
|
for controller in controller_names: # + ["joint_state_broadcaster"]:
|
|
ld.add_action(
|
|
Node(
|
|
package="controller_manager",
|
|
executable="spawner",
|
|
arguments=[controller],
|
|
output="screen",
|
|
)
|
|
)
|
|
return ld
|