Skip to content

Hexiang-W/hx_sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MY Simulations

How'yall doing! This is Haysen, welcome to my github simulation repository!

This repo hosts gazebo worlds for various drone scenarios and various drone configurations. This Repo is specifically designed to work with the Ardupilot control system, and utilizes the ardupilot gazebo plugin to allow the ardupilot control software to interface and control the model drone in gazebo.

Vehicles Supported

Drone Simulations

runway world

This repo contains a couple different gazebo worlds containing various ardupilot drone configurations. The worlds are listed below

  • droneOnly.world - simple gazebo world containing only a single drone
  • runway.world - simple gazebo world containing only a single drone on a runway
  • lidar.world - a simple gazebo world containing a single drone with a 2d lidar sensor
  • multi_drone.world - a simple world containing 12 drones

Running Drone Simulations

Each world contains a corresponding launch file. For example to launch runway.world run

roslaunch my_sim runway.launch

Launch the ardupilot instance by running

cd ~/ardupilot/ArduCopter/ && sim_vehicle.py -v ArduCopter -f gazebo-iris --console

Quad Planes

Quad Planes are a vtol aircraft that uses quadcopter controls in hover and airplane controls in forward flight.

vtol pic

Setup

In order to use the gazebo quad plane sim a few files needed to be modified in ardupilot the first is to add the following to the file ardupilot/Tools/autotest/pysim/vehicleinfo.py on line 274. this should be within the Arduplane structure.

"gazebo-quadplane": {
    "waf_target": "bin/arduplane",
    "default_params_filename": "default_params/gazebo_quadplane.parm",
},

copy the file my_sim/scripts/vtol-params/gazebo_quadplane.parm to ardupilot/Tools/autotest/default_params/gazebo_quadplane.parm

Running VTOL sim

Run Boat Sim

First terminal

roslaunch my_sim vtol.launch

Second terminal

sim_vehicle.py -v ArduPlane -f gazebo-quadplane  -m --mav10 --console -I0

Boat Simulation

Recently I have been experimenting with Ardurover for controlling an autonomous boat. Below shows the steps for installing for boat simulation. If you have already installed for quadcopter simulation, then most of the boat installation should already be completed.

boat setup

river world

Run Boat Sim

First terminal

roslaunch my_sim boat.launch

Second terminal

sim_vehicle.py -v APMrover2 -f gazebo-rover  -m --mav10 --console -L Viridian

MY_SIM Models

drone1-12

This repo hosts a few helpful gazebo models you can use to build upon. Included in this repo are 12 drones which contain the ardupilot plugin. Each ardupilot plugin is staggered such that you can simulate multiple unique aircraft using ardupilot's SITL.

drone_with_lidar

Example drone that has a 2d lidar attached. The lidar plugin publishes a sensor_msgs/LaserScan ROS msg containing return data.

topics

/spur/laser/scan

drone_with_lidar

drone_with_sonar

Example drone with 4 sonars attached in each direction. Each sonar publishes a sensor_msgs/Range ROS msg containing range data.

topics

/drone1/sensor/sonar/back
/drone1/sensor/sonar/front
/drone1/sensor/sonar/left
/drone1/sensor/sonar/right

drone_with_sonar

drone_with_camera

Example drone with a forward facing camera. The camera published a sensor_msgs/Image ROS msg which can be used to view or do image processing on.

drone_with_camera

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published