Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 of 18 tasks
torn8to opened this issue Nov 2, 2024 · 2 comments
Open
3 of 18 tasks
Labels
bug Something isn't working

Comments

@torn8to
Copy link

torn8to commented Nov 2, 2024

Environment

  • OS Version:Ubuntu 24.04

  • ros Version: Jammy

  • If this is a GUI or sensor rendering bug, describe your GPU and rendering system. Otherwise delete this section.

    • Rendering plugin: [ogre | ogre2].

      • Sensor rendering error.
      • GUI rendering error.
    • EGL headless mode:

      • Running in EGL headless mode
    • Generally, mention all circumstances that might affect rendering capabilities:

      • running on a dual GPU machine (integrated GPU + discrete GPU)
      • running on a multi-GPU machine (it has multiple discrete GPUs)
      • running on real hardware
      • running in virtual machine
      • running in Docker/Singularity
      • running remotely (e.g. via SSH)
      • running in a cloud
      • using VirtualGL, XVFB, Xdummy, XVNC or other indirect rendering utilities
      • GPU is concurrently used for other tasks
        • desktop acceleration
        • video decoding (i.e. a playing Youtube video)
        • video encoding
        • CUDA/ROCm computations (Tensorflow, Torch, Caffe running)
        • multiple simulators running at the same time
      • other...
    • Rendering system info:

      • On Linux, provide the outputs of the following commands:
        LANG=C lspci -nn | grep VGA  # might require installing pciutils
        echo "$DISPLAY"
        LANG=C glxinfo -B | grep -i '\(direct rendering\|opengl\|profile\)'  # might require installing mesa-utils package
        ps aux | grep Xorg
        sudo env LANG=C X -version  # if you don't have root access, try to tell the version of Xorg e.g. via package manager

ouput of above command

1:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2560] (rev a1)
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt [Radeon 680M] [1002:1681] (rev c8)
:1
direct rendering: Yes
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 555.58.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6.0 NVIDIA 555.58.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 555.58.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
nathan      3754  1.8  1.5 26525984 247304 tty2  Sl+  08:16  15:14 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3
nathan    100248  0.0  0.0   9468  2176 pts/3    S+   21:42   0:00 grep --color=auto Xorg
[sudo] password for nathan: 

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.
[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

  • Expected behavior: Simulation Boots with motor control plugin simila to the demo quadcopter teleop
  • Actual behavior: Crashes with a segfault upon loading

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>

</plugin>
	    <!--<plugin filename="EntityTree" name="Entity tree"></plugin>-->
	    </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>
</sdf>
  1. launched using this command
      ros2 launch ros_gz_sim gz_sim.launch.py  gz_args:=" -v 4 drone_sim.sdf"

Output

console output provided above

@torn8to torn8to added the bug Something isn't working label Nov 2, 2024
@iche033
Copy link
Contributor

iche033 commented Nov 4, 2024

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. #2666

@torn8to
Copy link
Author

torn8to commented Nov 5, 2024

ah big thanks thanks for the changes and the info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Inbox
Development

No branches or pull requests

2 participants