Doosan robotic arm, simulation, control, visualization in Gazebo and ROS2 for Reinforcement Learning.

Overview


Robotic Arm Simulation in ROS2 and Gazebo

General Overview

This repository includes: First, how to simulate a 6DoF Robotic Arm from scratch using GAZEBO and ROS2. Second, it provides a custom Reinforcement Learning Environment where you can test the Robotic Arm with your RL algorithms. Finally, we test the simulation and environment with a reacher target task, using RL and the 6DoF Robotic Arm with a visual target point.

Prerequisites

Library Version (TESTED)
Ubuntu 20.04
ROS2 Foxy
ros2_control link
gazebo_ros2_control link

How to run this Repository

In the following links you can find a step-by-step instruction section to run this repository and simulate the robotic arm:

  • Simulation in Gazebo and ROS2 --> Tutorial-link

    • Configurate and spawn the robotic arm in Gazebo.
    • Move the robot with a simple position controller.
  • Custom RL Environment --> Tutorial-link

    • A complete Reinforcement Learning environment simulation.
  • Reacher task with RL --> Cooming soon

    • Robot reacher task.

Citation

If you use either the code, data or the step from the tutorial-blog in your paper or project, please kindly star this repo and cite our webpage

Acknowledgement

I want to thank Doosan Robotics for their repositories, and packages where they took part of this code.

Also, thanks to the authors of these repositories and their tutorials where I took some ideas

Contact

Please feel free to contact me or open an issue if you have questions or need additional explanations.

The released codes are only allowed for non-commercial use.
You might also like...
Reinforcement learning for self-driving in  a 3D simulation
Reinforcement learning for self-driving in a 3D simulation

SelfDrive_AI Reinforcement learning for self-driving in a 3D simulation (Created using UNITY-3D) 1. Requirements for the SelfDrive_AI Gym You need Pyt

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

Differentiable simulation for system identification and visuomotor control
Differentiable simulation for system identification and visuomotor control

gradsim gradSim: Differentiable simulation for system identification and visuomotor control gradSim is a unified differentiable rendering and multiphy

Autonomous Ground Vehicle Navigation and Control Simulation Examples in Python

Autonomous Ground Vehicle Navigation and Control Simulation Examples in Python THIS PROJECT IS CURRENTLY A WORK IN PROGRESS AND THUS THIS REPOSITORY I

Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet.
Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet.

Ravens is a collection of simulated tasks in PyBullet for learning vision-based robotic manipulation, with emphasis on pick and place. It features a Gym-like API with 10 tabletop rearrangement tasks, each with (i) a scripted oracle that provides expert demonstrations (for imitation learning), and (ii) reward functions that provide partial credit (for reinforcement learning).

Attention-driven Robot Manipulation (ARM) which includes Q-attention
Attention-driven Robot Manipulation (ARM) which includes Q-attention

Attention-driven Robotic Manipulation (ARM) This codebase is home to: Q-attention: Enabling Efficient Learning for Vision-based Robotic Manipulation I

PyTorch implementation of ARM-Net: Adaptive Relation Modeling Network for Structured Data.
PyTorch implementation of ARM-Net: Adaptive Relation Modeling Network for Structured Data.

A ready-to-use framework of latest models for structured (tabular) data learning with PyTorch. Applications include recommendation, CRT prediction, healthcare analytics, and etc.

Keyword spotting on Arm Cortex-M Microcontrollers
Keyword spotting on Arm Cortex-M Microcontrollers

Keyword spotting for Microcontrollers This repository consists of the tensorflow models and training scripts used in the paper: Hello Edge: Keyword sp

Pytorch implementation of
Pytorch implementation of "ARM: Any-Time Super-Resolution Method"

ARM-Net Dependencies Python 3.6 Pytorch 1.7 Results Train Data preprocessing cd data_scripts python extract_subimages_test.py python data_augmentation

