City scalling
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)
-
reporter -
reporter I'll try to solve this issue with camera messages and try to modify it so you can scale the image to fit horizontal FOV.
-
reporter - changed title to City scalling
-
assigned issue to
-
reporter - changed status to open
-
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.
-
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:
- Get the lat, long and elev from each waypoint
- Convert them to GLOBAL (ENU) coordinate system. ECEF results in the same. API reference
- Get the minimum and maximum x,y, and z coordiante
- Get the mean value between those maximum and minimum
- 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
Ekumen's block
No camera movement is perfomed by now.
-
@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)?
-
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.
-
reporter Some results of the above update @JChoclin , @andres_fortier , @ernestmc :
roadA:
Ekumen's block:
-
Looks better now :)
-
Added camera controller and some test functionality. refs
#19→ <<cset e4a780562b8e>>
-
Added an example for calibration of the conversion. refs
#19→ <<cset daa6e65124b1>>
-
Created utility class to make all the coordinates and projections work. refs
#19→ <<cset a561f16fb126>>
-
Added documentation and some minor modifications to the height of the camera. refs
#19→ <<cset d98ec13ed870>>
-
Added some improvements to refactor mins and maxs. refs
#19→ <<cset f0b81e06d8a0>>
-
Changed the API to receive vectors instead of scalars. refs
#19→ <<cset c684fa76f00d>>
-
Modified nested fors to a function and send function pointers to it. refs
#19→ <<cset a5910de7cd7d>>
-
Added docs. refs
#19→ <<cset 145ef4ed3a88>>
-
Removed useless enters. refs
#19→ <<cset 3e5825e85ddb>>
-
Rebasing and correcting branch. refs
#19→ <<cset f52f928434a1>>
-
reporter - changed status to closed
-
reporter - changed status to resolved
- Log in to comment
Research on the user camera should be easier instead of using a scale factor.