mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-22 20:19:43 +00:00
chore(scripts): no spam log when no action (#3042)
This commit is contained in:
@@ -333,6 +333,7 @@ def record_loop(
|
|||||||
preprocessor.reset()
|
preprocessor.reset()
|
||||||
postprocessor.reset()
|
postprocessor.reset()
|
||||||
|
|
||||||
|
no_action_count = 0
|
||||||
timestamp = 0
|
timestamp = 0
|
||||||
start_episode_t = time.perf_counter()
|
start_episode_t = time.perf_counter()
|
||||||
while timestamp < control_time_s:
|
while timestamp < control_time_s:
|
||||||
@@ -380,11 +381,13 @@ def record_loop(
|
|||||||
act = {**arm_action, **base_action} if len(base_action) > 0 else arm_action
|
act = {**arm_action, **base_action} if len(base_action) > 0 else arm_action
|
||||||
act_processed_teleop = teleop_action_processor((act, obs))
|
act_processed_teleop = teleop_action_processor((act, obs))
|
||||||
else:
|
else:
|
||||||
logging.info(
|
no_action_count += 1
|
||||||
"No policy or teleoperator provided, skipping action generation."
|
if no_action_count == 1 or no_action_count % 10 == 0:
|
||||||
"This is likely to happen when resetting the environment without a teleop device."
|
logging.warning(
|
||||||
"The robot won't be at its rest position at the start of the next episode."
|
"No policy or teleoperator provided, skipping action generation. "
|
||||||
)
|
"This is likely to happen when resetting the environment without a teleop device. "
|
||||||
|
"The robot won't be at its rest position at the start of the next episode."
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Applies a pipeline to the action, default is IdentityProcessor
|
# Applies a pipeline to the action, default is IdentityProcessor
|
||||||
|
|||||||
Reference in New Issue
Block a user