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
- Modified version of Menge
- [gazebo_ros_pkgs] (https://github.com/ros-simulation/gazebo_ros_pkgs.git)
- [hector_gazebo] (https://github.com/tu-darmstadt-ros-pkg/hector_gazebo)
- hector_localization
- hector_models
- hector_quadrotor
- hector_slam
- menge_gazebo
- [Gazebo modified for hardware skinning] (https://bitbucket.org/michaelhuang16/gazebo)
- Ubuntu 16.04
- ROS kinetic
- Do not install full desktop version (ros-kinetic-desktop-full) that includes gazebo7 binaries
- Only install ros-kinetic-desktop or less
- 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
- Follow ROS kinetic installation instructions on Ubuntu to install ros-kinetic-desktop package
- Follow instructions here to download modified source mentioned above, build and install SDFormat, gazebo.
- clone this repo including submodules
- git clone --recursive https://github.com/michaelhuang14/quadevac_sim_ws
- build menge
- cd simons_project_ws/Menge/projects/g++
- make debug
- build all ros packages in this repo
- cd simons_project_ws/catkin_ws
- rosdep install --from-paths . --ignore-src --rosdistro kinetic
- catkin_make
- Setup environment
- in catkin_ws dir: source devel/setup.bash && source env_setup.sh
- Run the simulation
- in same terminal as step 6: roslaunch menge_hector_quadroto_demo menge_quadrotor_rand.launch
- 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)
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.
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.
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.
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.
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.