Comments
  • RuntimeError: Signal event received before subprocess transport available.

    RuntimeError: Signal event received before subprocess transport available.

    Hy while executing ``` cd ros2_ws

    . install/setup.bash

    ros2 launch my_doosan_pkg my_doosan_gazebo.launch.py

    I get the following error: 
    ```
    `[INFO] [launch]: All log files can be found below /home/florian/.ros/log/2022-11-26-12-01-48-262247-florian-X580VD-213158
    [INFO] [launch]: Default logging verbosity is set to INFO
    Task exception was never retrieved
    future: <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py:226> exception=PackageNotFoundError("package 'gazebo_ros' not found, searching: ['/home/florian/r2_ws/install/my_doosan_pkg', '/home/florian/r2_ws/install/gz_snap_ros2_control_demos', '/opt/ros/foxy']")>
    Traceback (most recent call last):
      File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/packages.py", line 50, in get_package_prefix
        content, package_prefix = get_resource('packages', package_name)
      File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/resources.py", line 48, in get_resource
        raise LookupError(
    LookupError: Could not find the resource 'gazebo_ros' of type 'packages'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event
        await self.__process_event(next_event)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 248, in __process_event
        visit_all_entities_and_collect_futures(entity, self.__context))
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
        futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
        futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
        futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
      [Previous line repeated 1 more time]
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
        sub_entities = entity.visit(context)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit
        return self.execute(context)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/actions/node.py", line 453, in execute
        ret = super().execute(context)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 823, in execute
        self.__expand_substitutions(context)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 668, in __expand_substitutions
        cmd = [perform_substitutions(context, x) for x in self.__cmd]
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 668, in <listcomp>
        cmd = [perform_substitutions(context, x) for x in self.__cmd]
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/perform_substitutions_impl.py", line 26, in perform_substitutions
        return ''.join([context.perform_substitution(sub) for sub in subs])
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/perform_substitutions_impl.py", line 26, in <listcomp>
        return ''.join([context.perform_substitution(sub) for sub in subs])
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_context.py", line 232, in perform_substitution
        return substitution.perform(self)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/substitutions/executable_in_package.py", line 76, in perform
        package_prefix = super().perform(context)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/substitutions/find_package.py", line 79, in perform
        result = self.find(package)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/substitutions/find_package.py", line 96, in find
        return get_package_prefix(package_name)
      File "/opt/ros/foxy/lib/python3.8/site-packages/ament_index_python/packages.py", line 52, in get_package_prefix
        raise PackageNotFoundError(
    ament_index_python.packages.PackageNotFoundError: "package 'gazebo_ros' not found, searching: ['/home/florian/r2_ws/install/my_doosan_pkg', '/home/florian/r2_ws/install/gz_snap_ros2_control_demos', '/opt/ros/foxy']"
    Task exception was never retrieved
    future: <Task finished name='Task-8' coro=<LaunchService._process_one_event() done, defined at /opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py:226> exception=RuntimeError('Signal event received before subprocess transport available.')>
    Traceback (most recent call last):
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event
        await self.__process_event(next_event)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 248, in __process_event
        visit_all_entities_and_collect_futures(entity, self.__context))
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
        sub_entities = entity.visit(context)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit
        return self.execute(context)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/opaque_function.py", line 75, in execute
        return self.__function(context, *self.__args, **self.__kwargs)
      File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/execute_process.py", line 443, in __on_signal_process_event
        raise RuntimeError('Signal event received before subprocess transport available.')
    RuntimeError: Signal event received before subprocess transport available.
    [INFO] [robot_state_publisher-1]: process started with pid [213161]
    [robot_state_publisher-1] Parsing robot urdf xml string.
    [robot_state_publisher-1] Link base_0 had 1 children
    [robot_state_publisher-1] Link link1 had 1 children
    [robot_state_publisher-1] Link link2 had 1 children
    [robot_state_publisher-1] Link link3 had 1 children
    [robot_state_publisher-1] Link link4 had 1 children
    [robot_state_publisher-1] Link link5 had 1 children
    [robot_state_publisher-1] Link link6 had 0 children
    [robot_state_publisher-1] [INFO] [1669460508.868788604] [robot_state_publisher]: got segment base_0
    [robot_state_publisher-1] [INFO] [1669460508.868970600] [robot_state_publisher]: got segment link1
    [robot_state_publisher-1] [INFO] [1669460508.868987886] [robot_state_publisher]: got segment link2
    [robot_state_publisher-1] [INFO] [1669460508.868996441] [robot_state_publisher]: got segment link3
    [robot_state_publisher-1] [INFO] [1669460508.869004264] [robot_state_publisher]: got segment link4
    [robot_state_publisher-1] [INFO] [1669460508.869011514] [robot_state_publisher]: got segment link5
    [robot_state_publisher-1] [INFO] [1669460508.869018581] [robot_state_publisher]: got segment link6
    [robot_state_publisher-1] [INFO] [1669460508.869031652] [robot_state_publisher]: got segment world
    [ERROR] [robot_state_publisher-1]: process[robot_state_publisher-1] failed to terminate '5' seconds after receiving 'SIGINT', escalating to 'SIGTERM'
    [INFO] [robot_state_publisher-1]: sending signal 'SIGTERM' to process[robot_state_publisher-1]
    [ERROR] [robot_state_publisher-1]: process has died [pid 213161, exit code -15, cmd '/opt/ros/foxy/lib/robot_state_publisher/robot_state_publisher --ros-args -r __node:=robot_state_publisher --params-file /tmp/launch_params_p8x92nsl']`
    ```
    opened by XnoTGitHub 1
Owner
David Valencia
Engineer. Enthusiast of robotics and ML. PhD student at University of Auckland
David Valencia
Ros2-voiceroid2 - ROS2 wrapper package of VOICEROID2

ros2_voiceroid2 ROS2 wrapper package of VOICEROID2 Windows Only Installation Ins

Nkyoku 1 Jan 23, 2022
ManipulaTHOR, a framework that facilitates visual manipulation of objects using a robotic arm

ManipulaTHOR: A Framework for Visual Object Manipulation Kiana Ehsani, Winson Han, Alvaro Herrasti, Eli VanderBilt, Luca Weihs, Eric Kolve, Aniruddha

AI2 65 Dec 30, 2022
A robotic arm that mimics hand movement through MediaPipe tracking.

La-Z-Arm A robotic arm that mimics hand movement through MediaPipe tracking. Hardware NVidia Jetson Nano Sparkfun Pi Servo Shield Micro Servos Webcam

Alfred 1 Jun 5, 2022
👨‍💻 run nanosaur in simulation with Gazebo/Ingnition

?? ??‍?? nanosaur_gazebo nanosaur The smallest NVIDIA Jetson dinosaur robot, open-source, fully 3D printable, based on ROS2 & Isaac ROS. Designed & ma

nanosaur 9 Jul 19, 2022
Deep Reinforcement Learning for mobile robot navigation in ROS Gazebo simulator

DRL-robot-navigation Deep Reinforcement Learning for mobile robot navigation in ROS Gazebo simulator. Using Twin Delayed Deep Deterministic Policy Gra

null 87 Jan 7, 2023
🦕 NanoSaur is a little tracked robot ROS2 enabled, made for an NVIDIA Jetson Nano

?? nanosaur NanoSaur is a little tracked robot ROS2 enabled, made for an NVIDIA Jetson Nano Website: nanosaur.ai Do you need an help? Discord For tech

NanoSaur 162 Dec 9, 2022
YOLOv5 + ROS2 object detection package

YOLOv5-ROS YOLOv5 + ROS2 object detection package This program changes the input of detect.py (ultralytics/yolov5) to sensor_msgs/Image of ROS2. Requi

Ar-Ray 23 Dec 19, 2022
Megaverse is a new 3D simulation platform for reinforcement learning and embodied AI research

Megaverse Megaverse is a new 3D simulation platform for reinforcement learning and embodied AI research. The efficient design of the engine enables ph

Aleksei Petrenko 191 Dec 23, 2022
PyBullet CartPole and Quadrotor environments—with CasADi symbolic a priori dynamics—for learning-based control and reinforcement learning

safe-control-gym Physics-based CartPole and Quadrotor Gym environments (using PyBullet) with symbolic a priori dynamics (using CasADi) for learning-ba

Dynamic Systems Lab 300 Dec 28, 2022
Make a Turtlebot3 follow a figure 8 trajectory and create a robot arm and make it follow a trajectory

HW2 - ME 495 Overview Part 1: Makes the robot move in a figure 8 shape. The robot starts moving when launched on a real turtlebot3 and can be paused a

Devesh Bhura 0 Oct 21, 2022