Intelligent-Quads / iq_sim

example gazebo ardupilot simulation package
MIT License
110 stars 76 forks source link

Customize boat mesh #17

Closed giulianodejulio closed 8 months ago

giulianodejulio commented 8 months ago

Hello, I would like to run a demo simulation of an autonomous boat mission using a custom mesh file, that is, I want to substitute body.dae with some customBody.STL. I currently have an STL file which I tried to copy-paste into boat.sdf like so:

<visual name='base_link_fixed_joint_lump__dummy_link_visual'>
        <pose>0 0 0 1.57 0 0</pose>
        <geometry>
          <mesh>
            <scale>1 1 1</scale>
            <uri>model://boats/meshes/customBody.STL</uri>
          </mesh>
        </geometry>
      </visual>

However, when i launch boat.launch I get:

gzserver: /home/jenkins/workspace/gazebo11-debbuilder/build/gazebo-11.11.0/plugins/LiftDragPlugin.cc:135: virtual void gazebo::LiftDragPlugin::Load(gazebo::physics::ModelPtr, sdf::v9::ElementPtr): Assertion `(this->link)&&("Link was NULL")' failed.
Aborted (core dumped)
[gazebo-2] process has died [pid 47203, exit code 134, cmd /opt/ros/noetic/lib/gazebo_ros/gzserver -e ode /home/gdj/ros_ws/src/rl_main/rl_project_dejulio/worlds/boat.world __name:=gazebo __log:=/home/gdj/.ros/log/cb904056-c69c-11ee-a9cb-6f9d989dafec/gazebo-2.log].
log file: /home/gdj/.ros/log/cb904056-c69c-11ee-a9cb-6f9d989dafec/gazebo-2*.log

I tried to convert the STL file into a DAE using online converters but I couldn't succeed. Could you tell me how you got body.dae? Did you get it with some CAD software (e.g. SolidWorks) or did you convert an STL like I did? Thanks in advance