Importing KREX rover into ANVEL 2.0



  • I am trying to import the KREX rover from ANVEL 1.0 to ANVEL 2.0. However, I have this weird view and I can't control the vehicle. It seems the coordinates of the chassis have changed in ANVEL 2.0. Do you know how we could fix this issue? Thanks!!


  • administrators

    According to our developers, there were problems with the orientation calculations in ANVEL 1.0 that led to some models with incorrect quaternions. It appears that KREX is one of those vehicles.

    Here's what it looks like before fixing the rotation of the chassis mesh:
    0_1496430913267_KREX_before.png

    Using info on the Vehicle Definition wiki page, we can see that there's a rotation of <orientation w="0.707" x="0.0" y="0.0" z="0.707"/> being applied to the geometry:

    <body dragCoefficient="0.5" name="body" physics="on" surfaceArea="0.43">
    	<representations>
    		<ogre3d mesh="__krex2_center.obj.mesh" shadows="true" zUp="false">
    			<scale x="0.0254" y="0.0254" z="0.0254"/>
    			<orientation w="0.707" x="0.0" y="0.0" z="0.707"/>
    			<position x="0.02" y="0.0" z="0.00"/>
    		</ogre3d>
    	</representations>
    	<physics type="dynamic">
    		<geometry>
    			<shape type="box" x="0.50" y="0.5" z="0.2"/>
    			<position x="0.0" y="0.0" z="0.00"/>
    		</geometry>
    		<mass type="box" value="88" x="0.5" y="0.5" z="0.5"/>
    	</physics>
    </body>
    

    Simply removing that orientation tag yields:
    0_1496431785760_KREX_after.png

    The same will need to be done to the drive arms! Good luck, and let us know what else you need to update!



  • @anvel_administrator said in Importing KREX rover into ANVEL 2.0:

    w="0.707" x="0.0" y="0.0" z="0.707"/

    Thank you. Unfortunately, removing that tag in the driving motors does not work and a weird orientation is observed (neither under the "representations" tag nor the "orientation" tag between "position" and "physics". I think that each orientation quaternion should be defined according to the new coordinate frame in ANVEL 2.0. By the way, I also obtain the following error while loading KREX:05:17:38.14: "Could not locate Motor Controller named sample ( Loading vehicle from krex.vehicle.xml )." Thank you.


  • administrators

    @ramongmit said in Importing KREX rover into ANVEL 2.0:

    @anvel_administrator said in Importing KREX rover into ANVEL 2.0:

    w="0.707" x="0.0" y="0.0" z="0.707"/

    Thank you. Unfortunately, removing that tag in the driving motors does not work and a weird orientation is observed (neither under the "representations" tag nor the "orientation" tag between "position" and "physics". I think that each orientation quaternion should be defined according to the new coordinate frame in ANVEL 2.0.

    It may not be a matter of just removing the orientation tag. You may have to specify the correct quaternion based on how the asset was imported. Here's a rough updated version:

    0_1496674183427_krex2.0.vehicle.xml
    0_1496674343804_KREX_improved.png


  • administrators

    By the way, I also obtain the following error while loading KREX:05:17:38.14: "Could not locate Motor Controller named sample ( Loading vehicle from krex.vehicle.xml )." Thank you.

    ANVEL comes with several sample projects for building C++ plugins. The motor controller sample is one of those projects, so it looks like the KREX was using a custom motor controller plugin. You can either build the sample project in Visual Studio 2015, or use one of the built-in motor controllers.



  • @anvel_administrator Thank you very much. This is really helpful. Unfortunately, this does not solve the problem. When I try to move the new KREX rover 2.0, it experiences weird motions. For example, some wheels sink into the soil, so eventually the vehicle gets stuck or turns upside down. I have tested moving the vehicle with the keyboard (keys: I, J, K, L) in the four environments (grass, mountains, parking lot, gym), in all of them I get the same result. It seems there is some bad definition of the physics of the vehicle. Please, could you kindly let me know how to solve this. It's very important to us to work with this rover in ANVEL 2.0. Thank you very much indeed.


  • administrators

    @ramongmit said in Importing KREX rover into ANVEL 2.0:
    When I try to move the new KREX rover 2.0, it experiences weird motions. For example, some wheels sink into the soil, so eventually the vehicle gets stuck or turns upside down. I have tested moving the vehicle with the keyboard (keys: I, J, K, L) in the four environments (grass, mountains, parking lot, gym), in all of them I get the same result. It seems there is some bad definition of the physics of the vehicle. Please, could you kindly let me know how to solve this. It's very important to us to work with this rover in ANVEL 2.0. Thank you very much indeed.

    Have you verified that the wheel and suspension definitions are sane? Here's what it looks like now:

    <definition name="wheelDef">
    	<wheel diameter="50.0CM" sectionHeight="10CM" tireStiffness="3500N/M" width="12CM">
    		<physics type="dynamic">
    			<geometry>
    				<shape length="0.12" radius="0.25" type="cylinder"/>
    			</geometry>
    			<mass length="0.12" radius="0.25" type="cylinder" value="5"/>
    			<contact bouncyness="0.2" fds="0.004" friction="100.0"/>
    			<suspension damping="10000.0" spring="40000" step="0.01"/>
    		</physics>
    	</wheel>
    </definition>
    

    ANVEL provides the ability to specify a stiffness and damping curve in the wheel definition.



  • @anvel_administrator Those parameters are the same that I had in ANVEL 1.0 where the vehicle works satisfactorily. In order to work in ANVEL 2.0, I have set wheel's parameters to the same value than Coroware Explorer (i.e. stiffness, friction, fds, damping, spring). Thank you.


Log in to reply
 

Looks like your connection to ANVEL Forum was lost, please wait while we try to reconnect.