v0.1.15; add stairs_up/down

This commit is contained in:
wty-yy
2025-12-25 18:15:48 +08:00
parent 0dd3c10aba
commit 9d9d83ed9f
54 changed files with 1356 additions and 81 deletions

View File

@@ -33,10 +33,15 @@ class BaseVelocityGoal(BaseGoal):
super().__init__()
self.control_dt = control_dt
self.cmd_duration = cmd_duration
self.goals = []
self.goal_runtime = 0.0
self.first_goal_after_reset = True
self.last_reset_time = -1
def reset_goal(self):
self.goal_runtime = 0.0
self.first_goal_after_reset = True
self.last_reset_time = -1
self.goals = []
def is_reset(self, sim_data: SimData) -> bool:
if self.last_reset_time == -1:
@@ -190,6 +195,11 @@ class TargetPosVelocityGoal(BaseVelocityGoal):
self.total = 1 # only one task
self.done = False
self.success = False
def reset_goal(self):
super().reset_goal()
self.done = False
self.success = False
def get_goal(self, sim_data: SimData) -> Optional[GoalData]:
self.update_runtime_count(sim_data)