Skip to content
Snippets Groups Projects
Commit 5a701c07 authored by Davis, Duane T's avatar Davis, Duane T
Browse files

Simplified addition of additional robots & mines

Also changed all of the names from "mine" to "ied"
parent 268c189a
No related branches found
No related tags found
No related merge requests found
cmake_minimum_required(VERSION 2.8.3)
project(minesearch_project)
project(ied_search_project)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
......@@ -159,7 +159,7 @@ include_directories(
## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
install(PROGRAMS
src/minesearch_project/project_robot.py
src/ied_search_project/project_robot.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
......
<?xml version="1.0"?>
<launch>
<!-- IED location parameters -->
<arg name="x1" default="36"/>
<arg name="y1" default="39"/>
<arg name="x2" default="66"/>
<arg name="y2" default="26"/>
<arg name="loadMine3" default="1"/>
<arg name="x3" default="75"/>
<arg name="y3" default="7"/>
<arg name="loadMine4" default="1"/>
<arg name="x4" default="31"/>
<arg name="y4" default="10"/>
<arg name="loadMine5" default="1"/>
<arg name="x5" default="2"/>
<arg name="y5" default="40"/>
<!-- Add namespace args for additional robots -->
<!-- Add more x & y parameters for additional IEDs -->
<!-- <arg name="x6" default="71"/>
<arg name="y6" default="48"/> -->
<arg name="namespace1" default="robot1" />
<!-- Add namespace args for additional robots -->
<!-- <arg name="namespace2" default="robot2" /> -->
<include file="$(find minesearch_project)/launch/loadMine.xml" />
<!-- Copy this include with a different namespace arg for additional robots -->
<include file="$(find ied_search_project)/launch/loadIED.xml" />
<include file="$(find pioneer_launch)/launch/upload_pioneer3at.launch">
<arg name="namespace" value="$(arg namespace1)"/>
</include>
<!-- <include file="$(find cs4313_worlds)/launch/hokuyoGmapper.launch" /> -->
<!-- Add additional includes with different namespace args for additional robots -->
<!-- <include file="$(find pioneer_launch)/launch/upload_pioneer3at.launch">
<arg name="namespace" value="$(arg namespace2)"/>
</include> -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="use_sim_time" value="true"/>
<arg name="debug" value="false"/>
<arg name="world_name" value="$(find minesearch_project)/worlds/minefield.world"/>
<arg name="world_name" value="$(find ied_search_project)/worlds/ied_field.world"/>
</include>
<!-- Load mine-like objects into the scene based on argument values -->
<node name="spawn_mine1" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x1) -y $(arg y1) -urdf -param mine1 -model mine1"
<!-- Load IED-like objects into the scene based on argument values -->
<node name="spawn_ied1" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x1) -y $(arg y1) -urdf -param ied -model ied1"
respawn="false" output="screen" />
<node name="spawn_ied2" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x2) -y $(arg y2) -urdf -param ied -model ied2"
respawn="false" output="screen" />
<node name="spawn_mine2" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x2) -y $(arg y2) -urdf -param mine2 -model mine2"
<node name="spawn_ied3" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x3) -y $(arg y3) -urdf -param ied -model ied3"
respawn="false" output="screen" />
<group if="$(arg loadMine3)">
<node name="spawn_mine3" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x3) -y $(arg y3) -urdf -param mine2 -model mine3"
respawn="false" output="screen" />
</group>
<group if="$(arg loadMine4)">
<node name="spawn_mine4" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x4) -y $(arg y4) -urdf -param mine2 -model mine4"
respawn="false" output="screen" />
</group>
<group if="$(arg loadMine5)">
<node name="spawn_mine5" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x5) -y $(arg y5) -urdf -param mine2 -model mine5"
respawn="false" output="screen" />
</group>
<node name="spawn_ied4" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x4) -y $(arg y4) -urdf -param ied -model ied4"
respawn="false" output="screen" />
<node name="spawn_ied5" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x5) -y $(arg y5) -urdf -param ied -model ied5"
respawn="false" output="screen" />
<!-- Add more spawn_model nodes for additional IEDs -->
<!-- <node name="spawn_ied6" pkg="gazebo_ros" type="spawn_model"
args="-x $(arg x6) -y $(arg y6) -urdf -param ied -model ied6"
respawn="false" output="screen" /> -->
<!-- Launch the circle-finder node to detect and publish circular objects -->
<!-- Copy this node with different name & namespace for additional robots -->
<node name="robot1CircleFinder" pkg="minesearch_project" type="circleFinder.py"
<node name="robot1CircleFinder" pkg="ied_search_project" type="circleFinder.py"
args="-n $(arg namespace1)" />
<!-- Launch additional nodes with different name & namespaces for additional robots -->
<!-- <node name="robot2CircleFinder" pkg="ied_search_project" type="circleFinder.py"
args="-n $(arg namespace2)" /> -->
<!-- Push robot_description to factory and spawn robot in gazebo -->
<!-- Copy this node with a different name, namespace, & xyzY values for additional robots -->
<node name="spawn_pioneer1" pkg="gazebo_ros" type="spawn_model"
args="-x 0.0 -y 0.0 -z 0.0 -Y 0.0 -urdf -param $(arg namespace1)/p3at -model $(arg namespace1)/p3at"
respawn="false" output="screen">
<remap from="robot_description" to="$(arg namespace1)/p3at"/>
</node>
<!-- Launch additional nodes with different names, namespaces, & xyzY values for additional robots -->
<!-- <node name="spawn_pioneer2" pkg="gazebo_ros" type="spawn_model"
args="-x 80.0 -y 50.0 -z 0.0 -Y 3.14 -urdf -param $(arg namespace2)/p3at -model $(arg namespace2)/p3at"
respawn="false" output="screen">
<remap from="robot_description" to="$(arg namespace2)/p3at"/>
</node> -->
</launch>
<launch>
<!-- send the IED model to parameter server -->
<param name="ied" command="$(find xacro)/xacro $(find ied_search_project)/models/ied.xacro" />
</launch>
<?xml version="1.0"?>
<robot name="mine" xmlns:xacro="http://www.ros.org/wiki/xacro">
<robot name="ied" xmlns:xacro="http://www.ros.org/wiki/xacro">
<gazebo reference="mineLink">
<gazebo reference="iedLink">
<material>Gazebo/Blue</material>
</gazebo>
......@@ -10,10 +10,10 @@
<joint name="fixed" type="floating">
<parent link="world"/>
<child link="mineLink"/>
<child link="iedLink"/>
</joint>
<link name="mineLink">
<link name="iedLink">
<collision>
<origin xyz="0 0 0.3" rpy="0 0 0"/>
<geometry>
......
<?xml version="1.0"?>
<package format="2">
<name>minesearch_project</name>
<name>ied_search_project</name>
<version>0.0.0</version>
<description>The cs4313 minesearch_project package</description>
<description>The cs4313 ied_search_project package</description>
<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
......
......@@ -2,7 +2,7 @@ from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
setup_args = generate_distutils_setup(
packages=['minesearch_project'],
packages=['ied_search_project'],
package_dir={'' : 'src'}
)
......
......@@ -1449,7 +1449,7 @@
<pose>22 22 2 0 0 0</pose>
</model> -->
<state world_name='mine_world'>
<state world_name='ied_world'>
<sim_time>0 0</sim_time>
<real_time>0 44986</real_time>
<wall_time>1377677575 940727583</wall_time>
......
<launch>
<!-- send table.xml to param server -->
<param name="mine1" command="$(find xacro)/xacro $(find minesearch_project)/models/mine.xacro" />
<param name="mine2" command="$(find xacro)/xacro $(find minesearch_project)/models/mine.xacro" />
<param name="mine3" command="$(find xacro)/xacro $(find minesearch_project)/models/mine.xacro" />
<param name="mine4" command="$(find xacro)/xacro $(find minesearch_project)/models/mine.xacro" />
<param name="mine5" command="$(find xacro)/xacro $(find minesearch_project)/models/mine.xacro" />
</launch>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment