diff --git a/src/mjlab/sim/sim.py b/src/mjlab/sim/sim.py index eda700570..ab5a743c6 100644 --- a/src/mjlab/sim/sim.py +++ b/src/mjlab/sim/sim.py @@ -192,6 +192,10 @@ class SimulationCfg: def apply_wp_opt(self, wp_opt: mjwarp.Option) -> None: """Apply MuJoCo Warp-only settings to a warp Option (post ``put_model``).""" + # Silence solver iteration warnings without hiding other overflows. + wp_opt.warn_overflow &= ~( + mjwarp.OverflowType.LS_ITERATIONS | mjwarp.OverflowType.ITERATIONS + ) wp_opt.contact_sensor_maxmatch = self.contact_sensor_maxmatch if self.broadphase is not None: wp_opt.broadphase = _BROADPHASE_MAP[self.broadphase] diff --git a/src/mjlab/tasks/velocity/mdp/velocity_command.py b/src/mjlab/tasks/velocity/mdp/velocity_command.py index 5c1f72d4e..07d3f7c1f 100644 --- a/src/mjlab/tasks/velocity/mdp/velocity_command.py +++ b/src/mjlab/tasks/velocity/mdp/velocity_command.py @@ -97,7 +97,7 @@ class UniformVelocityCommand(CommandTerm): fwd_ids = env_ids[self.is_forward_env[env_ids]] if len(fwd_ids) > 0: self.vel_command_b[fwd_ids, 0] = ( - self.vel_command_b[fwd_ids, 0].abs().clamp(min=0.3) + self.vel_command_b[fwd_ids, 0].abs().clamp(min=self.cfg.min_forward_velocity) ) self.vel_command_b[fwd_ids, 1] = 0.0 self.vel_command_b[fwd_ids, 2] = 0.0 @@ -334,6 +334,8 @@ class UniformVelocityCommandCfg(CommandTermCfg): """Fraction of environments that receive forward-only commands (positive lin_vel_x, zero lin_vel_y and ang_vel_z). Increases training coverage for straight-line walking, which is important for stair climbing.""" + min_forward_velocity: float = 0.3 + """Minimum speed (m/s) for forward-only commands; lower for small robots.""" init_velocity_prob: float = 0.0 """Probability that an env starts its episode already moving at its sampled planar command velocity. Applied on reset only."""