rtgym.agent.behavior package

Submodules

rtgym.agent.behavior.autonomous_behavior module

class AutonomousBehavior(gym, config)[source]

Bases: BaseBehavior

generate_trajectory(*args, **kwargs)
init_from_profile(raw_profile)[source]

rtgym.agent.behavior.base_behavior module

class BaseBehavior(gym, config)[source]

Bases: object

Base class for agent behavior systems.

Provides common functionality for behavior generation including boundary avoidance, coordinate updates, and movement computations. This is an abstract base class that should be inherited by specific behavior types.

Parameters:
  • gym (RatatouGym) – Parent gym environment.

  • config (BehaviorConfig) – Configuration object for behavior parameters.

gym

Parent gym environment.

Type:

RatatouGym

config

Behavior configuration.

Type:

BehaviorConfig

initialized

Whether behavior has been initialized.

Type:

bool

distance_map

Distance map for boundary avoidance.

Type:

np.ndarray

perpend_angle_map

Perpendicular angle map for boundaries.

Type:

np.ndarray

property arena

Get arena from gym.

Returns:

The arena environment.

Return type:

Arena

initialized = False
static require_init(func)[source]

Decorator to ensure behavior is initialized before method execution.

Parameters:

func (callable) – Function to wrap with initialization check.

Returns:

Wrapped function that checks initialization.

Return type:

callable

Raises:

ValueError – If behavior is not initialized.

property s_res

Get spatial resolution from gym.

Returns:

Spatial resolution in units per pixel.

Return type:

float

property t_res

Get temporal resolution from gym.

Returns:

Temporal resolution in milliseconds.

Return type:

float

rtgym.agent.behavior.behavior module

class Behavior(gym)[source]

Bases: object

generate_trajectory(duration: float, batch_size: int, init_pos=None, init_state=None)[source]
init_from_profile(raw_profile)[source]

rtgym.agent.behavior.behavior_config module

class BehaviorConfig[source]

Bases: object

property avoid_boundary_dist
register_callback(callback)[source]

rtgym.agent.behavior.controllable_behavior module

class ControllableBehavior(gym, config)[source]

Bases: BaseBehavior

The controller module contains the Controller class which is responsible for controlling the agent’s behavior.

get_trajectory()[source]
init_from_profile(raw_profile)[source]
reset()[source]
step(agent_state, displacement)[source]

Module contents

class Behavior(gym)[source]

Bases: object

generate_trajectory(duration: float, batch_size: int, init_pos=None, init_state=None)[source]
init_from_profile(raw_profile)[source]