rktl_autonomy.cartpole_direct_interface
Cartpole is a very simple environment included within OpenAI Gym. There is not much of a reason to use it, except for verifying the functionality of this library. Two different interfaces are provided, CartpoleInterface and CartpoleDirectInterface. The former uses the ROSInterface class and the latter directly owns the Gym environment. To verify the ROSInterface worked, it was confirmed that they both behave the same way.
- License:
BSD 3-Clause License Copyright (c) 2023, Autonomous Robotics Club of Purdue (Purdue ARC) All rights reserved.
Module Contents
Classes
ROS interface for the cartpole game. |
- class rktl_autonomy.cartpole_direct_interface.CartpoleDirectInterface(eval=False, launch_file=['rktl_autonomy', 'cartpole_train.launch'], launch_args=[], run_id=None)
Bases:
rktl_autonomy.ROSInterface
ROS interface for the cartpole game.
- property action_space
The Space object corresponding to valid actions.
- property observation_space
The Space object corresponding to valid observations.
- _reset_env()
Reset environment for a new training episode.
- _reset_self()
Reset internally for a new episode.
- _has_state()
Determine if the new state is ready.
- _clear_state()
Clear state variables / flags in preparation for new ones.
- _get_state()
Get state tuple (observation, reward, done, info).
- _publish_action(action)
Publish an action to the ROS network.