Git Product home page Git Product logo

quadevac_sim_ws's Introduction

Quadcopter Assisted Evacuation Simulation Work Space

Main workspace for my project done at [Simons Summer Research Program] (http://www.stonybrook.edu/simons/).

See the poster for summary of the project.

As the project uses latest ROS distribution (kinetic), and latest Gazebo simulator built from source code, many ROS packages used by the project are either unavailable in binary form or incompatible with the new Gazebo during the time frame of the project. This workspace serves as a holding area that includes many other components as git submodules. Note some of these submodule may be removed once they are available in compatible binary form

Dependencies hosted in this work space

  1. Modified version of Menge
  2. [gazebo_ros_pkgs] (https://github.com/ros-simulation/gazebo_ros_pkgs.git)
  3. [hector_gazebo] (https://github.com/tu-darmstadt-ros-pkg/hector_gazebo)
  4. hector_localization
  5. hector_models
  6. hector_quadrotor
  7. hector_slam
  8. menge_gazebo

External Dependencies

  1. [Gazebo modified for hardware skinning] (https://bitbucket.org/michaelhuang16/gazebo)
    • See build instructions here on additional dependencies.
    • Gazebo should be built and installed from source.
    • SDFormat also modified to support instanced_actor model with hardware skinning. You can download the modified version from here.
  2. Ubuntu 16.04
  3. ROS kinetic
    • Do not install full desktop version (ros-kinetic-desktop-full) that includes gazebo7 binaries
    • Only install ros-kinetic-desktop or less
  4. Other ROS dependencies can be installed by running "rosdep install --from-paths . --ignore-src --rosdistro kinetic" from "catkin_ws" directory
    • ignore all gazebo related packages and answer "no" when prompted for confirming installation

Steps to Build and Run

  1. Follow ROS kinetic installation instructions on Ubuntu to install ros-kinetic-desktop package
  2. Follow instructions here to download modified source mentioned above, build and install SDFormat, gazebo.
  3. clone this repo including submodules
  4. build menge
    • cd simons_project_ws/Menge/projects/g++
    • make debug
  5. build all ros packages in this repo
    • cd simons_project_ws/catkin_ws
    • rosdep install --from-paths . --ignore-src --rosdistro kinetic
    • catkin_make
  6. Setup environment
    • in catkin_ws dir: source devel/setup.bash && source env_setup.sh
  7. Run the simulation
    • in same terminal as step 6: roslaunch menge_hector_quadroto_demo menge_quadrotor_rand.launch
  8. control the quadcopter in simulation:
    • in separate terminal repeat step 6 to setup environment
    • then in the same terminal run one of following.
    • roslaunch hector_quadrotor_teleop logitech_gamepad.launch (you need plugin a logitech gamepad to use this)
    • rosrun teleop_twist_keyboard teleop_twist_keyboard.py (see instructions here)

Quick Guide on Creating Your Own Simulation

Overview of Components

First of all, the simulation framework is made revolving around three different components. ROS, Gazebo, Menge. Before using this tool it’s best to have at least basic knowledge of each of those components by following tutorials/instructions linked below:

  • ROS- Understand how workspaces setup, ROS nodes and communication framework, how to write ROS launch files.
  • Gazebo - Get familiar with user interface, how to write world file in SDF, how to write a world plugin.
  • Menge - Read the paper to understand the xml format for scene and agent behavior specification.

Creating a ROS Launch file

All launch files are stored inside the catkin_ws/src/menge_gazebo/menge_hector_quadrotor_demo/launch directory; two examples have already been included. The world launch files are located in the catkin_ws/src/menge_gazebo/menge_gazebo_worlds/launch/ directory.

Creating a plugin (ROS package)

Create a ROS package with the name of your plugin. Copy and paste the contents of one of the example plugins in the workspace (maybe menge_plugin_randomized), and change naming and Cmake files appropriately. Then, add personalized code to the main plugin class (In the randomized plugin case, MengeRand.cpp). This plugin should handle inserting crowd agents and updating the crowd position and handing the quadcoper position to the Menge simulator, as well as any special instances like where one agent does not use and actor model but a simple cylinder.

Building the scene

For now, obstacles and buildings need to be specified in both menge and gazebo xml files. The gazebo world files are located in catkin_ws/src/menge_gazebo/menge_gazebo_worlds/worlds, while obstacles are stored in the scene specification xml (nameS.xml) for each scenario in the Menge/examples/core/ directory. When creating the gazebo world file make sure you link the correct plugin library to the scene. For example, in the case of menge_rand.world, I have specified the library of menge_plugin_randomized in the world file. All agent parameters such as personal space or mass or turning bias, as well as the quantity and spawn formation of crowds are specified in the scene xml files of each scenario, while crowd behavior, transitions, states, and goalsets are specified in the behavior xml files (nameB.xml) of each scenario. All of these xml files are located in the Menge/examples/core/ directory.

Runnning the Simulation

Once all launch files, plugin code, menge specifications have been completed and built, roslaunch menge_hector_quadrotor_demo yourlaunchfile.launch in the catkin_ws directory.

quadevac_sim_ws's People

Contributors

michaelhuang14 avatar

Stargazers

xjf2000 avatar Chien-Yu Lin avatar

Watchers

James Cloos avatar  avatar

Forkers

nithishkumars

quadevac_sim_ws's Issues

meet error when catkin_make

I meet the following error when I do catkin_make:

In file included from /quadevac_sim_ws/catkin_ws/src/menge_gazebo/menge_common/src/MengePlugin.cpp:8:0:
/quadevac_sim_ws/catkin_ws/src/menge_gazebo/menge_plugin_randomized/../menge_common/include/MengePlugin.h:13:44: fatal error: gazebo/physics/InstancedActor.hh: No such file or directory 

My gazebo version is:

Gazebo multi-robot simulator, version 8.6.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

cmake errors when building gazebo

Hey Michael,

I am trying to use your modified Gazebo to run crowd simulations using Menge. When trying to build your version of Gazebo I get the error similar to here-

http://answers.gazebosim.org/question/15652/ignition-dependency-conflict-when-building-gazebo-from-source/

I am using ubuntu 16.04 and the solution ^ suggests to use a different branch of the gazebo repository. I am not sure which one to use for our case. Any advice on this would help greatly.

Thanks

Warning [parser.cc:779] XML Element[instanced_actor]

Hello!Firstly thanks for your wonderful job!
I have build sdf provided by you.However,when I launched the node with the libmenge_plugin_randomized.so, there is a problem that "Warning [parser.cc:779] XML Element[instanced_actor], child of element[sdf] not defined in SDF. Ignoring[instanced_actor]. You may have an incorrect SDF file, or an sdformat version that doesn't support this element.
".
I have check the sdf,and there already is a instance_actor.sdf.
So could you tell me how you build the sdformat?
Thanks for any advices!

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.