robotic_manipulator_rloa
robotic_manipulator_rloa is a framework for training Robotic Manipulators on the Obstacle Avoidance task through Reinforcement Learning.
Installation
Install the package with pip.
$ pip install robotic-manipulator-rloa
For Windows: If the installation is not successful because Microsoft Visual C++ 14.0 or greater is required, download and install the Microsoft C++ Build Tools from here: https://visualstudio.microsoft.com/es/visual-cpp-build-tools/
Usage
Execution of a demo training and testing process for the KUKA IIWA Robotic Manipulator
from robotic_manipulator_rloa import ManipulatorFramework
# Initialize the framework
mf = ManipulatorFramework()
# Run a demo of the training process for the KUKA IIWA Robotic Manipulator
mf.run_demo_training('kuka_training', verbose=False)
# Run a demo of the testing process for the KUKA IIWA Robotic Manipulator
mf.run_demo_testing('kuka_testing')
Execution of a training for the KUKA IIWA Robotic Manipulator
from robotic_manipulator_rloa import ManipulatorFramework
# Initialize the framework
mf = ManipulatorFramework()
# Initialize KUKA IIWA Robotic Manipulator environment
mf.initialize_environment(manipulator_file='kuka_iiwa/kuka_with_gripper2.sdf',
endeffector_index=13,
fixed_joints=[6, 7, 8, 9, 10, 11, 12, 13],
involved_joints=[0, 1, 2, 3, 4, 5],
target_position=[0.4, 0.85, 0.71],
obstacle_position=[0.45, 0.55, 0.55],
initial_joint_positions=[0.9, 0.45, 0, 0, 0, 0],
initial_positions_variation_range=[0, 0, 0.5, 0.5, 0.5, 0.5],
visualize=False)
# Initialize NAF Agent (checkpoint files will be generated every 100 episodes)
mf.initialize_naf_agent(checkpoint_frequency=100)
# Run training for 3000 episodes, 400 timesteps per episode
mf.run_training(3000, 400, verbose=False)
Execution of a testing process for the KUKA IIWA Robotic Manipulator (must execute a training for 3000 episodes before)
import os
import pybullet_data
from robotic_manipulator_rloa import ManipulatorFramework
# Initialize the framework
mf = ManipulatorFramework()
# Initialize KUKA IIWA Robotic Manipulator environment
kuka_path = os.path.join(pybullet_data.getDataPath(), 'kuka_iiwa/kuka_with_gripper2.sdf')
mf.initialize_environment(manipulator_file=kuka_path,
endeffector_index=13,
fixed_joints=[6, 7, 8, 9, 10, 11, 12, 13],
involved_joints=[0, 1, 2, 3, 4, 5],
target_position=[0.4, 0.85, 0.71],
obstacle_position=[0.45, 0.55, 0.55],
initial_joint_positions=[0.9, 0.45, 0, 0, 0, 0],
initial_positions_variation_range=[0, 0, .5, .5, .5, .5],
visualize=False)
# Initialize NAF Agent
mf.initialize_naf_agent()
# Load pretrained weights from .p file
mf.load_pretrained_parameters_from_episode(3000)
# Test the pretrained model for 50 test episodes, 750 timesteps each
mf.test_trained_model(50, 750)
Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change. Please make sure to update and execute the tests!
robotic_manipulator_rloa$ pytest --cov-report term-missing --cov=robotic_manipulator_rloa/ tests/robotic_manipulator_rloa/
License
Release files for robotic-manipulator-rloa 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robotic-manipulator-rloa-1.0.0.tar.gz | 635.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robotic_manipulator_rloa-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / robotic-manipulator-rloa-1.0.0.tar.gz
| Download URL | robotic-manipulator-rloa-1.0.0.tar.gz |
|---|---|
| Size | 635.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9a86542321ac65a56d29be99f5d9cb31d79c4f45ad178b4dcf87b448e8708bd
|
|
BLAKE2b-256 checksum How to use checksums |
f86c348721dc01bfe2ddcfcb767e801073345b7d57de53e0ef20eb4b2dbc4e85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / robotic_manipulator_rloa-1.0.0-py3-none-any.whl
| Download URL | robotic_manipulator_rloa-1.0.0-py3-none-any.whl |
|---|---|
| Size | 635.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05e28eb24fd8189cd35271f777908c7401e0dcad249b857f2d1f1593e7a7f097
|
|
BLAKE2b-256 checksum How to use checksums |
d3c354c31d34241d5a53fa8ae719e7be6b3f6f8699d877dd4e464f77fa15d29b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|