City scalling

Issue #19 resolved
Agustin Alba Chicar created an issue

Create a ratio based on the city are that is supposed to cover and scale up or down dimensions to correctly visualize the city.

Comments (22)

  1. Andrés Fortier

    Agree, we shouldn't be scaling the city to match visualization needs, but instead make sure that (lat,lon) coordinates match the Gazebo units (i.e. if we create a 100 mt length square it should roughly match a 0.001 deg lenght street). If we are sure sizes are correct, I wouldn't spend too much time on this as we have other visualization means to see the entire road network.

  2. Agustin Alba Chicar reporter

    @JChoclin, @andres_fortier, @ernestmc Now we have a sort of rigth scaling and traslation. I'll explain the pipeline just in a few lines:

    1. Get the lat, long and elev from each waypoint
    2. Convert them to GLOBAL (ENU) coordinate system. ECEF results in the same. API reference
    3. Get the minimum and maximum x,y, and z coordiante
    4. Get the mean value between those maximum and minimum
    5. Move all the control points and waypoints to the origin in Gazebo by subtracting a vector that has as components the mean values.

    By doing this, real distances are kept but we have all the points in a tangent plane (to the Earth surface) moved to the (0,0,0). I case we make zero any of the coordinates, a projection will be done and error against real distances heavily depends on the position of the plane in the earth surface.

    Through this work, we found that Manifold library reads the RNDF as radians, instead of degrees so to continue working I have made some RNDF files with radians to continue working. Also, a new file has been added that has the coordinates of the Ekumen's block, here in BA. Results are shown below.

    road.rndf

    AustinStreet.png

    Ekumen's block

    EkuBlock.png

    No camera movement is perfomed by now.

  3. Andrés Fortier

    @agalbachicar I'm a bit at a loss with the z-values. Where are those coming from? aren't all the points just (lat,lon)?

  4. Agustin Alba Chicar reporter

    @andres_fortier the pictures above show just a transformation from SPHERICAL to GLOBAL (relative to the North pole) and then a relocation of the center of the plane to the origin of coordinate system in Gazebo. z coordiantes have a value different from zero because the plane is rotated by this transformation. With @JChoclin have just found that a new conversion must be done by getting the lat and long of the center and then generating a new transformation from SPHERICAL to GLOBAL, now, relative to the center of the plane.

  5. Agustin Alba Chicar reporter

    Some results of the above update @JChoclin , @andres_fortier , @ernestmc :

    roadA:

    AustinRoad.png

    Ekumen's block:

    EkuBlock.png

  6. Log in to comment