README.md 4.73 KB
Newer Older
1
# iri_sign_description
Fernando Herrero's avatar
Fernando Herrero committed
2
3
4

This package contains the urdf and launch files to load road sign images, which can be used in simulation.

Sergi Hernandez's avatar
Sergi Hernandez committed
5
6
The [opendrive_to_gazebo]() tool can be used to generate compatible launch files from an Opendrive road description file.

Fernando Herrero's avatar
Fernando Herrero committed
7
8
## Installation

Sergi Hernandez's avatar
Sergi Hernandez committed
9
10
11
12
13
14
15
Move to workspace:
```
roscd && cd ../src
```

Clone the repository: 
```
Sergi Hernandez's avatar
Sergi Hernandez committed
16
git clone https://gitlab.iri.upc.edu/mobile_robotics/adc/adc_2021/iri_sign_description.git
Sergi Hernandez's avatar
Sergi Hernandez committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
```

Install all ROS dependencies with the following commands:
```
roscd
cd ..
rosdep install -i -r --from-paths src
```

Compile all the ROS packages with the following commands:
```
catkin_make
```

## Launch

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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.
54
55
    * An empty string will make the light to switch between green and red
    * Setting a [gazebo material](http://wiki.ros.org/simulator_gazebo/Tutorials/ListOfMaterials) (Gazebo/Red, Gazebo/Green, Gazebo/Orange, ...) will change the material accordingly.
56
57
58
* spawn_localization_sign.launch. Under development.

A test launch file is provided. To use it, execute the following command:
Sergi Hernandez's avatar
Sergi Hernandez committed
59
60

```
61
roslaunch iri_sign_description spawn_test.launch
62
63
64

rostopic pub -1 /semaphore1_set_material_plugin/set_material std_msgs/String "data: ''"
rostopic pub -1 /semaphore2_set_material_plugin/set_material std_msgs/String "data: 'Gazebo/Orange'"
Sergi Hernandez's avatar
Sergi Hernandez committed
65
66
67
68
69
70
71
72
```

## Disclaimer

Copyright (C) Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
Mantainer IRI labrobotics (labrobotica@iri.upc.edu)

This package is distributed in the hope that it will be useful, but without any warranty. It is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. should the program prove defective, the GMR group does not assume the cost of any necessary servicing, repair  or correction.
Fernando Herrero's avatar
Fernando Herrero committed
73

Sergi Hernandez's avatar
Sergi Hernandez committed
74
In no event unless required by applicable law the author will be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if the author has been advised of the possibility of such damages.
Fernando Herrero's avatar
Fernando Herrero committed
75

Sergi Hernandez's avatar
Sergi Hernandez committed
76
You should have received a copy of the GNU Lesser General Public License
77
along with this program.  If not, see <http://www.gnu.org/licenses/>