gazebosim / gz-sim

Open source robotics simulator. The latest version of Gazebo.
https://gazebosim.org
Apache License 2.0
709 stars 269 forks source link

using the MultiCopter motor Model control plugin causes a segmentation fault #2665

Open torn8to opened 4 days ago

torn8to commented 4 days ago

Environment

X.Org X Server 1.21.1.11 X Protocol Version 11, Revision 0 Current Operating System: Linux nathan-Legion-5-15ARH7H 6.5.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 15 16:40:02 UTC 2 x86_64 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.5.0-45-generic root=UUID=19cbb4a0-baff-4b69-8a22-c54371589d1b ro quiet splash vt.handoff=7 xorg-server 2:21.1.12-1ubuntu1.1 (For technical support please see http://www.ubuntu.com/support) Current version of pixman: 0.42.2 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version.

<details>

```bash
[INFO] [launch]: All log files can be found below /home/nathan/.ros/log/2024-11-01-21-20-59-333501-nathan-Legion-5-15ARH7H-90336
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ruby $(which gz) sim-1]: process started with pid [90349]
[ruby $(which gz) sim-1] [Dbg] [gz.cc:166] Subscribing to [/gazebo/starting_world].
[ruby $(which gz) sim-1] [Dbg] [gz.cc:168] Waiting for a world to be set from the GUI...
[ruby $(which gz) sim-1] [Msg] Received world [drone_sim.sdf] from the GUI.
[ruby $(which gz) sim-1] [Dbg] [gz.cc:172] Unsubscribing from [/gazebo/starting_world].
[ruby $(which gz) sim-1] [Msg] Gazebo Sim Server v8.6.0
[ruby $(which gz) sim-1] [Msg] Loading SDF world file[/home/nathan/jazzy_ws/src/sj_demo_gazebo/resource/drone_sim.sdf].
[ruby $(which gz) sim-1] Warning [Utils.cc:132] [/sdf/model[@name="M100"]/link[@name="base_link"]/sensor[@name="air_pressure"]/air_pressure/noise:/home/nathan/.gz/fuel/fuel.gazebosim.org/openrobotics/models/cerberus_m100_sensor_config_1/10/model.sdf:L173]: XML Element[noise], child of element[air_pressure], not defined in SDF. Copying[noise] as children of [air_pressure].
[ruby $(which gz) sim-1] [Wrn] [SdfEntityCreator.cc:808] Gazebo does not support Ogre material scripts. See https://gazebosim.org/api/sim/8/migrationsdf.html#:~:text=Materials for details.
[ruby $(which gz) sim-1] [Wrn] [SdfEntityCreator.cc:824] Using an internal gazebo.material to parse Gazebo/Red
[ruby $(which gz) sim-1] [Wrn] [SdfEntityCreator.cc:808] Gazebo does not support Ogre material scripts. See https://gazebosim.org/api/sim/8/migrationsdf.html#:~:text=Materials for details.
[ruby $(which gz) sim-1] [Wrn] [SdfEntityCreator.cc:824] Using an internal gazebo.material to parse Gazebo/Blue
[ruby $(which gz) sim-1] [Wrn] [SdfEntityCreator.cc:808] Gazebo does not support Ogre material scripts. See https://gazebosim.org/api/sim/8/migrationsdf.html#:~:text=Materials for details.
[ruby $(which gz) sim-1] [Wrn] [SdfEntityCreator.cc:824] Using an internal gazebo.material to parse Gazebo/Red
[ruby $(which gz) sim-1] [Wrn] [SdfEntityCreator.cc:808] Gazebo does not support Ogre material scripts. See https://gazebosim.org/api/sim/8/migrationsdf.html#:~:text=Materials for details.
[ruby $(which gz) sim-1] [Wrn] [SdfEntityCreator.cc:824] Using an internal gazebo.material to parse Gazebo/Blue
[ruby $(which gz) sim-1] [GUI] [Wrn] [Application.cc:908] [QT] file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:413:17: QML ToolButton: Binding loop detected for property "implicitHeight"
[ruby $(which gz) sim-1] [GUI] [Wrn] [Application.cc:908] [QT] file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:309:21: QML Button: Binding loop detected for property "implicitHeight"
[ruby $(which gz) sim-1] [GUI] [Wrn] [Application.cc:908] [QT] file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:309:21: QML Button: Binding loop detected for property "implicitHeight"
[ruby $(which gz) sim-1] [GUI] [Wrn] [Application.cc:908] [QT] file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:413:17: QML ToolButton: Binding loop detected for property "implicitHeight"
[ruby $(which gz) sim-1] [GUI] [Wrn] [Application.cc:908] [QT] file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:309:21: QML Button: Binding loop detected for property "implicitHeight"
[ruby $(which gz) sim-1] [GUI] [Wrn] [Application.cc:908] [QT] file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:309:21: QML Button: Binding loop detected for property "implicitHeight"
[ruby $(which gz) sim-1] [GUI] [Wrn] [Application.cc:908] [QT] file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:413:17: QML ToolButton: Binding loop detected for property "implicitHeight"
[ruby $(which gz) sim-1] [GUI] [Wrn] [Application.cc:908] [QT] file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:309:21: QML Button: Binding loop detected for property "implicitHeight"
[ruby $(which gz) sim-1] [GUI] [Wrn] [Application.cc:908] [QT] file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/DefaultFileDialog.qml:309:21: QML Button: Binding loop detected for property "implicitHeight"
[ruby $(which gz) sim-1] [GUI] [Wrn] [WorldControl.cc:124] Ignoring service [/world/world_demo/control], world name different from [drone_sim_world]. Fix or remove your <service> tag.
[ruby $(which gz) sim-1] [GUI] [Wrn] [WorldControl.cc:201] Ignoring topic [/world/world_demo/stats], world name different from [drone_sim_world]. Fix or remove your <stats_topic> tag.
[ruby $(which gz) sim-1] [GUI] [Wrn] [WorldStats.cc:121] Ignoring topic [/world/world_demo/stats], world name different from [drone_sim_world]. Fix or remove your <topic> tag.
[ruby $(which gz) sim-1] [GUI] [Wrn] [Application.cc:908] [QT] file::/WorldStats/WorldStats.qml:53:3: QML RowLayout: Binding loop detected for property "x"
[ruby $(which gz) sim-1] [Msg] Gazebo Sim GUI    v8.6.0
[ruby $(which gz) sim-1] [Dbg] [Gui.cc:263] Waiting for subscribers to [/gazebo/starting_world]...
[ruby $(which gz) sim-1] [Dbg] [Application.cc:96] Initializing application.
[ruby $(which gz) sim-1] [Dbg] [Application.cc:170] Qt using OpenGL graphics interface
[ruby $(which gz) sim-1] [GUI] [Dbg] [Application.cc:657] Create main window
[ruby $(which gz) sim-1] [GUI] [Dbg] [PathManager.cc:68] Requesting resource paths through [/gazebo/resource_paths/get]
[ruby $(which gz) sim-1] [GUI] [Dbg] [Gui.cc:343] GUI requesting list of world names. The server may be busy downloading resources. Please be patient.
[ruby $(which gz) sim-1] [GUI] [Dbg] [PathManager.cc:57] Received resource paths.
[ruby $(which gz) sim-1] [GUI] [Dbg] [Gui.cc:401] Requesting GUI from [/world/drone_sim_world/gui/info]...
[ruby $(which gz) sim-1] [GUI] [Dbg] [GuiRunner.cc:149] Requesting initial state from [/world/drone_sim_world/state]...
[ruby $(which gz) sim-1] [GUI] [Dbg] [Application.cc:528] Loading plugin [MinimalScene]
[ruby $(which gz) sim-1] [GUI] [Dbg] [MinimalScene.cc:802] Creating gz-rendering interface for OpenGL
[ruby $(which gz) sim-1] [GUI] [Dbg] [MinimalScene.cc:802] Creating gz-rendering interface for OpenGL
[ruby $(which gz) sim-1] [GUI] [Dbg] [MinimalScene.cc:986] Creating render thread interface for OpenGL
[ruby $(which gz) sim-1] [GUI] [Dbg] [MinimalScene.cc:802] Creating gz-rendering interface for OpenGL
[ruby $(which gz) sim-1] [GUI] [Dbg] [MinimalScene.cc:986] Creating render thread interface for OpenGL
[ruby $(which gz) sim-1] [GUI] [Msg] Added plugin [3D View] to main window
[ruby $(which gz) sim-1] [GUI] [Msg] Loaded plugin [MinimalScene] from path [/opt/ros/jazzy/opt/gz_gui_vendor/lib/gz-gui-8/plugins/libMinimalScene.so]
[ruby $(which gz) sim-1] [GUI] [Dbg] [Application.cc:528] Loading plugin [GzSceneManager]
[ruby $(which gz) sim-1] [GUI] [Msg] Added plugin [Scene Manager] to main window
[ruby $(which gz) sim-1] [GUI] [Msg] Loaded plugin [GzSceneManager] from path [/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/gui/libGzSceneManager.so]
[ruby $(which gz) sim-1] [GUI] [Dbg] [Application.cc:528] Loading plugin [WorldControl]
[ruby $(which gz) sim-1] [GUI] [Msg] Using world control service [/world/drone_sim_world/control]
[ruby $(which gz) sim-1] [GUI] [Msg] Listening to stats on [/world/drone_sim_world/stats]
[ruby $(which gz) sim-1] [GUI] [Dbg] [WorldControl.cc:237] Using an event to share WorldControl msgs with the server
[ruby $(which gz) sim-1] [GUI] [Msg] Added plugin [World control] to main window
[ruby $(which gz) sim-1] [GUI] [Msg] Loaded plugin [WorldControl] from path [/opt/ros/jazzy/opt/gz_gui_vendor/lib/gz-gui-8/plugins/libWorldControl.so]
[ruby $(which gz) sim-1] [GUI] [Dbg] [Application.cc:528] Loading plugin [WorldStats]
[ruby $(which gz) sim-1] [GUI] [Msg] Listening to stats on [/world/drone_sim_world/stats]
[ruby $(which gz) sim-1] [GUI] [Msg] Added plugin [World stats] to main window
[ruby $(which gz) sim-1] [GUI] [Msg] Loaded plugin [WorldStats] from path [/opt/ros/jazzy/opt/gz_gui_vendor/lib/gz-gui-8/plugins/libWorldStats.so]
[ruby $(which gz) sim-1] libEGL warning: egl: failed to create dri2 screen
[ruby $(which gz) sim-1] libEGL warning: egl: failed to create dri2 screen
[ruby $(which gz) sim-1] libEGL warning: egl: failed to create dri2 screen
[ruby $(which gz) sim-1] Stack trace (most recent call last):
[ruby $(which gz) sim-1] #30   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
[ruby $(which gz) sim-1] #29   Object "gz sim server", at 0x5d4f93b011d4, in _start
[ruby $(which gz) sim-1] #28   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x76c0e842a28a, in __libc_start_main
[ruby $(which gz) sim-1] #27   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x76c0e842a1c9, in 
[ruby $(which gz) sim-1] #26   Object "gz sim server", at 0x5d4f93b01186, in 
[ruby $(which gz) sim-1] #25   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e88b9192, in ruby_run_node
[ruby $(which gz) sim-1] #24   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e88b4e5b, in 
[ruby $(which gz) sim-1] #23   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e8a57b39, in rb_vm_exec
[ruby $(which gz) sim-1] #22   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e8a545db, in 
[ruby $(which gz) sim-1] #21   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e8a500fe, in 
[ruby $(which gz) sim-1] #20   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e8a4d8ef, in 
[ruby $(which gz) sim-1] #19   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e898e099, in 
[ruby $(which gz) sim-1] #18   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e88b7216, in rb_protect
[ruby $(which gz) sim-1] #17   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e8a5c2c9, in rb_yield
[ruby $(which gz) sim-1] #16   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e8a57b39, in rb_vm_exec
[ruby $(which gz) sim-1] #15   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e8a545db, in 
[ruby $(which gz) sim-1] #14   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e8a500fe, in 
[ruby $(which gz) sim-1] #13   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e8a4d8ef, in 
[ruby $(which gz) sim-1] #12   Object "/usr/lib/x86_64-linux-gnu/ruby/3.2.0/fiddle.so", at 0x76c0e83d7b13, in 
[ruby $(which gz) sim-1] #11   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x76c0e8a163bb, in rb_nogvl
[ruby $(which gz) sim-1] #10   Object "/usr/lib/x86_64-linux-gnu/ruby/3.2.0/fiddle.so", at 0x76c0e83d743b, in 
[ruby $(which gz) sim-1] #9    Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x76c0e389b0bd, in ffi_call
[ruby $(which gz) sim-1] #8    Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x76c0e38983ee, in 
[ruby $(which gz) sim-1] #7    Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x76c0e389bb15, in 
[ruby $(which gz) sim-1] #6    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/libgz-sim8-gz.so.8.6.0", at 0x76c0e36f58ff, in runServer
[ruby $(which gz) sim-1] #5    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/libgz-sim8.so.8", at 0x76c0e2541fa7, in 
[ruby $(which gz) sim-1] #4    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/libgz-sim8.so.8", at 0x76c0e25506e6, in gz::sim::v8::SimulationRunner::Run(unsigned long)
[ruby $(which gz) sim-1] #3    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/libgz-sim8.so.8", at 0x76c0e254fd41, in gz::sim::v8::SimulationRunner::Step(gz::sim::v8::UpdateInfo const&)
[ruby $(which gz) sim-1] #2    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/libgz-sim8.so.8", at 0x76c0e254def1, in gz::sim::v8::SimulationRunner::UpdateSystems()
[ruby $(which gz) sim-1] #1    Object "/opt/ros/jazzy/opt/gz_sim_vendor/lib/gz-sim-8/plugins/libgz-sim-multicopter-motor-model-system.so", at 0x76c0d820f85c, in gz::sim::v8::systems::MulticopterMotorModel::PreUpdate(gz::sim::v8::UpdateInfo const&, gz::sim::v8::EntityComponentManager&)
[ruby $(which gz) sim-1] #0    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x76c0e35685e0, in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[ruby $(which gz) sim-1] Segmentation fault (Address not mapped to object [0x10])
[ruby $(which gz) sim-1] [GUI] [Dbg] [MinimalScene.cc:802] Creating gz-rendering interface for OpenGL
[ruby $(which gz) sim-1] [GUI] [Dbg] [MinimalScene.cc:986] Creating render thread interface for OpenGL
[ruby $(which gz) sim-1] [GUI] [Msg] Loading plugin [gz-rendering-ogre2]
[ruby $(which gz) sim-1] [GUI] [Dbg] [MinimalScene.cc:749] Create scene [scene]
[ruby $(which gz) sim-1] [GUI] [Dbg] [MinimalScene.cc:1037] Creating texture node render interface for OpenGL
[ruby $(which gz) sim-1] [GUI] [Dbg] [SignalHandler.cc:142] Received signal[2].
[ruby $(which gz) sim-1] [GUI] [Dbg] [Gui.cc:523] Shutting down gz-sim-gui
[ruby $(which gz) sim-1] [GUI] [Dbg] [Application.cc:237] Terminating application.
[ruby $(which gz) sim-1] [GUI] [Dbg] [MinimalScene.cc:841] Destroy scene [scene]
[INFO] [ruby $(which gz) sim-1]: process has finished cleanly [pid 90349]
[INFO] [launch]: process[ruby $(which gz) sim-1] was required: shutting down launched system

Description

Steps to reproduce

  1. recreate_ xml file

    
    <?xml version='1.0'?>
    <sdf version="1.8">
    <world name="drone_sim_world">
        <physics name="1ms" type="ignored">
        <max_step_size>0.001</max_step_size>
        <real_time_factor>1.0</real_time_factor>
    </physics>
    <plugin
      filename="gz-sim-scene-broadcaster-system"
      name="gz::sim::systems::SceneBroadcaster">
    </plugin><gui>
    <plugin filename="MinimalScene" name="3D View">
    <gz-gui>
    <title>3D View</title>
    <property type="bool" key="showTitleBar">True</property>
    <property type="string" key="state">docked</property>
    </gz-gui>
    
    <engine>ogre2</engine>
    <scene>scene</scene>
    <ambient_light>0.4 0.4 0.4</ambient_light>
    <background_color>0.8 0.8 0.8</background_color>
    <camera_pose>-6 0 6 0 0.5 0</camera_pose>
    <camera_clip>
    <near>0.25</near>
    <far>25000</far>
    </camera_clip>
    </plugin>
    <plugin filename="GzSceneManager" name="Scene Manager">
    <gz-gui>
    <property key="resizable" type="bool">false</property>
    <property key="width" type="double">5</property>
    <property key="height" type="double">5</property>
    <property key="state" type="string">floating</property>
    <property key="showTitleBar" type="bool">false</property>
    </gz-gui>
    </plugin>
        <plugin filename="WorldControl" name="World control">
            <gz-gui>
        <title>World control</title>
        <property type="bool" key="showTitleBar">false</property>
        <property type="bool" key="resizable">false</property>
        <property type="double" key="height">72</property>
        <property type="double" key="width">121</property>
        <property type="double" key="z">1</property>
        <property type="string" key="state">floating</property>
        <anchors target="3D View">
        <line own="left" target="left"/>
        <line own="bottom" target="bottom"/>
        </anchors>
        </gz-gui>
    
        <play_pause>true</play_pause>
        <step>true</step>
        <start_paused>true</start_paused>
        <service>/world/world_demo/control</service>
        <stats_topic>/world/world_demo/stats</stats_topic>
        </plugin>       
       <plugin filename="WorldStats" name="World stats">
    <gz-gui>
        <title>World stats</title>
        <property type="bool" key="showTitleBar">false</property>
        <property type="bool" key="resizable">false</property>
        <property type="double" key="height">110</property>
        <property type="double" key="width">290</property>
        <property type="double" key="z">1</property>
    
        <property type="string" key="state">floating</property>
        <anchors target="3D View">
        <line own="right" target="right"/>
        <line own="bottom" target="bottom"/>
        </anchors>
    </gz-gui>
    
    <sim_time>true</sim_time>
    <real_time>true</real_time>
    <real_time_factor>true</real_time_factor>
    <iterations>true</iterations>
    <topic>/world/world_demo/stats</topic>

    </gui>
  <light type="directional" name="sun">
    <cast_shadows>true</cast_shadows>
    <pose>0 0 10 0 0 0</pose>
    <diffuse>0.8 0.8 0.8 1</diffuse>
    <specular>0.2 0.2 0.2 1</specular>
    <attenuation>
    <range>1000</range>
    <constant>0.9</constant>
    <linear>0.01</linear>
    <quadratic>0.001</quadratic>
    </attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>
<include>
    <name>ionic</name>
    <pose>0 0 0 0 0 0</pose>
    <uri>https://fuel.gazebosim.org/1.0/OpenRobotics/models/Ionic Interior</uri>
    </include>
<include>
    <pose>0 0 .5 0 0 0</pose>
    <uri>https://fuel.gazebosim.org/1.0/OpenRobotics/models/CERBERUS_M100_SENSOR_CONFIG_1</uri>
    <plugin 
    filename="gz-sim-multicopter-motor-model-system"
    name="gz::sim::systems::MulticopterMotorModel">
    <robotNamespace>M100</robotNamespace>
    <jointName>M100/rotor_0_joint</jointName>
    <linkName>M100/rotor_0</linkName>
    <turningDirection>ccw</turningDirection>
    <timeConstantUp>0.0125</timeConstantUp>
    <timeConstantDown>0.025</timeConstantDown>
    <maxRotVelocity>800.0</maxRotVelocity>
    <motorConstant>8.54858e-06</motorConstant>
    <momentConstant>0.016</momentConstant>
    <commandSubTopic>gazebo/comannd/motor_speed</commandSubTopic>
    <actuator_number>1</actuator_number>
    <rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
    <rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
    <motorSpeedPubTopic>motor_speed/1</motorSpeedPubTopic>
    <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
    <motorType>velocity</motorType>
    </plugin>
    <!--<plugin
    filename="gz-sim-multicopter-motor-model-system"
    name="gz::sim::systems::MulticopterMotorModel">
    <robotNamespace>drone</robotNamespace>
    <jointName>drone/rotor_1_joint</jointName>
    <linkName>drone/rotor_1</linkName>
    <turningDirection>ccw</turningDirection>
    <timeConstantUp>0.0125</timeConstantUp>
    <timeConstantDown>0.025</timeConstantDown>
    <maxRotVelocity>800.0</maxRotVelocity>
    <motorConstant>8.5458e-06</motorConstant>
    <momentConstant>0.016</momentConstant>
    <commandSubTopic>gazebo/comannd/motor_speed</commandSubTopic>
    <actuator_number>2</actuator_number>
    <rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
    <rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
    <motorSpeedPubTopic>motor_speed/1</motorSpeedPubTopic>
    <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
    <motorType>velocity</motorType>
    </plugin>
    <plugin
    filename="gz-sim-multicopter-motor-model-system"
    name="gz::sim::systems::MulticopterMotorModel">
    <robotNamespace>drone</robotNamespace>
    <jointName>drone/rotor_2_joint</jointName>
    <linkName>drone/rotor_2</linkName>
    <turningDirection>cw</turningDirection>
    <timeConstantUp>0.0125</timeConstantUp>
    <timeConstantDown>0.025</timeConstantDown>
    <maxRotVelocity>800.0</maxRotVelocity>
    <motorConstant>8.54858e-06</motorConstant>
    <momentConstant>0.016</momentConstant>
    <commandSubTopic>gazebo/comannd/motor_speed</commandSubTopic>
    <actuator_number>3</actuator_number>
    <rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
    <rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
    <motorSpeedPubTopic>motor_speed/1</motorSpeedPubTopic>
    <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
    <motorType>velocity</motorType>
    </plugin>
    <plugin
    filename="gz-sim-multicopter-motor-model-system"
    name="gz::sim::systems::MulticopterMotorModel">
    <robotNamespace>drone</robotNamespace>
    <jointName>drone/rotor_3_joint</jointName>
    <linkName>drone/rotor_3</linkName>
    <turningDirection>cw</turningDirection>
    <timeConstantUp>0.0125</timeConstantUp>
    <timeConstantDown>0.025</timeConstantDown>
    <maxRotVelocity></maxRotVelocity>
    <motorConstant></motorConstant>
    <momentConstant></momentConstant>
    <commandSubTopic>0.016</commandSubTopic>
    <actuator_number>1</actuator_number>
    <rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>
    <rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
    <motorSpeedPubTopic>motor_speed/1</motorSpeedPubTopic>
    <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
    <motorType>velocity</motorType>
    </plugin>-->
</include>
</world>


3. launched using this command 
   ```bash
     ros2 launch ros_gz_sim gz_sim.launch.py  gz_args:=" -v 4 drone_sim.sdf"

4.

Output

console output provided above

iche033 commented 1 day ago

Gazebo crashed because it couldn't find the specified link. Can you try changing the joint and link names to:

        <jointName>rotor_0_joint</jointName>
        <linkName>rotor_0</linkName>

There was a recent fix to prevent the crash but targeted at Ionic. I just backported it to Harmonic, which is used by Jazzy. https://github.com/gazebosim/gz-sim/pull/2666

torn8to commented 15 hours ago

ah big thanks thanks for the changes and the info