Coder Social home page Coder Social logo

pec017 / robomaker-helloworld Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-robotics/aws-robomaker-sample-application-helloworld

0.0 1.0 0.0 12.19 MB

Demonstrates the structure of ROS projects that work with AWS RoboMaker by creating a robot spinning in an empty world.

License: MIT No Attribution

CMake 42.78% Shell 17.17% Python 26.49% Makefile 13.57%

robomaker-helloworld's Introduction

AWS RoboMaker Sample Application - Hello World

This demonstrates the structure of a ROS project that works with RoboMaker by creating a robot spinning in an empty world.

RoboMaker sample applications include third-party software licensed under open-source licenses and is provided for demonstration purposes only. Incorporation or use of RoboMaker sample applications in connection with your production workloads or a commercial products or devices may affect your legal rights or obligations under the applicable open-source licenses. Source code information can be found here.

Requirements

  • ROS Kinetic / ROS Melodic - Other versions may work, however they have not been tested
  • Colcon - Used for building and bundling the application.

Build

Install requirements

Follow links above for instructions on installing required software.

Pre-build commands

sudo apt-get update
rosdep update

Robot

cd robot_ws
vcs import < .rosinstall
rosdep install --from-paths src --ignore-src -r -y
colcon build

Simulation

cd simulation_ws
vcs import < .rosinstall
rosdep install --from-paths src --ignore-src -r -y
colcon build

Run

The TURTLEBOT3_MODEL environment variable is optional when running both robot and simulation application. Default value is waffle_pi. Valid values are burger, waffle, and waffle_pi. Set it by

export TURTLEBOT3_MODEL=<robot-model>

Launch the application with the following commands:

  • Running Robot Application on a Robot

    source robot_ws/install/local_setup.sh
    roslaunch hello_world_robot deploy_rotate.launch
  • Running Robot Application in a Simulation

    source robot_ws/install/local_setup.sh
    roslaunch hello_world_robot rotate.launch
  • Running Simulation Application

    source simulation_ws/install/local_setup.sh
    roslaunch hello_world_simulation empty_world.launch

Note that when running robot applications on a robot, use_sim_time should be set to false (which is the default value in deploy_rotate.launch.py). When running robot applications along with simulation applications, use_sim_time should be set to true for both applications (which is the default value in both rotate.launch.py and empty_word.launch.py).

When running simulation applications, run command with gui:=true to run gazebo client for visualization

Run with a WorldForge world

After exporting a world from WorldForge, we can unzip the content and move under simulation_ws package:

unzip exported_world.zip
mv aws_robomaker_worldforge_pkgs simulation_ws/src/

Build it again

cd simulation_ws
colcon build

Launch the application with the following commands:

source simulation_ws/install/local_setup.sh
roslaunch hello_world_simulation worldforge_world.launch

By default, WorldForge packages will load the exported world. To override, specify the environment variable WORLD_ID.

# use worldId found in "src/aws_robomaker_worldforge_worlds/worlds"
# e.g, generation_05wq8sybdcn2_world_1
export WORLD_ID=<worldId>  

Using this sample with RoboMaker

You first need to install colcon-ros-bundle. Python 3.5 or above is required.

pip3 install -U setuptools
pip3 install colcon-ros-bundle

After colcon-ros-bundle is installed you need to build your robot or simulation, then you can bundle with:

# Bundling Robot Application
cd robot_ws
source install/local_setup.sh
colcon bundle

# Bundling Simulation Application
cd simulation_ws
source install/local_setup.sh
colcon bundle

This produces the artifacts robot_ws/bundle/output.tar and simulation_ws/bundle/output.tar respectively. You'll need to upload these to an s3 bucket, then you can use these files to create a robot application, create a simulation application, and create a simulation job in RoboMaker.

ROS Nodes launched by this Sample

Nodes created by this sample

/rotate

ROS Topics used by this Sample

/clock
/cmd_vel

License

MIT-0 - See LICENSE for further information

How to Contribute

Create issues and pull requests against this Repository on Github

robomaker-helloworld's People

Contributors

aalon avatar ahtsan avatar cevans87 avatar kksun avatar mm318 avatar murphm8 avatar ojasjoshi avatar raghaprasad avatar ryanewel avatar samuelgundry avatar timrobotson avatar yyu avatar

Watchers

 avatar

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.