Skip to content

9. Reference and limits

Objects

name what
redysim_rl.make(task, task_kwargs=None, **kw) a single environment (gymnasium.Env)
redysim_rl.make_vec(task, num_envs, task_kwargs=None, **kw) a vector environment; task_kwargs are the settings of the named task
RedysimVectorEnv(task, num_envs, **kw) the vector environment class; kw below
RedysimEnv(task, **kw) the single environment (one robot, no autoreset)
JointReach, TaskReach, AcrobotSwingUp, CartPoleBalance, CartPoleSwingUp, redysim_rl.platform.PlatformReach, redysim_rl.floating.SpaceReach, redysim_rl.legged.QuadrupedVelocity, redysim_rl.wheeled.WheeledNavigation tasks
TorqueAction, PDTargetAction, ImpedanceAction, DiffDriveAction action modes
redysim_rl.wrappers.make_sb3 an environment for Stable-Baselines3
planar_arm, pendulum, resolve_robot robots

Arguments of the environments: robot, action_mode, action_kwargs, dt, substeps, decimation, method ("rk4" or "semi_implicit"), max_episode_steps, tau_limit, q_limits, dq_limits, randomise, autoreset_mode, include_previous_action, failure_penalty, threads, seed.

Autoreset

A vector environment restarts the robots whose episode has ended; Gymnasium defines three ways, chosen with autoreset_mode= (a gymnasium.vector.AutoresetMode):

  • NEXT_STEP (default): the step that ends an episode returns its last observation; the next call ignores the action of that robot, restarts it, and returns the first observation with reward 0.
  • SAME_STEP: the step that ends an episode returns the first observation of the next one, and the last observation in info["final_obs"] (mask info["_final_obs"]).
  • DISABLED: nothing restarts by itself; restart robots with env.reset(options={"reset_mask": mask}).

The single environment never restarts by itself; call reset() after an episode.

Reset options

key content shape
q, dq starting joint positions and velocities (N, n)
goal goal: joint angles (joint_reach) or a point (task_reach, space_reach) (N, n) or (N, 3)
qb, dqb base pose (position, quaternion) and velocity (floating base) (N, 7), (N, 6)
command commanded velocity (quadruped_velocity): forward, sideways, yaw rate (N, 3)
start, heading, goal, obstacles, radii wheeled_nav: start position (x, z), heading (rad), goal (x, z), obstacle centres and radii (N, 2), (N,), (N, 2), (N, K, 2), (N, K)
reset_mask which robots to reset (the others keep going) (N,)

Limits of this release

  • Open-chain fixed-base robots, a floating base in free flight, and one legged task: a quadruped on the ground that learns to walk at a commanded speed (with the default reward a 15 M-step run walks on all four legs at 0.3 to 0.5 m/s; shorter runs often settle on a three-legged, sliding gait). Closed-loop mechanisms run with their loops closed (see Tasks and robots); the bundled Spot-like model does not stand with the gains tried, so only the bundled quadruped is supported for the ground.
  • No rendering.
  • A single environment is limited by Python (2,000 to 22,000 steps per second); the speed is in the vector environment.
  • The speed cap and joint limits are not energy- or momentum-conserving (see Floating base).
  • The numbers in Training are single, untuned runs on one machine.

Licence

Free for research, teaching and other non-commercial use, under the PolyForm Noncommercial License 1.0.0 (LICENSE).