program to view xml file in 3D

The new control algorithm for AutoQuad flight controllers.

Re: program to view xml file in 3D

Postby fred_fr » Fri May 08, 2015 8:59 am

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
fred
fred_fr
 
Posts: 75
Joined: Tue Aug 28, 2012 10:13 am
Location: france, Caluire et Cuire

Re: program to view xml file in 3D

Postby aBUGSworstnightmare » Fri May 08, 2015 12:39 pm

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 3089 times

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

One comment: don't use BLACK for object rendering! It's barely visible against a black background :oops:
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

Re: program to view xml file in 3D

Postby Max » Fri May 08, 2015 3:53 pm

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
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: program to view xml file in 3D

Postby Kisssys » Fri May 08, 2015 4:00 pm

Fred

This gives great comfort to those creating a Quatos XML file that it truly represents their craft. Great addition
for those using Quatos.
Steve
Kisssys
Kisssys
 
Posts: 1340
Joined: Sat Jun 23, 2012 9:23 pm

Re: program to view xml file in 3D

Postby fred_fr » Fri May 08, 2015 4:57 pm

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
fred
fred_fr
 
Posts: 75
Joined: Tue Aug 28, 2012 10:13 am
Location: france, Caluire et Cuire

Re: program to view xml file in 3D

Postby chschmid » Fri May 08, 2015 9:08 pm

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
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: program to view xml file in 3D

Postby fred_fr » Sat May 09, 2015 4:48 pm

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
fred
fred_fr
 
Posts: 75
Joined: Tue Aug 28, 2012 10:13 am
Location: france, Caluire et Cuire

Re: program to view xml file in 3D

Postby chschmid » Sun May 10, 2015 5:12 am

Hi Fred

Now you have it right. Super. Thanks.

Cheers
Christof
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: program to view xml file in 3D

Postby plexus » Mon May 11, 2015 6:27 pm

Hi Fred,
that run very well.
Merci

Alain
plexus
 
Posts: 534
Joined: Tue Jul 03, 2012 3:30 pm
Location: South of France

Re: program to view xml file in 3D

Postby aBUGSworstnightmare » Tue May 12, 2015 6:16 am

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 2999 times

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

Best regards
Joerg
aBUGSworstnightmare
 
Posts: 1460
Joined: Fri Jun 22, 2012 5:24 pm

PreviousNext

Return to Quatos Adaptive Control

Who is online

Users browsing this forum: No registered users and 2 guests

cron