moveit2
The MoveIt Motion Planning Framework for ROS 2.
common_parameters.py
Go to the documentation of this file.
1 from ament_index_python.packages import get_package_share_directory
2 
3 from moveit_configs_utils import MoveItConfigsBuilder
4 from launch_param_builder import ParameterBuilder
5 
6 
7 def load_yaml(package_name, file_path):
8  return ParameterBuilder(package_name).yaml(file_path).to_dict()
9 
10 
12  moveit_config_package_name = "moveit_resources_prbt"
13  description_package_name = "moveit_resources_prbt_support"
14  description_xacro_file = "urdf/prbt.xacro"
15  robot_description_semantic_file = "config/prbt.srdf.xacro"
16  robot_description_kinematics_file = "config/kinematics.yaml"
17  moveit_controllers_file = "config/prbt_controllers.yaml"
18  joint_limits_file = "config/joint_limits.yaml"
19  pilz_cartesian_limits_file = "config/pilz_cartesian_limits.yaml"
20 
21  return (
22  MoveItConfigsBuilder(moveit_config_package_name)
23  .robot_description(
24  file_path=get_package_share_directory(description_package_name)
25  + "/"
26  + description_xacro_file
27  )
28  .robot_description_semantic(file_path=robot_description_semantic_file)
29  .robot_description_kinematics(file_path=robot_description_kinematics_file)
30  .trajectory_execution(file_path=moveit_controllers_file)
31  .joint_limits(file_path=joint_limits_file)
32  .pilz_cartesian_limits(file_path=pilz_cartesian_limits_file)
33  .to_moveit_configs()
34  )
def load_yaml(package_name, file_path)