Stochastic Tensor Optimization for Robot Motion - A GPU Robot Motion Toolkit

Related tags

Deep Learning storm
Overview

STORM

Stochastic Tensor Optimization for Robot Motion - A GPU Robot Motion Toolkit

[Install Instructions] [Paper] [Website]

This package contains code for reactive robot motion leveraging parallel compute on the GPU. The implemented control framework leverages MPPI to optimize over sampled actions and their costs. The costs are computed by rolling out the forward model from the current state with the sampled actions.

Most files are documented with sphinx. Once you clone this repo, go into docs folder and run sh generate_docs.sh to generate documentation.

Citation

If you use this source code, please cite the below article,

@article{storm2021,
  title={Fast Joint Space Model-Predictive Control for Reactive Manipulation},
  author={Mohak Bhardwaj and Balakumar Sundaralingam and Arsalan Mousavian and Nathan Ratliff and Dieter Fox and Fabio Ramos and Byron Boots},
  journal={arXiv preprint},
  year={2021}
}

Contributing to this code

Refer to CLA before making contributions.

Comments
  • Weird motion of the target mug in franka_reacher

    Weird motion of the target mug in franka_reacher

    Thank you for providing your code.

    I've been trying to run the franka_reacher.py demo, but I'm getting a surprising behavior from the target (red) mug. It falls through the table, and then progressively slides to a corner of the environment (see attached video).

    Is that the expected behavior? I'm guessing it is not, especially because the behavior of the robot is significantly different when setting the vis_ee_target variable to False. In that case, the robot tries to reach an (invisible) target in front of it, which looks much more like a proper demo.

    Any help with this weird behavior?

    https://user-images.githubusercontent.com/114128734/193214376-abbba2b0-ab62-455f-a406-dd6ffbfe38db.mp4

    opened by alaflaquiere-sony 2
  • Problem with franka_reacher.py example

    Problem with franka_reacher.py example

    I am trying to run the example file python franka_reacher.py. But on running the red mug falls through the base and floats below. (Screenshot attached). Kindly let me know how to fix this please. Screenshot from 2022-08-18 22-24-17

    opened by kaustabpal 2
  • Error with argument for torch.Size()

    Error with argument for torch.Size()

    Hi,

    great work with this repository. Really appreciated the fact that you put it open-source. I encountered a problem when running the script due to a potential bug in mpc/control.

    After the installation according to your instruction, everything works smooth until I encounter the following error:

    self.sample_shape = torch.Size([self.num_nonzero_particles - 2], device=self.tensor_args['device'])
    TypeError: tuple() takes at most 1 argument (2 given)
    

    I removed the second argument in two locations: https://github.com/NVlabs/storm/blob/cf056514659cab9c5c7ac9d850eae7c56a660726/storm_kit/mpc/control/olgaussian_mpc.py#L112 https://github.com/NVlabs/storm/blob/cf056514659cab9c5c7ac9d850eae7c56a660726/storm_kit/mpc/control/sample_libs.py#L315

    With these modifications, everything works smoothly. It might be related to the torch version. I have installed torch v.1.10.0 (automatically through your setup file)

    Let me know if you have run into this problem, or tell me how I could fix it on my side.

    Best, Max.

    opened by maxspahn 1
  • How to deal with memory issues? - RuntimeError: CUDA error: out of memory

    How to deal with memory issues? - RuntimeError: CUDA error: out of memory

    Hi,

    I'm running the example franka_reacher.py on ubuntu 18 with

    • NVIDIA GeForce MX130, 2GB of memory.
    • Cuda toolkit 11.2

    What can I do to fix this memory error that shows up sometimes?

    Process Process-1:
    Traceback (most recent call last):
      File "/home/rgap/miniconda3/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
        self.run()
      File "/home/rgap/miniconda3/lib/python3.8/multiprocessing/process.py", line 108, in run
        self._target(*self._args, **self._kwargs)
      File "/home/rgap/LIBRARIES/storm/storm_kit/mpc/utils/mpc_process_wrapper.py", line 212, in optimize_process
        controller = torch.load(control_string)
      File "/home/rgap/.virtualenvs/exp/lib/python3.8/site-packages/torch/serialization.py", line 607, in load
        return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
      File "/home/rgap/.virtualenvs/exp/lib/python3.8/site-packages/torch/serialization.py", line 882, in _load
        result = unpickler.load()
      File "/home/rgap/.virtualenvs/exp/lib/python3.8/site-packages/torch/serialization.py", line 857, in persistent_load
        load_tensor(data_type, size, key, _maybe_decode_ascii(location))
      File "/home/rgap/.virtualenvs/exp/lib/python3.8/site-packages/torch/serialization.py", line 846, in load_tensor
        loaded_storages[key] = restore_location(storage, location)
      File "/home/rgap/.virtualenvs/exp/lib/python3.8/site-packages/torch/serialization.py", line 175, in default_restore_location
        result = fn(storage, location)
      File "/home/rgap/.virtualenvs/exp/lib/python3.8/site-packages/torch/serialization.py", line 157, in _cuda_deserialize
        return obj.cuda(device)
      File "/home/rgap/.virtualenvs/exp/lib/python3.8/site-packages/torch/_utils.py", line 79, in _cuda
        return new_type(self.size()).copy_(self, non_blocking)
      File "/home/rgap/.virtualenvs/exp/lib/python3.8/site-packages/torch/cuda/__init__.py", line 528, in _lazy_new
        return super(_CudaBase, cls).__new__(cls, *args, **kwargs)
    
    RuntimeError: CUDA error: out of memory
    
    CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
    For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
    ['95.704', '1.288', '0.742'] 0.138 0.020
    python3.8: /opt/conda/conda-bld/magma-cuda102_1583546904148/work/interface_cuda/interface.cpp:897: void magma_queue_create_from_cuda_internal(magma_device_t, cudaStream_t, cublasHandle_t, cusparseHandle_t, magma_queue**, const char*, const char*, int): Assertion `queue->dAarray__ != __null' failed.
    /home/rgap/miniconda3/lib/python3.8/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 6 leaked semaphore objects to clean up at shutdown
      warnings.warn('resource_tracker: There appear to be %d '
    
    opened by rgap 1
  • How to test storm on a real-time Ubuntu kernel

    How to test storm on a real-time Ubuntu kernel

    Hi, thank you for your excellent job! I want to design my own MPC controller based on your work and test it on the Franka robot. But I met some problems. Franka robot needs a real-time Ubuntu kernel, and "storm" needs an Nvidia GPU. I have installed the Nvidia driver 465 on the Ubuntu 5.4.10-rt5 kernel. But when I inputted Nvidia-smi in the terminal, it shows that it couldn't communicate with the Nvidia driver. I found "Nvidia driver cannot work on a real-time ubuntu kernel" on Google. So I want to know how to test your work with a Franka robot. Thank you!

    opened by RanCao2018 1
  • Explanation of Collision Constraints

    Explanation of Collision Constraints

    Can you please explain the different collision constraints:

    1. primitive_collisions: I couldn't find any info on this
    2. robot_self_collision: I am assuming this is for not colliding with the arm links
    3. scene_collision: This is for not colliding with environment obstacles using SceneCollisionNet.
    4. voxel_collision: I couldn't find any info on this

    It would be really helpful if you can explain what primitive Collisions and Voxel Collisions are for. Thank you.

    opened by kaustabpal 0
  • Unable to load collision spheres properly

    Unable to load collision spheres properly

    My team is working on implementing STORM on a UR16e robot. We defined the collision spheres to the best of our abilities following the example provided for the Franka Panda robot and using the stl files for the UR16e. The robot still collides with primitives. I have attached our robot collision sphere definition file and the mpc definition file. This video shows an example of the collision occurring.

    After speaking to Mohak we are trying to debug this issue by visualizing the spheres utilizing the w_batch_link_spheres object and update_batch_robot_collision_objs method in the class RobotSphereCollision in robot.py.

    Any further guidance or an existing method/code would be appreciated.

    ur16e_collision.txt ur16e_reacher_collision.txt

    opened by patorrad 8
Owner
NVIDIA Research Projects
NVIDIA Research Projects
Gradient-free global optimization algorithm for multidimensional functions based on the low rank tensor train format

ttopt Description Gradient-free global optimization algorithm for multidimensional functions based on the low rank tensor train (TT) format and maximu

null 5 May 23, 2022
Task-based end-to-end model learning in stochastic optimization

Task-based End-to-end Model Learning in Stochastic Optimization This repository is by Priya L. Donti, Brandon Amos, and J. Zico Kolter and contains th

CMU Locus Lab 164 Dec 29, 2022
A Momentumized, Adaptive, Dual Averaged Gradient Method for Stochastic Optimization

MADGRAD Optimization Method A Momentumized, Adaptive, Dual Averaged Gradient Method for Stochastic Optimization pip install madgrad Try it out! A best

Meta Research 774 Dec 31, 2022
High performance Cross-platform Inference-engine, you could run Anakin on x86-cpu,arm, nv-gpu, amd-gpu,bitmain and cambricon devices.

Anakin2.0 Welcome to the Anakin GitHub. Anakin is a cross-platform, high-performance inference engine, which is originally developed by Baidu engineer

null 514 Dec 28, 2022
GrabGpu_py: a scripts for grab gpu when gpu is free

GrabGpu_py a scripts for grab gpu when gpu is free. WaitCondition: gpu_memory >

tianyuluan 3 Jun 18, 2022
Stochastic Scene-Aware Motion Prediction

Stochastic Scene-Aware Motion Prediction [Project Page] [Paper] Description This repository contains the training code for MotionNet and GoalNet of SA

Mohamed Hassan 31 Dec 9, 2022
Collision risk estimation using stochastic motion models

collision_risk_estimation Collision risk estimation using stochastic motion models. This is a new approach, based on stochastic models, to predict the

Unmesh 7 Jun 26, 2022
SLAMP: Stochastic Latent Appearance and Motion Prediction

SLAMP: Stochastic Latent Appearance and Motion Prediction Official implementation of the paper SLAMP: Stochastic Latent Appearance and Motion Predicti

Kaan Akan 34 Dec 8, 2022
Guiding evolutionary strategies by (inaccurate) differentiable robot simulators @ NeurIPS, 4th Robot Learning Workshop

Guiding Evolutionary Strategies by Differentiable Robot Simulators In recent years, Evolutionary Strategies were actively explored in robotic tasks fo

Vladislav Kurenkov 4 Dec 14, 2021
MohammadReza Sharifi 27 Dec 13, 2022
Space robot - (Course Project) Using the space robot to capture the target satellite that is disabled and spinning, then stabilize and fix it up

Space robot - (Course Project) Using the space robot to capture the target satellite that is disabled and spinning, then stabilize and fix it up

Mingrui Yu 3 Jan 7, 2022
Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)

scikit-opt Swarm Intelligence in Python (Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Algorithm, Immune Algorithm,A

郭飞 3.7k Jan 3, 2023
library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization

NLopt is a library for nonlinear local and global optimization, for functions with and without gradient information. It is designed as a simple, unifi

Steven G. Johnson 1.4k Dec 25, 2022
Racing line optimization algorithm in python that uses Particle Swarm Optimization.

Racing Line Optimization with PSO This repository contains a racing line optimization algorithm in python that uses Particle Swarm Optimization. Requi

Parsa Dahesh 6 Dec 14, 2022
PaddleRobotics is an open-source algorithm library for robots based on Paddle, including open-source parts such as human-robot interaction, complex motion control, environment perception, SLAM positioning, and navigation.

简体中文 | English PaddleRobotics paddleRobotics是基于paddle的机器人开源算法库集,包括人机交互、复杂运动控制、环境感知、slam定位导航等开源算法部分。 人机交互 主动多模交互技术TFVT-HRI 主动多模交互技术是通过视觉、语音、触摸传感器等输入机器人

null 185 Dec 26, 2022
Motion Planner Augmented Reinforcement Learning for Robot Manipulation in Obstructed Environments (CoRL 2020)

Motion Planner Augmented Reinforcement Learning for Robot Manipulation in Obstructed Environments [Project website] [Paper] This project is a PyTorch

Cognitive Learning for Vision and Robotics (CLVR) lab @ USC 49 Nov 28, 2022
Distilling Motion Planner Augmented Policies into Visual Control Policies for Robot Manipulation (CoRL 2021)

Distilling Motion Planner Augmented Policies into Visual Control Policies for Robot Manipulation [Project website] [Paper] This project is a PyTorch i

Cognitive Learning for Vision and Robotics (CLVR) lab @ USC 6 Feb 28, 2022
A research toolkit for particle swarm optimization in Python

PySwarms is an extensible research toolkit for particle swarm optimization (PSO) in Python. It is intended for swarm intelligence researchers, practit

Lj Miranda 1k Dec 30, 2022
Simulating Sycamore quantum circuits classically using tensor network algorithm.

Simulating the Sycamore quantum supremacy circuit This repo contains data we have obtained in simulating the Sycamore quantum supremacy circuits with

Feng Pan 46 Nov 17, 2022