0
$\begingroup$

I designed a model in Fusion and exported it to to SDF using SDFusion script.

Till now everything seems to work fine, the 2 of the 4 joints did not cause any problems and worked ok, but when I add the plugin for the other 2 joints I get this error:

 ODE INTERNAL ERROR 1: assertion "aabbBound >= dMinIntExact && aabbBound < dMaxIntExact" failed in collide() [collision_space.cpp:460]
Stack trace (most recent call last):
#31   Object "gz sim --verbose=1 -r -s /home/joseph/px4_14/PX4-Autopilot/Tools/simulation/gz/worlds/default.sdf", at 0x557039bab1cd, in _start
#30   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7ff289a76082, in __libc_start_main
#29   Object "gz sim --verbose=1 -r -s /home/joseph/px4_14/PX4-Autopilot/Tools/simulation/gz/worlds/default.sdf", at 0x557039bab17e, in 
#28   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7ff289cf245d, in ruby_run_node
#27   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7ff289ced5f0, in 
#26   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7ff289e5cd01, in rb_vm_exec
#25   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7ff289e565f0, in 
#24   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7ff289e45815, in 
#23   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7ff289e5f2ea, in 
#22   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7ff289e524c4, in 
#21   Object "/usr/lib/x86_64-linux-gnu/ruby/2.7.0/fiddle.so", at 0x7ff285a96714, in 
#20   Object "/lib/x86_64-linux-gnu/libruby-2.7.so.2.7", at 0x7ff289e23939, in rb_nogvl
#19   Object "/usr/lib/x86_64-linux-gnu/ruby/2.7.0/fiddle.so", at 0x7ff285a968fb, in 
#18   Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x7ff285a41409, in 
#17   Object "/lib/x86_64-linux-gnu/libffi.so.7", at 0x7ff285a41ff4, in 
#16   Object "/usr/lib/x86_64-linux-gnu/libgz-sim7-gz.so.7.6.0", at 0x7ff284fefc0d, in runServer
#15   Object "/lib/x86_64-linux-gnu/libgz-sim7.so.7", at 0x7ff284bdf85b, in gz::sim::v7::Server::Run(bool, unsigned long, bool)
#14   Object "/lib/x86_64-linux-gnu/libgz-sim7.so.7", at 0x7ff284beb20e, in 
#13   Object "/lib/x86_64-linux-gnu/libgz-sim7.so.7", at 0x7ff284bfbdd2, in gz::sim::v7::SimulationRunner::Run(unsigned long)
#12   Object "/lib/x86_64-linux-gnu/libgz-sim7.so.7", at 0x7ff284bfb570, in gz::sim::v7::SimulationRunner::Step(gz::sim::v7::UpdateInfo const&)
#11   Object "/lib/x86_64-linux-gnu/libgz-sim7.so.7", at 0x7ff284bf4299, in gz::sim::v7::SimulationRunner::UpdateSystems()
#10   Object "/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/libgz-sim-physics-system.so", at 0x7ff2745d50a3, in gz::sim::v7::systems::Physics::Update(gz::sim::v7::UpdateInfo const&, gz::sim::v7::EntityComponentManager&)
#9    Object "/usr/lib/x86_64-linux-gnu/gz-sim-7/plugins/libgz-sim-physics-system.so", at 0x7ff2745beb6a, in gz::sim::v7::systems::PhysicsPrivate::Step(std::chrono::duration<long, std::ratio<1l, 1000000000l> > const&)
#8    Object "/usr/lib/x86_64-linux-gnu/gz-physics-6/engine-plugins/libgz-physics-dartsim-plugin.so", at 0x7ff25c7ecb0b, in gz::physics::dartsim::SimulationFeatures::WorldForwardStep(gz::physics::Identity const&, gz::physics::SpecifyData<gz::physics::RequireData<gz::physics::WorldPoses>, gz::physics::ExpectData<gz::physics::ChangedWorldPoses, gz::physics::Contacts, gz::physics::JointPositions> >&, gz::physics::CompositeData&, gz::physics::ExpectData<gz::physics::ApplyExternalForceTorques, gz::physics::ApplyGeneralizedForces, gz::physics::VelocityControlCommands, gz::physics::ServoControlCommands, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&)
#7    Object "/lib/x86_64-linux-gnu/libdart.so.6", at 0x7ff25c4c2d20, in dart::simulation::World::step(bool)
#6    Object "/lib/x86_64-linux-gnu/libdart.so.6", at 0x7ff25c4a77b5, in dart::constraint::ConstraintSolver::solve()
#5    Object "/lib/x86_64-linux-gnu/libdart.so.6", at 0x7ff25c4a627d, in dart::constraint::ConstraintSolver::updateConstraints()
#4    Object "/lib/x86_64-linux-gnu/libdart-collision-ode.so.6", at 0x7ff25c610b6b, in dart::collision::OdeCollisionDetector::collide(dart::collision::CollisionGroup*, dart::collision::CollisionOption const&, dart::collision::CollisionResult*)
#3    Object "/lib/x86_64-linux-gnu/libode.so.8", at 0x7ff25be00456, in dxHashSpace::collide(void*, void (*)(void*, dxGeom*, dxGeom*))
#2    Object "/lib/x86_64-linux-gnu/libode.so.8", at 0x7ff25be08c57, in dDebug
#1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7ff289a74858, in abort
#0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7ff289a9500b, in gsignal
Aborted (Signal sent by tkill() 68794 1000)

