Commit 66c1fc05 authored by Ibrahim Ahmed's avatar Ibrahim Ahmed
Browse files

Setup model/plugin/world structure for testing

parents
# gazebo
## Tutorials
* [Gazebo Tutorials](http://gazebosim.org/tutorials)
* [Overview: components/env variables/plugins](http://gazebosim.org/tutorials?tut=components&cat=get_started)
* Matlab
* [VM for Gazebo 9, ROS Melodic, Gazebo-ROS plugin](https://www.mathworks.com/ros2_vm_install/v2)
* [Perform Co-Simulation between Simulink and Gazebo](https://www.mathworks.com/help/robotics/examples/perform-co-simulation-between-simulink-and-gazebo.html)
## Setup
```
# Download model database:
git clone https://github.com/osrf/gazebo_models ~/src/
```
## Gazebo docs
These docs apply to the VM.
Gazebo variables can be initialized by running `/usr/share/gazebo/setup.sh`.
Gazebo worlds located in `/usr/share/gazebo-9/worlds`.
The official gazebo model database is located at: https://github.com/osrf/gazebo_models
{
"folders": [
{
"path": "."
},
{
"path": "../../src/GazeboPlugin"
}
],
"settings": {}
}
\ No newline at end of file
<?xml version='1.0'?>
<database>
<name>name_of_this_database</name>
<license>Creative Commons Attribution 3.0 Unported</license>
<models>
<uri>file://test</uri>
</models>
</database>
\ No newline at end of file
<?xml version="1.0"?>
<model>
<name>Test</name>
<version>1.0</version>
<sdf version='1.5'>model.sdf</sdf>
<author>
<name>Ibrahim Ahmed</name>
<email>ibrahim.ahmed@vanderbilt.edu</email>
</author>
<description>
A test model to learn Gazebo-9 w/ ROS integration.
</description>
</model>
\ No newline at end of file
<sdf version="1.5">
<model name="my_model">
<pose>0 0 0.5 0 0 0</pose>
<static>true</static>
<link name="link">
<inertial>
<mass>1.0</mass>
<inertia> <!-- inertias are tricky to compute -->
<!-- http://gazebosim.org/tutorials?tut=inertia&cat=build_robot -->
<ixx>0.083</ixx> <!-- for a box: ixx = 0.083 * mass * (y*y + z*z) -->
<ixy>0.0</ixy> <!-- for a box: ixy = 0 -->
<ixz>0.0</ixz> <!-- for a box: ixz = 0 -->
<iyy>0.083</iyy> <!-- for a box: iyy = 0.083 * mass * (x*x + z*z) -->
<iyz>0.0</iyz> <!-- for a box: iyz = 0 -->
<izz>0.083</izz> <!-- for a box: izz = 0.083 * mass * (x*x + y*y) -->
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</visual>
</link>
</model>
</sdf>
\ No newline at end of file
source /usr/share/gazebo/setup.sh
export GAZEBO_MODEL_PATH=~/src/gazebo_models/:${GAZEBO_MODEL_PATH}
export GAZEBO_PLUGIN_PATH=~/src/GazeboPlugin/export/lib/:${GAZEBO_PLUGIN_PATH}
\ No newline at end of file
<sdf version='1.6'>
<world name='default'>
<light name='sun' type='directional'>
<cast_shadows>1</cast_shadows>
<pose frame=''>0 0 10 0 -0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>
<model name='ground_plane'>
<static>1</static>
<link name='link'>
<collision name='collision'>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<surface>
<friction>
<ode>
<mu>100</mu>
<mu2>50</mu2>
</ode>
<torsional>
<ode/>
</torsional>
</friction>
<contact>
<ode/>
</contact>
<bounce/>
</surface>
<max_contacts>10</max_contacts>
</collision>
<visual name='visual'>
<cast_shadows>0</cast_shadows>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
<self_collide>0</self_collide>
<enable_wind>0</enable_wind>
<kinematic>0</kinematic>
</link>
</model>
<gravity>0 0 -9.8</gravity>
<magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field>
<atmosphere type='adiabatic'/>
<physics name='default_physics' default='0' type='ode'>
<max_step_size>0.001</max_step_size>
<real_time_factor>1</real_time_factor>
<real_time_update_rate>1000</real_time_update_rate>
</physics>
<scene>
<ambient>0.4 0.4 0.4 1</ambient>
<background>0.7 0.7 0.7 1</background>
<shadows>1</shadows>
</scene>
<audio>
<device>default</device>
</audio>
<wind/>
<spherical_coordinates>
<surface_model>EARTH_WGS84</surface_model>
<latitude_deg>0</latitude_deg>
<longitude_deg>0</longitude_deg>
<elevation>0</elevation>
<heading_deg>0</heading_deg>
</spherical_coordinates>
<state world_name='default'>
<sim_time>49 234000000</sim_time>
<real_time>49 322939707</real_time>
<wall_time>1594912600 184850417</wall_time>
<iterations>49234</iterations>
<model name='ground_plane'>
<pose frame=''>0 0 0 0 -0 0</pose>
<scale>1 1 1</scale>
<link name='link'>
<pose frame=''>0 0 0 0 -0 0</pose>
<velocity>0 0 0 0 -0 0</velocity>
<acceleration>0 0 0 0 -0 0</acceleration>
<wrench>0 0 0 0 -0 0</wrench>
</link>
</model>
<light name='sun'>
<pose frame=''>0 0 10 0 -0 0</pose>
</light>
</state>
<gui fullscreen='0'>
<camera name='user_camera'>
<pose frame=''>5 -5 2 0 0.275643 2.35619</pose>
<view_controller>orbit</view_controller>
<projection_type>perspective</projection_type>
</camera>
</gui>
</world>
</sdf>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment