diff --git a/README.md b/README.md index 52ed89c96d06211c81e676890b84290b3531fc5e..cd708f646799a4d44af51b28fac3ad050951a3e2 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,12 @@ An example road image can be download from [here](https://drive.google.com/file/ To generate new road images, follow the next steps: * Create a new road or edit an existing one using the [OpenRoadEd](https://gitlab.iri.upc.edu/mobile_robotics/adc/openroaded) tool. See the documentation on this link for more information. -* Create an image of the desired road using the take screenshot tool of the OpenRoadEd application. -* The screenshot is created as a 7000x7000 pixel image with a default resolution of 72 ppi (pixel per inch). Because of this fact, no matter what is the actual size of the real road, the screenshot equivalent size will be different. To *resize* the original image it is necessary to modify its ppi. To do so, compute the new ppi with the following equation, where *39.27* is the conversion from meters to inches: +* Create an image of the desired road using the take screenshot tool of the OpenRoadEd application. Together with the image, a YAML file is generated with the followng information: + * **offset in x**: (in meters) position of the origin of the road with respect of the center of the image in the x direction. + * **offset in y**: (in meters) position of the origin of the road with respect of the center of the image in the y direction. + * **rotation**: (in radians) rotation of the road with respect of the center of the image (at the moment this value is always 0). + * **real size:** (in meters) actual size of the road image. +* The screenshot is created as a 7000x7000 pixel image with a default resolution of 72 ppi (pixel per inch). Because of this fact, no matter what is the actual size of the real road, the screenshot equivalent size will be different. To *resize* the original image it is necessary to modify its ppi. To do so, compute the new ppi with the following equation, where *39.27* is the conversion from meters to inches, and the *real_size* can be taken from the YAML file: <img align="center" src="docs/images/ppi_conv.gif" alt="Equation to compute the required ppi of the image" width="201" height="42"> @@ -56,11 +60,11 @@ convert <original_image> -density <new_ppi_value> -units PixelsPerInch <modified This package file includes a launch file named spawn_road.launch which is intended to be included from other launch file that requires to spawn a road in a simulated Gazebo world. This launch file has the following parameters: * **road_name**: (default=road) name of the road image to be used (without the .png extension). This name will also be used to name the nodes and topics associated with the road description. -* **road_size**: (default=15.0) size of the road in meters. At the moment only square road images are supported. +* **road_size**: (default=15.0) size of the road in meters. At the moment only square road images are supported. This value can be taken from the YAML file. * **road_path**: (default=$(env HOME)/Downloads) path where the road image is located. It must be and absolute path. -* **x** (default=0.0) x position where the road will placed in the simulated environment with respect to the parent frame. -* **y** (default=0.0) y position where the road will placed in the simulated environment with respect to the parent frame. -* **yaw** (default=0.0) orientation of the road with respect to the parent frame. +* **x** (default=0.0) x position where the road will placed in the simulated environment with respect to the parent frame. This value can be taken from the YAML file. +* **y** (default=0.0) y position where the road will placed in the simulated environment with respect to the parent frame. This value can be taken from the YAML file. +* **yaw** (default=0.0) orientation of the road with respect to the parent frame. This value should normally be 1.5707 radians. * **parent** (default=map) parent reference frame used to place the road in the simulated environment. To spawn a road from an other launch file, include the following lines: