pyrcf.utils.urdf_utils ====================== .. py:module:: pyrcf.utils.urdf_utils Functions --------- .. autoapisummary:: pyrcf.utils.urdf_utils._convert_to_fixed pyrcf.utils.urdf_utils.temp_path_urdf_with_joints_fixed pyrcf.utils.urdf_utils.create_new_urdf_with_joints_fixed Module Contents --------------- .. py:function:: _convert_to_fixed(urdf: yourdfpy.URDF, joint_names_to_values: Mapping[str, float]) Hack to modify urdf to fix specific joints to specified values. :param urdf: The yourdfpy urdf object to modify. :type urdf: yourdfpy.URDF :param joint_names_to_values: Dictionary containing name of joints that should be locked as keys, and the joint values to lock them at as values. :type joint_names_to_values: Mapping[str, float] .. py:function:: temp_path_urdf_with_joints_fixed(urdf_file_path: str, joint_names_to_values: Mapping[str, float]) Get the context of a temporary URDF file path after modifying the specified joints to be "fixed". This method only provides a context. This is useful for temporarily writing the URDF to a file for consumption by other programs. :param urdf_file_path: Path to original urdf file. :type urdf_file_path: str :param joint_names_to_values: Dictionary containing name of joints that should be locked as keys, and the joint values to lock them at as values. :type joint_names_to_values: Mapping[str, float] :Yields: *str* -- Path to new urdf file. .. rubric:: Examples Use as a context manager: >>> with temp_path_urdf_with_joints_fixed(...) as path: load_file_from_path(path) # do something with this urdf .. py:function:: create_new_urdf_with_joints_fixed(urdf_file_path: str, joint_names_to_values: Mapping[str, float]) -> str Creates a new urdf file with the specified joints set to "fixed". :param urdf_file_path: Path to original urdf file. :type urdf_file_path: str :param joint_names_to_values: Dictionary containing name of joints that should be locked as keys, and the joint values to lock them at as values. :type joint_names_to_values: Mapping[str, float] :returns: Path to new urdf file. :rtype: str