Skip to content

Commit

Permalink
Add "collision" as new arg, means whether to add collision into simul…
Browse files Browse the repository at this point in the history
…ation for obstacle-avoidance test.
  • Loading branch information
KahnShi authored and tongtybj committed Apr 28, 2017
1 parent 06770a9 commit 3ca822e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ $ rosservice call /task_start true

## how to activate plannar

- arg plannar means whether to add motion planning, arg collision means whether to add obstacle which will cause collision into simulation.
- When adding obstacles, remember not to block the view from drone to red tree:
```
$ roslaunch jsk_uav_forest_simulation forest_simulation.launch plannar:=true
$ roslaunch jsk_uav_forest_simulation forest_simulation.launch plannar:=true collision:=true
```


Expand Down
9 changes: 5 additions & 4 deletions jsk_uav_forest_simulation/launch/forest_simulation.launch
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
<arg name="rqt_gui" default="True" />
<arg name="circle_motion_times" default="1" />
<arg name="plannar" default="false" />
<arg name="collision" default="false" />

<arg name="start_x" value="-8"/>
<arg name="start_y" value="0" unless="$(arg plannar)"/>
<arg name="start_y" value="-1" if="$(arg plannar)"/>
<arg name="start_y" value="0" unless="$(arg collision)"/>
<arg name="start_y" value="-1" if="$(arg collision)"/>
<arg name="start_z" value="0.5"/>

<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find jsk_uav_forest_simulation)/gazebo_model/world/forest.world" unless="$(arg plannar)" />
<arg name="world_name" value="$(find jsk_uav_forest_simulation)/gazebo_model/world/forest_collision.world" if="$(arg plannar)" />
<arg name="world_name" value="$(find jsk_uav_forest_simulation)/gazebo_model/world/forest.world" unless="$(arg collision)" />
<arg name="world_name" value="$(find jsk_uav_forest_simulation)/gazebo_model/world/forest_collision.world" if="$(arg collision)" />
<arg name="debug" value="$(arg debug)"/>
<arg name="gui" value="$(arg gui)" />
<arg name="headless" default="$(arg headless)"/>
Expand Down

0 comments on commit 3ca822e

Please sign in to comment.