协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
skill-111【开发与工程】Utility for generating trajectories in PDDL domains through a set of actions and state transitions, focusing on robot navigation and control in dynamic environments.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
load-trajectory-problem(domain_path, problem_path)Description:
Loads a PDDL domain and problem file specific to trajectory planning, creating a planning problem instance.
Parameters:
domain_path (str): Path to the PDDL domain file.problem_path (str): Path to the PDDL problem file.Returns:
trajectory_problem: A trajectory planning problem object.Example:
trajectory_problem = load_trajectory_problem("domain.pddl", "navigation_task.pddl")
Notes:
generate-trajectory(trajectory_problem)Description: Generates a series of actions (trajectory) for the specified planning problem.
Parameters:
trajectory_problem: A trajectory planning problem instance.Returns:
trajectory: A list of sequential actions representing the trajectory.Example:
trajectory = generate_trajectory(trajectory_problem)
Notes:
unified_planning.shortcuts.TrajectoryPlanner.save-trajectory(trajectory, output_path)Description: Writes a trajectory to a file in a defined format suitable for future use.
Parameters:
trajectory: A list of actions representing the trajectory.output_path (str): Path where the trajectory will be saved.Example:
save_trajectory(trajectory, "navigation_solution.trajectory")
Notes:
validate-trajectory(trajectory_problem, trajectory)Description: Validates that the generated trajectory meets the constraints and goals defined in the given problem.
Parameters:
trajectory_problem: The trajectory planning problem.trajectory: The generated trajectory.Returns:
Example:
is_valid = validate_trajectory(trajectory_problem, trajectory)
Notes:
unified_planning.shortcuts.TrajectoryValidator.# Load the problem
trajectory_problem = load_trajectory_problem("domain.pddl", "navigation_task.pddl")
# Generate trajectory
trajectory = generate_trajectory(trajectory_problem)
# Validate trajectory
if not validate_trajectory(trajectory_problem, trajectory):
raise ValueError("Generated trajectory is invalid")
# Save trajectory
save_trajectory(trajectory, "navigation_solution.trajectory")