And my sdf file is this:

<?xml version="1.0" ?>
<sdf version="1.6">
    <model name="VA25_VTOL_8">
        <link name="left_aileron">
            <self_collide>false</self_collide>
            <pose>0.7838276492938377 0.7437513761748877 0.3226151407425975 0.0 -0.0 0.0</pose>
            <inertial>
                <pose>0.0 0.0 0.0 0 0 0</pose>
                <mass>0.2075195906736219</mass>
                <inertia>
                    <ixx>0.004639328106225412</ixx>
                    <ixy>0.00011534778131801886</ixy>
                    <ixz>-3.3698935533152508e-06</ixz>
                    <iyy>3.622073888525393e-05</iyy>
                    <iyz>1.1542852124915726e-05</iyz>
                    <izz>0.004671151873854069</izz>
                </inertia>
            </inertial>
            <collision name="left_aileron_collision">
                <geometry>
                    <mesh>
                        <uri>model://VA25_VTOL_8/meshes/CAD/left_aileron.stl</uri>
                        <scale>0.01 0.01 0.01</scale>
                    </mesh>
                </geometry>
            </collision>
            <visual name="left_aileron_visual">
                <geometry>
                    <mesh>
                        <uri>model://VA25_VTOL_8/meshes/CAD/left_aileron.stl</uri>
                        <scale>0.01 0.01 0.01</scale>
                    </mesh>
                </geometry>
                <material>
          <ambient>0 0 1 1.0</ambient>
          <diffuse>0 0 1 1.0</diffuse>
        </material>
            </visual>
        </link>
        <link name="right_aileron">
            <self_collide>false</self_collide>
            <pose>0.7841266999404997 -0.6799887781862646 0.32260314824080005 0.0 -0.0 0.0</pose>
            <inertial>
                <pose>0.0 0.0 0.0 0 0 0</pose>
                <mass>0.207508066232339</mass>
                <inertia>
                    <ixx>0.004639128589166831</ixx>
                    <ixy>-0.00011534518553532963</ixy>
                    <ixz>-3.3698325271302566e-06</ixz>
                    <iyy>3.621969166158579e-05</iyy>
                    <iyz>-1.154250086589741e-05</iyz>
                    <izz>0.004670951608339374</izz>
                </inertia>
            </inertial>
            <collision name="right_aileron_collision">
                <geometry>
                    <mesh>
                        <uri>model://VA25_VTOL_8/meshes/CAD/right_aileron.stl</uri>
                        <scale>0.01 0.01 0.01</scale>
                    </mesh>
                </geometry>
            </collision>
            <visual name="right_aileron_visual">
                <geometry>
                    <mesh>
                        <uri>model://VA25_VTOL_8/meshes/CAD/right_aileron.stl</uri>
                        <scale>0.01 0.01 0.01</scale>
                    </mesh>
                </geometry>
                <material>
          <ambient>0 0 1 1.0</ambient>
          <diffuse>0 0 1 1.0</diffuse>
        </material>
            </visual>
        </link>
        <link name="left_ruddervator">
            <self_collide>false</self_collide>
            <pose>0.019245965210225736 0.15184614204919272 0.4017142660362421 0.0 -0.0 0.0</pose>
            <inertial>
                <pose>0.0 0.0 0.0 0 0 0</pose>
                <mass>0.05522739640235409</mass>
                <inertia>
                    <ixx>0.00038256835251192884</ixx>
                    <ixy>2.0938677507076166e-05</ixy>
                    <ixz>2.0893317350946816e-05</ixz>
                    <iyy>0.00020035459730011527</iyy>
                    <iyz>-0.00019115648057952797</iyz>
                    <izz>0.00020036995484959148</izz>
                </inertia>
            </inertial>
            
            <visual name="left_ruddervator_visual">
                <geometry>
                    <mesh>
                        <uri>model://VA25_VTOL_8/meshes/CAD/left_ruddervator.stl</uri>
                        <scale>0.01 0.01 0.01</scale>
                    </mesh>
                </geometry>
                <material>
          <ambient>0 0 1 1.0</ambient>
          <diffuse>0 0 1 1.0</diffuse>
        </material>
            </visual>
        </link>
        <link name="right_ruddervator">
            <self_collide>false</self_collide>
            <pose>0.019249698492502014 -0.1515642581504666 0.40148577356656384 0.0 -0.0 0.0</pose>
            <inertial>
                <pose>0.0 0.0 0.0 0 0 0</pose>
                <mass>0.05522723094122592</mass>
                <inertia>
                    <ixx>0.0003825683512394051</ixx>
                    <ixy>-2.089331982008309e-05</ixy>
                    <ixz>2.09386804012488e-05</ixz>
                    <iyy>0.0002003699179794211</iyy>
                    <iyz>0.0001911564803055427</iyz>
                    <izz>0.00020035456240694014</izz>
                </inertia>
            </inertial>
            
            <visual name="right_ruddervator_visual">
                <geometry>
                    <mesh>
                        <uri>model://VA25_VTOL_8/meshes/CAD/right_ruddervator.stl</uri>
                        <scale>0.01 0.01 0.01</scale>
                    </mesh>
                </geometry>
                <material>
          <ambient>0 0 1 1.0</ambient>
          <diffuse>0 0 1 1.0</diffuse>
        </material>
            </visual>
        </link>
        <link name="base">
            <self_collide>false</self_collide>
            <pose>0.9024726334202346 0.01159045634930561 0.2795115726981846 0.0 -0.0 0.0</pose>
            <inertial>
                <pose>0.0 0.0 0.0 0 0 0</pose>
                <mass>38.85005456400121</mass>
                <inertia>
                    <ixx>4.773862562333618</ixx>
                    <ixy>-0.002871126139243279</ixy>
                    <ixz>0.09901728719870735</ixz>
                    <iyy>2.399717603969929</iyy>
                    <iyz>-0.020853780404358212</iyz>
                    <izz>6.9366771796705144</izz>
                </inertia>
            </inertial>
            <collision name="base_collision">
                <geometry>
                    <mesh>
                        <uri>model://VA25_VTOL_8/meshes/CAD/base.stl</uri>
                        <scale>0.01 0.01 0.01</scale>
                    </mesh>
                </geometry>
            </collision>
            <visual name="base_visual">
                <geometry>
                    <mesh>
                        <uri>model://VA25_VTOL_8/meshes/CAD/base.stl</uri>
                        <scale>0.01 0.01 0.01</scale>
                    </mesh>
                </geometry>
                <material>
                  <ambient>.175 .175 .175 1.0</ambient>
                  <diffuse>.175 .175 .175 1.0</diffuse>
                </material>
            </visual>
            
      
      <gravity>1</gravity>
      <velocity_decay/>
      <self_collide>0</self_collide>
      <sensor name="imu_sensor" type="imu">
        <always_on>1</always_on>
        <update_rate>250</update_rate>
      </sensor>
      <sensor name="air_pressure_sensor" type="air_pressure">
        <always_on>1</always_on>
        <update_rate>50</update_rate>
        <air_pressure>
          <pressure>
            <noise type="gaussian">
              <mean>0</mean>
              <stddev>0.01</stddev>
            </noise>
          </pressure>
        </air_pressure>
      </sensor>
        </link>
        <joint name="left_aileron_joint" type="revolute">
            <parent>base</parent>
            <child>left_aileron</child>
            <pose>0.016164280041980846 0.034657323358010785 -0.005562735333249265 0 0 0</pose>
            <axis>
                <xyz>-0.037678878844781175 0.9992887623566787 0.00150715515379122</xyz>
                <limit>
                    <lower>-0.6981317007977318</lower>
                    <upper>0.6981317007977318</upper>
                </limit>
                <use_parent_model_frame>0</use_parent_model_frame>
            </axis>
        </joint>
        <joint name="right_aileron_joint" type="revolute">
            <parent>base</parent>
            <child>right_aileron</child>
            <pose>0.015865229395315622 -0.03464405123119874 -0.005550742831451671 0 0 0</pose>
            <axis>
                <xyz>0.03767887884479353 0.9992887623566784 -0.0015071551537917574</xyz>
                <limit>
                    <lower>-0.6981317007977318</lower>
                    <upper>0.6981317007977318</upper>
                </limit>
                <use_parent_model_frame>0</use_parent_model_frame>
            </axis>
        </joint>
        <joint name="left_ruddervator_joint" type="revolute">
            <parent>base</parent>
            <child>left_ruddervator</child>
            <pose>0.016004672326555003 0.003273461396103041 0.0033801627997988247 0 0 0</pose>
            <axis>
                <xyz>-0.08156122422289849 0.7047509371058911 0.7047509371058904</xyz>
                <limit>
                    <lower>-0.6981317007977318</lower>
                    <upper>0.6981317007977318</upper>
                </limit>
                <use_parent_model_frame>0</use_parent_model_frame>
            </axis>
        </joint>
        <joint name="right_ruddervator_joint" type="revolute">
            <parent>base</parent>
            <child>right_ruddervator</child>
            <pose>0.016000939044278732 -0.0034122222669650706 0.003305665389560062 0 0 0</pose>
            <axis>
                <xyz>-0.08156122422289848 -0.7047509371058905 0.7047509371058909</xyz>
                <limit>
                    <lower>-0.6981317007977318</lower>
                    <upper>0.6981317007977318</upper>
                </limit>
                <use_parent_model_frame>0</use_parent_model_frame>
            </axis>
        </joint>
        <plugin filename="gz-sim-lift-drag-system" name="gz::sim::systems::LiftDrag">
      <a0>0.05984281113</a0>
      <cla>4.752798721</cla>
      <cda>0.6417112299</cda>
      <cma>0.0</cma>
      <alpha_stall>0.3391428111</alpha_stall>
      <cla_stall>-3.85</cla_stall>
      <cda_stall>-0.9233984055</cda_stall>
      <cma_stall>0</cma_stall>
      <cp>-0.05 0.3 0.05</cp>
      <area>0.50</area>
      <air_density>1.2041</air_density>
      <forward>1 0 0</forward>
      <upward>0 0 1</upward>
      <link_name>base</link_name>
      <control_joint_name>left_aileron_joint</control_joint_name>
      <control_joint_rad_to_cl>-1.0</control_joint_rad_to_cl>
    </plugin>
            <plugin filename="gz-sim-joint-position-controller-system"          name="gz::sim::systems::JointPositionController">
            <joint_name>left_aileron_joint</joint_name>
          <sub_topic>servo_0</sub_topic>
        </plugin>
        <plugin filename="gz-sim-joint-position-controller-system"          name="gz::sim::systems::JointPositionController">
            <joint_name>right_aileron_joint</joint_name>
          <sub_topic>servo_1</sub_topic>
        </plugin>
        
      
        
         
        
        
    </model>
</sdf>

As this file works as intended and raises no errors, until I add these lines for other 2 joints:

 <plugin filename="gz-sim-joint-position-controller-system"         name="gz::sim::systems::JointPositionController">
            <joint_name>left_ruddervator_joint</joint_name>
          <sub_topic>servo_2</sub_topic>
        </plugin>
      
        <plugin filename="gz-sim-joint-position-controller-system"          name="gz::sim::systems::JointPositionController">
            <joint_name>right_ruddervator_joint</joint_name>
          <sub_topic>servo_3</sub_topic>
        </plugin>

I tried to adjust the collision objects, or delete them all as it looks like something with collision objects. But the result was still the same. My setup is Gazebo garden and ubuntu 20.04

$\endgroup$

1 Answer 1

1
$\begingroup$

The error was caused by the collision engine ode . I changed it to the bullet engine, now everything works fine.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.