Page 3 of 10

Re: program to view xml file in 3D

PostPosted: Fri May 08, 2015 8:59 am
by fred_fr
I thank for your remarks and test. I thinks you have an error in your xml file. The description of cube after M4 have a wrong parametter +.0.005 in place of +0.005 .

If an error occur the program stop. In the next version we can check if value is number or string.


Fred

Re: program to view xml file in 3D

PostPosted: Fri May 08, 2015 12:39 pm
by aBUGSworstnightmare
fred_fr wrote:I thank for your remarks and test. I thinks you have an error in your xml file. The description of cube after M4 have a wrong parametter +.0.005 in place of +0.005 .
If an error occur the program stop. In the next version we can check if value is number or string.
Fred


Sorry Fred, missed that . two times now :oops: --> finally corrected!

Man, I love your tool! 8-) :shock: ;) :D
Thanks to it I could locate another error (wrong z-dimenzin on the M4CAN board). So I really can say now that such a tool was badly needed!
Here is the final result:
output.PNG
Terminal output - error (+.0.005 instead of +0.005) fixed!
output.PNG (79.7 KiB) Viewed 4625 times

result.PNG
The craft in 3D
result.PNG (9.41 KiB) Viewed 4625 times

One comment: don't use BLACK for object rendering! It's barely visible against a black background :oops:

Re: program to view xml file in 3D

PostPosted: Fri May 08, 2015 3:53 pm
by Max
Fred, again, very nice work! Seems like it will come in quite handy.

Maybe once/if you're ready we could bundle a version of this with QGC? We might be able to embed a VRML viewer in QGC fairly easily. If nothing else it could be displayed inside a Web browser widget, or in an external viewer. If there's a lightweight runtime version of Tcl we could bundle (for Windows) that would be even better.

Are you planning on adding ability to handle custom frame types (where number of motors their position is specified in the XML file)?

Cheers,
-Max

Re: program to view xml file in 3D

PostPosted: Fri May 08, 2015 4:00 pm
by Kisssys
Fred

This gives great comfort to those creating a Quatos XML file that it truly represents their craft. Great addition
for those using Quatos.

Re: program to view xml file in 3D

PostPosted: Fri May 08, 2015 4:57 pm
by fred_fr
Max wrote:Fred, again, very nice work! Seems like it will come in quite handy.

Maybe once/if you're ready we could bundle a version of this with QGC? We might be able to embed a VRML viewer in QGC fairly easily. If nothing else it could be displayed inside a Web browser widget, or in an external viewer. If there's a lightweight runtime version of Tcl we could bundle (for Windows) that would be even better.

Are you planning on adding ability to handle custom frame types (where number of motors their position is specified in the XML file)?

Cheers,
-Max


hi


Yes we plan to handle custom frame type and after I rewrite program in C for smaller executable.

Fred

Re: program to view xml file in 3D

PostPosted: Fri May 08, 2015 9:08 pm
by chschmid
Hi Fred
This a super tool. I installed it and checked some xml.
I think that the display has the Z axis upside down.

In quatos, Z positive is "down" and negative is "up".

ClipQuad.JPG


Code: Select all
<quatos_configuration>
   <craft id="ClipQuad" config="quad_x">
      <ports>
         <port rotation="+1">1</port>  //A
         <port rotation="-1">2</port>  //B
         <port rotation="+1">3</port>  //C
         <port rotation="-1">4</port>  //D
      </ports>
      <distance>
         <motor>0.380</motor>
         <!-- <esc>0.505</esc>    -->
      </distance>
      <mass>
         <motor>210</motor>
         <esc>0</esc>
         <arm>30</arm>
         <cube name="CenterBody" dimx="0.230" dimy="0.230" dimz="0.032"   offsetx="0" offsety="0" offsetz= "0.0515" >542</cube>
         <cube name="GPSShield"  dimx="0.080" dimy="0.080" dimz="0.009"   offsetx="0" offsety="0" offsetz="-0.0095" >18</cube>
         <cube name="GPSAntenna" dimx="0.035" dimy="0.035" dimz="0.003"   offsetx="0" offsety="0" offsetz="-0.0014" >20</cube>
         <cube name="FCAQ6"      dimx="0.050" dimy="0.050" dimz="0.010"   offsetx="0" offsety="0" offsetz= "0.0045" >36</cube>

                        <cube name="BatHousing" dimx="0.172" dimy="0.070" dimz="0.0815"  offsetx="0" offsety="0" offsetz="0.1045" >70</cube>
         <cube name="Battery1"   dimx="0.165" dimy="0.054" dimz="0.060"   offsetx="0" offsety="0" offsetz="0.0950">958</cube>
         <cube name="Legs"       dimx="0.210" dimy="0.210" dimz="0.200"   offsetx="0" offsety="0" offsetz="0.145" >24</cube>

         <!--   Gimbal fix part
                                Gimbal 1 dynamic Part   
                        <cube name="Gimbal"    dimx="0.000" dimy="0.000" dimz="0.000" offsetx="0.00" offsety="0" offsetz="0.1950">400</cube>
                        <cube name="Gimbal1"   dimx="0.000" dimy="0.000" dimz="0.000" offsetx="0.00" offsety="0" offsetz="0.2050">735</cube>     -->

      </mass>
   </craft>
</quatos_configuration>


Freds Tool.JPG


If you could remove black color as an object color, we could see all objects with blk background. :D

Cheers
Christof

Re: program to view xml file in 3D

PostPosted: Sat May 09, 2015 4:48 pm
by fred_fr
hi

New version of my tools with :

- custom frame
- revert view to see correct Z axis
- remove black color for element

http://autoquad6.free.fr/convert.tcl

fred

Re: program to view xml file in 3D

PostPosted: Sun May 10, 2015 5:12 am
by chschmid
Hi Fred

Now you have it right. Super. Thanks.

Cheers
Christof

Re: program to view xml file in 3D

PostPosted: Mon May 11, 2015 6:27 pm
by plexus
Hi Fred,
that run very well.
Merci

Alain

Re: program to view xml file in 3D

PostPosted: Tue May 12, 2015 6:16 am
by aBUGSworstnightmare
Hi Fred,

when I try to use a custom craft (3r1.xml) I get the error message shown below:
error.PNG
error.PNG (40.2 KiB) Viewed 4535 times

Any idea what's wrong here?
3r1.xml
(6.87 KiB) Downloaded 146 times

Best regards
Joerg