move_group.launch.py 示例

import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node

def generate_launch_description():
    # 获取 MoveIt 配置包的路径
    moveit_config_package = "fairino3_v6_left_arm"
    moveit_config_directory = get_package_share_directory(moveit_config_package)
    moveit_config = os.path.join(moveit_config_directory, "config")

    # 定义启动参数
    use_sim_time = LaunchConfiguration("use_sim_time", default="false")

    # 定义 MoveIt move_group 节点的参数文件路径
    move_group_params = os.path.join(moveit_config, "move_group_params

[DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.IncludeLaunchDescription' [INFO] [launch]: All log files can be found below /home/wuyuan/.ros/log/2025-03-31-22-43-02-273870-wuyuan-VMware-Virtual-Platform-78298 [INFO] [launch]: Default logging verbosity is set to DEBUG [DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x70da3da35dc0>' [DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x70da3da35dc0>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x70da3e23ef30>' [DEBUG] [launch]: An exception was raised in an async action/event [DEBUG] [launch]: Traceback (most recent call last): File "/opt/ros/jazzy/lib/python3.12/site-packages/launch/launch_description_sources/any_launch_file_utilities.py", line 58, in get_launch_description_from_any_launch_file return loader(launch_file_path) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ros/jazzy/lib/python3.12/site-packages/launch/launch_description_sources/python_launch_file_utilities.py", line 66, in get_launch_description_from_python_launch_file raise InvalidPythonLaunchFileError( launch.launch_description_sources.python_launch_file_utilities.InvalidPythonLaunchFileError: launch file at 'display_robot.launch.py' does not contain the required function 'generate_launch_description()' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/opt/ros/jazzy/lib/python3.12/site-packages/launch/launch_service.py", line 343, in run_async raise exception_to_raise File "/opt/ros/jazzy/lib/python3.12/site-packages/launch/launch_service.py", line 230, in _process_one_event await self.__process_event(next_event) File "/opt/ros/jazzy/lib/python3.12/site-packages/launch/launch_service.py", line 250, in __process_event visit_all_entities_and_collect_future
04-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值