Thanks for fast replys Nate and Sylvain,
Before I was trying to "steal" the code from the terrain model (and thats
how i was getting the output from my first email, ie. northing, easting,
etc)
However I guess ODELoad function was part of Terrain model in some older
versions of gazebo since it is not in gazebo 0.6 or 0.7 or in CVS version.
(or at least I could not find them?? there is Load, Write, etc.. )
Anyway, I finally understood what vertices meant so I think now I have a
part of the code that would print out all the X,Y and Z coordinates/
for (i = 0; i < (int)(this->dataSizeModX*this->dataSizeModY*12); i = i +
12) {
printf("X: %0.3f,\t Y: %0.3f,\t Z:%0.3f\n", this->vertices[i+9],
this->vertices[i+10], this->vertices[i+11]);
}
So this should be correct right?
I have put this part of code into the Terrain::Write function and it seams I
got it right :)) YEAHHH :)
so thanks for your help!
But just to make sure these values for x,y and z are in meters right? and
these are original values? before normalization, or setting the error rate??
Thanks again for your help (both Nate and Sylvain)
Rasko
On 3/1/07, Nate Koenig <[EMAIL PROTECTED]> wrote:
Hello,
If you want to use the XYZ data of a terrain map, then I would suggest
stealing the code from the Terrain Model. The ODELoad function
contains all the necessary code to read the data from the gzbuilder
file, and it is commented - mostly.
The vertices are the XYZ locations in world coordinates (minus the
offsets). The indices are used for opengl rendering efficency, and the
ODE indices are used to generate collision planes.
Hope that helps.
-nate
On 2/28/07, Sylvain Joyeux <[EMAIL PROTECTED]> wrote:
> > I am using gzbuilder and DEMs (got them from internet) to create an
outdoor
> > map. Everything works fine, now I need to be able to pre-load this map
into
> > the robot so i need a clear ascii file that will hold (x,y,z)
coordinates
> > for each point on the map.
> To get this kind of information, try ou GDAL (http://www.gdal.org). This
is
> what gzbuilder uses internally.
>
> > My question is what these Vertex, Index and ODE Index counts
represent?? (I
> > read some documentation but I still fully dont understand it) And how
(if
> > possible) from them I can construct (X,Y,Z) coordinates for each point
on
> > the map?
> OpenGL and ODE use trimeshes (meshes based on set of triangles). To
reduce the
> memory taken by the structure, you can specify them as a set of vertices
and
> a set of indexes. Then, in the index set, each consecutive 3-index tuple
is
> the index of each corner of one triangle.
>
> > Also, I am using SDTS format of DEM so if anyone knows any other way
of
> > converting this format to something that would be easy to represent as
> > (X,Y,Z) please let me know.
> There are ASCII-based DEM formats (sorry, don't know them), so you can
even
> try gdal_translate to convert your SDTS dem into a readable format.
>
> Note that gzbuilder modifies the DEM to fit gazebo's needs. So, it may
not be
> a good idea to base yourself on it to do what you're doing.
> --
> Sylvain Joyeux http://www.laas.fr/~sjoyeux
>
> ==========================================================
> PhD student, Robotics and Interactions group, LAAS/CNRS
> 7 Av. du Colonel Roche
> 31077 Toulouse Cedex 4
> Tel: +33 (0)5 61 33 64 51
> ==========================================================
>
>
>
-------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys-and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Playerstage-gazebo mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
--
Rasko Pjesivac
[EMAIL PROTECTED]
http://www.yumetal.net
UTK
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo