1. Gazebo
Simulation with Gazebo
1.1 Import models from the model library and simulation via .word file
EG:
<?xml version="1.0"?>
<sdf version="1.4">
<world name="default">
<!-- Ground Plane -->
<include>
<uri>model://ground_plane</uri>
</include>
<include>
<uri>model://sun</uri>
</include>
<model name="box">
<pose>0 0 0.5 0 0 0</pose>
<link name="link">
<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>
<plugin name="model_push" filename="libmodel_push.so"/>
</model>
</world>
</sdf>
add models path and start simulation (PATH–ubuntu–ROS–building_robot)
******Creat "build"
cmake ../
make
******Back to main menu
export GAZEBO_MODEL_PATH=/home/juniper/Documents/ROS/building_robot/models:$GAZEBO_MODEL_PAT
export GAZEBO_PLUGIN_PATH=/home/juniper/Documents/ROS/building_robot/build:$GAZEBO_PLUGIN_PATH
sudo cp build/libbuilding_robot.so /usr/lib/x86_64-linux-gnu/gazebo-9/plugins/libbuilding_robot.so
gazebo --verbose building_robot.world
public building simulation
<?xml version="1.0"?>
<sdf version="1.4">
<world name="building_robot_world">
<!-- Ground Plane -->
<include>
<uri>model://ground_plane</uri>
</include>
<include>
<uri>model://sun</uri>
</include>
<model name='robot'>
<pose>15.7 0 8.672 0 0 0</pose>
<include>
<uri>model://robotcarryer2</uri>
</include>
</model>
<model name="public">
<pose>-20 -100 80 0 0 -1.24</pose>
<static>true</static>
<link name="link">
<visual name="visual">
<geometry>
<mesh><uri>model://pub.stl</uri></mesh>
</geometry>
</visual>
<collision name="collision">
<geometry>
<mesh><uri>model://pub.stl</uri></mesh>
</geometry>
</collision>
</link>
</model>
</world>
</sdf>
<plugin name="push_animate" filename="libanimated_box.so"/>
polyu
<?xml version="1.0"?>
<sdf version="1.4">
<world name="building_robot_world">
<!-- Ground Plane -->
<include>
<uri>model://ground_plane</uri>
</include>
<include>
<uri>model://sun</uri>
</include>
<model name='robot'>
<pose>32 -2 23 0 0 0</pose>
<include>
<uri>model://robotcarryer3</uri>
</include>
</model>
<model name="public">
<pose>0 0 6 0 0 1.76</pose>
<static>true</static>
<link name="link">
<visual name="visual">
<geometry>
<mesh><uri>model://polyuinverse.dae</uri></mesh>
</geometry>
</visual>
<collision name="collision">
<geometry>
<mesh><uri>model://polyuinverse.dae</uri></mesh>
</geometry>
</collision>
</link>
</model>
</world>
</sdf>