diff --git a/README.md b/README.md index ef3a04f4feea9809ca359ab736b8b019568806c6..3584eb6f734b08b0d53c1fe835ffb4df419961a1 100644 --- a/README.md +++ b/README.md @@ -30,48 +30,32 @@ catkin_make ## Launch -This package file includes a launch file named spawn_sign.launch which is intended to be included from other launch file that requires to spawn traffic signs in a simulated Gazebo world. This launch file has the following parameters: - -* **name**: (default=stop1) name given to the traffic sign used to to name the nodes and topics associated with the sign description. -* **model**: (default=sign) URDF model to use. At the moment only static traffic signs are supported. -* **tag**: (default=alvar0) Name of the Alvar AR tag used to identify the traffic sign. -* **type**: (default=stop) Type of the traffic sign. The currently supported types are: - * giveway - * haveway - * max_100 - * max_50 - * no_entry - * no_overtaking - * one_way - * parking - * pedestrian_crossing - * roadworks - * roundabout - * stop - * unmarked_intersection - * ahead_only - * turn_left - * turn_right -* **x** (default=0.0) x position where the traffic sign will placed in the simulated environment with respect to the parent frame. -* **y** (default=0.0) y position where the traffic sign will placed in the simulated environment with respect to the parent frame. -* **yaw** (default=0.0) orientation of the traffic sign with respect to the parent frame. -* **parent** (default=map) parent reference frame used to place the traffic sign in the simulated environment. - -To spawn a traffic sign from an other launch file, include the following lines: -``` - <include file="$(find iri_sign_description)/launch/spawn_sign.launch"> - <arg name="name" value="$(arg name)"/> - <arg name="model" value="$(arg model)"/> - <arg name="tag" value="$(arg tag)"/> - <arg name="type" value="$(arg type)"/> - <arg name="x" value="$(arg x)"/> - <arg name="y" value="$(arg y)"/> - <arg name="yaw" value="$(arg yaw)"/> - <arg name="parent" value="$(arg parent)"/> - </include> -``` - -A test launch file is provided to visualize the traffic sign in RVIZ. To use it, execute the following command: +This package file includes launch files: + +* spawn_sign.launch to spawn traffic signs in a simulated Gazebo world. This launch file has the following parameters: + * **name**: (default=stop1) name given to the traffic sign used to to name the nodes and topics associated with the sign description. + * **model**: (default=sign) URDF model to use. At the moment only static traffic signs are supported. + * **tag**: (default=alvar0) Name of the Alvar AR tag used to identify the traffic sign. + * **type**: (default=stop) Type of the traffic sign. The currently supported types are: giveway, haveway, max_100, max_50, no_entry, no_overtaking, one_way, parking, pedestrian_crossing, roadworks, roundabout, stop, unmarked_intersection, ahead_only, turn_left, turn_right + * **x** (default=0.0) x position where the traffic sign will placed in the simulated environment with respect to the parent frame. + * **y** (default=0.0) y position where the traffic sign will placed in the simulated environment with respect to the parent frame. + * **yaw** (default=0.0) orientation of the traffic sign with respect to the parent frame. + * **parent** (default=map) parent reference frame used to place the traffic sign in the simulated environment. +* spawn_semaphore.launch to spawn a traffic light in a simulated Gazebo world. This launch file has the following parameters: + * **name**: (default=semaphore) name given to the traffic sign used to to name the nodes and topics associated with the sign description. + * **model**: (default=semaphore) URDF model to use. + * **tag**: (default=alvar0_negative) Name of the Alvar AR tag used to identify the traffic sign. + * **initial_state**: (default=False). Initial state of the light. False=Green, True=Red. + * **x** (default=0.0) x position where the traffic sign will placed in the simulated environment with respect to the parent frame. + * **y** (default=0.0) y position where the traffic sign will placed in the simulated environment with respect to the parent frame. + * **yaw** (default=0.0) orientation of the traffic sign with respect to the parent frame. + * **parent** (default=map) parent reference frame used to place the traffic sign in the simulated environment. + * To change the semaphore light, publish on the /<name>_set_material_plugin/set_material topic. + * empty string will make the light to switch between green and red + * other features are under development. +* spawn_localization_sign.launch. Under development. + +A test launch file is provided. To use it, execute the following command: ``` roslaunch iri_sign_description spawn_test.launch diff --git a/launch/spawn_semaphore.launch b/launch/spawn_semaphore.launch index 1d78d899f30b8b7b99b6d3a531e0245ff7d20241..6a81898012e99e3a126c3a66a3891dfd24d7bb09 100644 --- a/launch/spawn_semaphore.launch +++ b/launch/spawn_semaphore.launch @@ -3,7 +3,7 @@ <arg name="name" default="semaphore"/> <arg name="model" default="semaphore"/> <arg name="tag" default="alvar0_negative"/> - <arg name="initial_state" default="0"/> + <arg name="initial_state" default="False"/> <arg name="x" default="0.5"/> <arg name="y" default="-0.5"/> <arg name="yaw" default="3.14159"/> diff --git a/launch/spawn_test.launch b/launch/spawn_test.launch index 39dd90bcb12f15b5ff77cf388622cddcdecd865e..52b6f54b37a4b99a8cb8d81cbed41c28b01671fa 100644 --- a/launch/spawn_test.launch +++ b/launch/spawn_test.launch @@ -1,7 +1,18 @@ <?xml version="1.0"?> <launch> + <arg name="gazebo" default="true"/> <arg name="parent" default="map"/> + + <arg name="world_name" default="worlds/empty.world"/> + <arg name="gui" default="true"/> + + <group if="$(arg gazebo)"> + <include file="$(find gazebo_ros)/launch/empty_world.launch"> + <arg name="world_name" value="$(arg world_name)"/> + <arg name="gui" value="$(arg gui)"/> + </include> + </group> <include file="$(find iri_sign_description)/launch/spawn_semaphore.launch"> <arg name="name" value="semaphore1"/>