Skip to main content

Learning Collision-free and Torque-limited Robot Trajectories based on Alternative Safe Behaviors.

Project description

Learning Collision-free and Torque-limited Robot Trajectories based on Alternative Safe Behaviors

This python package provides the code to learn torque-limited and collision-free robot trajectories without exceeding limits on the position, velocity, acceleration and jerk of each robot joint.

Installation

The package can be installed by running

pip install safemotions

Trajectory generation

To generate a random trajectory with a single robot run

python -m safemotions.random_agent

For a demonstration scenario with two robots run

python -m safemotions.random_agent --robot_scene=1

Collision-free trajectories for three robots can be generated by running

python -m safemotions.random_agent --robot_scene=2

Pretrained networks

Pretrained networks for various reaching tasks are provided.
To generate and plot trajectories for a reaching task with a single robot run

python -m safemotions.evaluate --checkpoint=one_robot/P_CT_S_5_J_A --use_gui --plot_trajectory --plot_actual_torques

Trajectories for two and three robots with alternating target points can be generated by running

python -m safemotions.evaluate --checkpoint=two_robots/P_C_S_1_J_A_D_5_T_A --use_gui 

and

python -m safemotions.evaluate --checkpoint=three_robots/P_C_S_1_J_A_D_5_T_A --use_gui 

Training

Networks can also be trained from scratch. For instance, a reaching task with a single robot can be learned by running

python -m safemotions.train --logdir=safemotions_training --name=One_robot_P_CT_S_5_J_A --robot_scene=0 --online_trajectory_time_step=0.1 --online_trajectory_duration=8.0 --use_target_points --target_point_cartesian_range_scene=0 --target_link_offset="[0, 0, 0.126]" --target_point_radius=0.065 --obs_add_target_point_pos --obs_add_target_point_relative_pos --obstacle_scene=3 --obstacle_use_computed_actual_values --use_braking_trajectory_method --closest_point_safety_distance=0.05 --check_braking_trajectory_torque_limits --acc_limit_factor_braking=0.75 --jerk_limit_factor_braking=0.75 --punish_action --action_punishment_min_threshold=0.95 --action_max_punishment=0.4  --target_point_reached_reward_bonus=5  --pos_limit_factor=1.0 --vel_limit_factor=1.0 --acc_limit_factor=1.0 --jerk_limit_factor=1.0 --torque_limit_factor=1.0 --iterations_per_checkpoint=100 --time=216

Publication

The corresponding publication is available at https://arxiv.org/abs/2103.03793.

Video

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safemotions-0.2.4.tar.gz (5.9 MB view details)

Uploaded Source

File details

Details for the file safemotions-0.2.4.tar.gz.

File metadata

  • Download URL: safemotions-0.2.4.tar.gz
  • Upload date:
  • Size: 5.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for safemotions-0.2.4.tar.gz
Algorithm Hash digest
SHA256 e958b34ecd9206250c6686ecb42f4227a6b385592afa81945859723cf53916e4
MD5 927133204964f77875e357ae70a7830b
BLAKE2b-256 042f1f2403a75c5f63972541ae394d0a43a0fab7126fe3380f20d8da46d1e65d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page