Source code for brom_drake.file_manipulation.urdf.drake_ready_urdf_converter.config

from dataclasses import dataclass
from enum import IntEnum
from typing import List

[docs] class MeshReplacementStrategy(IntEnum): """ *Description* The different strategies for replacing mesh files. Options are: kDoNotReplace kWithObj kWithMinimalEnclosingCylinder kWithConvexDecomposition *Usage* .. code:: python from brom_drake.file_manipulation.urdf.drake_ready_urdf_converter.config import MeshReplacementStrategy # or # from brom_drake.all import MeshReplacementStrategy # Selecting the strategy to replace meshes with OBJ files strategy = MeshReplacementStrategy.kWithObj """ kDoNotReplace = 0 kWithObj = 1 kWithMinimalEnclosingCylinder = 2 kWithConvexDecomposition = 3
[docs] @dataclass(frozen=True) class MeshReplacementStrategies: """ *Description* A dataclass that specifies the different strategies for replacing mesh files in: - the <collision> section of the URDF - the <visual> section of the URDF """ collision_meshes: MeshReplacementStrategy = MeshReplacementStrategy.kWithObj visual_meshes: MeshReplacementStrategy = MeshReplacementStrategy.kWithObj
[docs] @dataclass class DrakeReadyURDFConverterConfig: """ *Description* A dataclass that specifies how the DrakeReadyURDFConverter should convert the URDF file. *Attributes* output_urdf_file_path: str The path where the converted URDF file will be saved. If None, it defaults to the models directory. coacd_log_level: str The log level for the coacd tool. Options are "off", "info", "error". """ output_urdf_file_path: str = None overwrite_old_logs: bool = False overwrite_old_models: bool = False log_file_name: str = "conversion.log" mesh_replacement_strategies: MeshReplacementStrategies = MeshReplacementStrategies() add_missing_actuators: bool = True replace_colors_with: List[float] = None coacd_log_level: str = "info"