This pull request introduces several changes to the codebase to enhance readability, modularity, and flexibility. The main updates include refactoring, merging configuration files, and adding new functionality.
Also, the current configuration and reward design have achieved the best b1z1 low-level sim2real performance until now.
Below is a detailed description of the changes:
Refactor ManipLoco.py:
Clean the code: The code has been reorganized for better readability and maintainability. Unnecessary comments and deprecated code segments have been removed.
Structure improvement: The code structure has been improved to follow a more logical flow, making it easier to understand and modify.
Enhanced documentation: Added some comments throughout the code to provide clarity on complex sections and the overall functionality.
Separate Reward Design Using Reward_Containers:
Modularity and Flexibility: The reward functions have been decoupled from ManipLoco.py and moved to a new module called Reward_Containers. This design allows for easy modification and extension of reward functions.
Configuration-based assignment: Rewards can now be assigned and configured directly in the b1z1_config.py file. This approach simplifies the process of switching between different reward configurations for various experiments.
Merge b1z1_config and manip_loco_config:
Simplified Configuration: Merged the two configuration files to eliminate redundancy and the complex inheritance relationships previously present.
Unified Configuration: All configuration settings can now be found in a single file (b1z1_config.py), streamlining the setup process and reducing confusion.
Better Readability:
Improved Comments: Enhanced the documentation within the code by adding more descriptive comments.
Removal of Redundant Code: Deleted unused and redundant code segments to reduce clutter and potential confusion.
Addition of b1z1_interface.py for Teleoperation Mode:
Teleoperation Functionality: Introduced a new script, b1z1_interface.py, which enables teleoperation mode. Users can now control the robot via keyboard inputs, allowing for more interactive testing and control.
Enhanced Control: This script provides a flexible interface for sending commands and controlling the robot in real-time, facilitating easier experimentation and debugging.
Detailed Changes:
1. Refactor ManipLoco.py:
Organized imports.
Cleaned up the initialization and step functions.
Simplified the code by moving related functions to Reward_Containers.
Added detailed comments explaining the purpose and functionality of key sections of the code.
2. Separate Reward Design:
Created Reward_Containers module.
Moved all reward functions to this module.
Modified ManipLoco.py to interact with the new Reward_Containers module.
Added configuration options in b1z1_config.py to select the desired reward container.
3. Merge Configuration Files:
Combined settings from manip_loco_config.py into b1z1_config.py.
Updated all references to use the new unified configuration file.
Simplified the structure and reduced duplication.
4. Add b1z1_interface.py:
Developed a new script for teleoperation using keyboard inputs.
Enabled real-time control of the robot for easier testing and experimentation.
B1Z1 Low-level Pull Request
This pull request introduces several changes to the codebase to enhance readability, modularity, and flexibility. The main updates include refactoring, merging configuration files, and adding new functionality. Also, the current configuration and reward design have achieved the best b1z1 low-level sim2real performance until now.
Below is a detailed description of the changes:
Refactor
ManipLoco.py
:Separate Reward Design Using
Reward_Containers
:ManipLoco.py
and moved to a new module calledReward_Containers
. This design allows for easy modification and extension of reward functions.b1z1_config.py
file. This approach simplifies the process of switching between different reward configurations for various experiments.Merge
b1z1_config
andmanip_loco_config
:b1z1_config.py
), streamlining the setup process and reducing confusion.Better Readability:
Addition of
b1z1_interface.py
for Teleoperation Mode:b1z1_interface.py
, which enables teleoperation mode. Users can now control the robot via keyboard inputs, allowing for more interactive testing and control.Detailed Changes:
1. Refactor
ManipLoco.py
:Reward_Containers
.2. Separate Reward Design:
Reward_Containers
module.ManipLoco.py
to interact with the newReward_Containers
module.b1z1_config.py
to select the desired reward container.3. Merge Configuration Files:
manip_loco_config.py
intob1z1_config.py
.4. Add
b1z1_interface.py
: