Giter VIP home page Giter VIP logo

aws-robomaker-sample-application-meirorunner's Introduction

Meiro Runner - Escape from a maze world by training a reinforcement learning model on AWS RoboMaker

Technologies for autonomous robots and self-driving cars have been rapidly advancing. Their development often relies on building application-specific simulation environments, and using the information to train reinforcement learning (RL) models.

The following figure (a screenshot from Gazebo) shows you a simulation environment on AWS RoboMaker. This sample robot operating system (ROS) app sets up the environment where an agent is placed in a simple maze. Some of you might be curious about what meiro means? Meiro stands for a maze in Japanese.

image1

An RL algorithm will help navigate the agent to reach to the GOAL without bumping into a wall. The agent has a 360-degree surround lidar scanner (360 points x 5 fps) so that it monitors the distance from the surrounding walls all around. The lidar data are used to describe a state at a given step within an episode. The agent makes a decision out of 5 different actions i.e. turn left, turn right, move straight, steer to the left, and steer to the right. (To learn more about the reinforcement learning framework used for this application, Coach, please take a look at the following link)

Preparation

This sample application is expected to be executed from AWS RoboMaker.

On AWS RoboMaker development environment, execute following commands to prepare the environment (Kinetic and Melodic are supported).

cd ~/environment
git clone https://github.com/aws-samples/aws-robomaker-sample-application-meirorunner.git  MeiroRunner
cd MeiroRunner
./ws_setup.sh

The setup script will create AWS resources to run the application and the created resources are noted in ws_settings.yaml file. The setup script will then build the application, the whole process will take around 20 minitue to complete.

How to run application on AWS RoboMaker Simulation

  • To train machine learning model with reinforcement learning using robomaker simulation, execute following command in the terminal window:

    cd ~/environment/MeiroRunner
    ./app_launcher.sh

    (The script file app_launcher.sh is created when you executed ./ws_setup.sh)

  • To evaluate the machine learning model using robomaker simulation, execute following command in the terminal window:

    cd ~/environment/MeiroRunner
    ./app_launcher_evaluate.sh

    (The script file app_launcher.sh is created when you executed ./ws_setup.sh)

How to modify application

To modify and rebuild the application, modify the code on AWS RoboMaker development environment and execute following:

  • If you change the file under simulation_ws

    cd ~/environment/MeiroRunner/simulation_ws
    colcon build
    colcon bundle
  • If you change the file under robot_ws

    cd ~/environment/MeiroRunner/robot_ws
    colcon build
    colcon bundle

To run the machine learning model in the real-life using a physical robot (i.e. Turtlebot3 Burger), you can use a launch file bringup_robot.launch in meiro_runner_robot package. The robot application is under robot_ws direcotry, to build and deploy the application to physical robots, please refer to RoboMaker documentation. Following is the configuration for robot application running in Turtlebot3 Burger.

  • Package name: meiro_runner_robot
  • Launch file: bringup_robot.launch
  • Environment variables:
    • MARKOV_PRESET_FILE: meiro_runner.py
    • MODEL_FILE: model/model.pb
    • MODEL_S3_PREFIX: model-store
    • ROS_AWS_REGION: <copy the value of aws_region from ws_setting.yaml>
    • MODEL_S3_BUCKET: <copy the value of bucket_name from ws_setting.yaml>

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-robomaker-sample-application-meirorunner's People

Contributors

amazon-auto avatar dependabot[bot] avatar katakuji avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-robomaker-sample-application-meirorunner's Issues

ErrERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.or

i follow this doc: https://github.com/aws-samples/aws-robomaker-sample-application-meirorunner
in my AWS RoboMaker development environment:
cd ~/environment
git clone https://github.com/aws-samples/aws-robomaker-sample-application-meirorunner.git MeiroRunner
cd MeiroRunner
./ws_setup.sh

but :

794.249s] ERROR:colcon:colcon bundle: Command '['/home/ubuntu/environment/MeiroRunner/robot_ws/bundle/cache/bundle_staging/usr/bin/python3', '-m', 'pip', 'install', '--default-timeout=100', '--ignore-installed', '-r', '/home/ubuntu/environment/MeiroRunner/robot_ws/bundle/cache/installer_cache/pip3/requirements']' died with <Signals.SIGKILL: 9>.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/colcon_core/command.py", line 528, in verb_main
rc = context.args.main(context=context)
File "/usr/local/lib/python3.6/dist-packages/colcon_bundle/verb/bundle.py", line 138, in main
upgrade_deps_graph)
File "/usr/local/lib/python3.6/dist-packages/colcon_bundle/verb/bundle.py", line 187, in _manage_dependencies
include_sources=context.args.include_sources)
File "/usr/local/lib/python3.6/dist-packages/colcon_bundle/verb/_installer_manager.py", line 78, in run_installers
installer_metadata[name] = installer.install()
File "/usr/local/lib/python3.6/dist-packages/colcon_bundle/installer/base_pip_installer.py", line 100, in install
subprocess.check_call(pip_args)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/ubuntu/environment/MeiroRunner/robot_ws/bundle/cache/bundle_staging/usr/bin/python3', '-m', 'pip', 'install', '--default-timeout=100', '--ignore-installed', '-r', '/home/ubuntu/environment/MeiroRunner/robot_ws/bundle/cache/installer_cache/pip3/requirements']' died with <Signals.SIGKILL: 9>.

Setup failed!
Reason: Failed to bundle the sample program!

i execute this command

/home/ubuntu/environment/MeiroRunner/robot_ws/bundle/cache/bundle_staging/usr/bin/python3 -m pip install --default-timeout=100 --ignore-installed -r /home/ubuntu/environment/MeiroRunner/robot_ws/bundle/cache/installer_cache/pip3/requirements

but:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
awscli 1.19.84 requires colorama<0.4.4,>=0.2.5, which is not installed.
awscli 1.19.84 requires botocore==1.20.84, but you have botocore 1.18.18 which is incompatible.
awscli 1.19.84 requires docutils<0.16,>=0.10, but you have docutils 0.17.1 which is incompatible.
awscli 1.19.84 requires s3transfer<0.5.0,>=0.4.0, but you have s3transfer 0.3.7 which is incompatible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.