moveit / moveit_resources

URDFs, meshes, and config packages for MoveIt testing
61 stars 115 forks source link

[ROS2] Make a Python module for common Python launching stuff #107

Closed AndyZe closed 2 years ago

AndyZe commented 2 years ago

With a client, we started using a launch_common.py script that defines these functions / variables:

def load_file(package_name, file_path):
def load_yaml(package_name, file_path):
def load_robot_description();
planning_pipeline_config

It can be used from other Python files like this:

import launch_common
...
        parameters=[
            robot_description,
            launch_common.robot_description_semantic,
            launch_common.robot_description_planning,
            launch_common.robot_description_kinematics,
            ompl_planning_pipeline_config
        ]
...
    ompl_planning_yaml = launch_common.load_yaml(
        'moveit_resources_panda_moveit_config', 'config/ompl_planning.yaml'
    )

This reduces copy/paste a lot!

JafarAbdi commented 2 years ago

Should be fixed with https://github.com/ros-planning/moveit2/pull/591, I'll finish the remaining work today and ask you for a review

DLu commented 2 years ago

Can be closed?