Skip to content

Commit

Permalink
[speak_and_wait_recovery] add demo.launch
Browse files Browse the repository at this point in the history
  • Loading branch information
sktometometo committed Sep 24, 2021
1 parent 0b39697 commit 5f27ddc
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
9 changes: 9 additions & 0 deletions speak_and_wait_recovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,12 @@ Duration for tf looking up transformations. (seconds)
- `~sound_action` (string, default: `sound_play`)

Action name of sound_play used for Text-To-Speech.

### example

Please see demo.launch for example usage.
`navigation_stage` is required for demo.

```bash
roslaunch speak_and_wait_recovery demo.launch
```
83 changes: 83 additions & 0 deletions speak_and_wait_recovery/launch/demo.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<launch>
<param name="/use_sim_time" value="true"/>

<node
pkg="map_server"
type="map_server"
name="map_server"
args="$(find navigation_stage)/stage_config/maps/willow-full-0.05.pgm 0.05"
respawn="false"
/>

<node
pkg="stage_ros"
type="stageros"
name="stageros"
args="$(find navigation_stage)/stage_config/worlds/willow-pr2-5cm.world"
respawn="false"
>
<param name="base_watchdog_timeout" value="0.2"/>
</node>

<node
pkg="sound_play"
type="soundplay_node.py"
name="sound_play"
>
</node>

<node pkg="move_base" type="move_base" respawn="false" name="move_base_node" output="screen">
<param name="footprint_padding" value="0.01" />
<param name="controller_frequency" value="10.0" />
<param name="controller_patience" value="3.0" />
<param name="oscillation_timeout" value="30.0" />
<param name="oscillation_distance" value="0.5" />

<rosparam file="$(find navigation_stage)/move_base_config/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find navigation_stage)/move_base_config/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find navigation_stage)/move_base_config/local_costmap_params.yaml" command="load" />
<rosparam file="$(find navigation_stage)/move_base_config/global_costmap_params.yaml" command="load" />
<rosparam file="$(find navigation_stage)/move_base_config/base_local_planner_params.yaml" command="load" />

<rosparam>
recovery_behavior_enabled: true
recovery_behaviors:
- name: "conservative_reset"
type: "clear_costmap_recovery/ClearCostmapRecovery"
- name: "speak_and_wait0"
type: "speak_and_wait_recovery/SpeakAndWaitRecovery"
- name: "aggressive_reset"
type: "clear_costmap_recovery/ClearCostmapRecovery"
- name: "speak_and_wait1"
type: "speak_and_wait_recovery/SpeakAndWaitRecovery"
- name: "all_reset"
type: "clear_costmap_recovery/ClearCostmapRecovery"
conservative_reset:
reset_distance: 2.0
speak_and_wait0:
speak_text: "Make way, Please"
duration_wait: 5.0
duration_timeout: 1.0
sound_action: /sound_play
aggressive_reset:
reset_distance: 1.0 # 0.5
speak_and_wait1:
speak_text: "Make way, Please"
duration_wait: 5.0
duration_timeout: 1.0
sound_action: /sound_play
all_reset:
reset_distance: 0.0
</rosparam>
</node>

<include file="$(find navigation_stage)/move_base_config/amcl_node.xml"/>

<node
name="rviz"
pkg="rviz"
type="rviz"
args="-d $(find navigation_stage)/single_robot.rviz"
/>

</launch>

0 comments on commit 5f27ddc

Please sign in to comment.