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

Crash after adding plugin MulticopterMotorModel #2646

Closed
gzfuzz opened this issue Oct 10, 2024 · 1 comment · Fixed by #2653
Closed

Crash after adding plugin MulticopterMotorModel #2646

gzfuzz opened this issue Oct 10, 2024 · 1 comment · Fixed by #2653
Labels
bug Something isn't working

Comments

@gzfuzz
Copy link

gzfuzz commented Oct 10, 2024

Environment

  • OS Version: Ubuntu 24.04
  • Source or binary build?
    source build
    gz-sim9 version: bbe2cc6
    built with
    gcc version 13.2.0 (Ubuntu 13.2.0-23ubuntu4)
    build options: -DCMAKE_BUILD_TYPE=Coverage
  • Also reproduced on gz-sim8

Description

  • Expected behavior: Gazebo doesn't crash
  • Actual behavior: Gazebo crashes

Steps to reproduce

  1. gz sim examples/worlds/shapes.sdf -r &
  2. call /world/shapes/entity/system/add service to add a MulticopterMotorModel, with
gz service --timeout 10000 -s /world/shapes/entity/system/add --reptype gz.msgs.Boolean --reqtype gz.msgs.EntityPlugin_V --req 'entity {
  id: 8
}
plugins {
  name: "gz::sim::systems::MulticopterMotorModel"
  filename: "gz-sim-multicopter-motor-model-system"
  innerxml: "<jointName>rotor_puller_joint</jointName>\n<linkName>rotor_puller</linkName>\n<turningDirection>cw</turningDirection>\n<timeConstantUp>0.0125</timeConstantUp>\n<timeConstantDown>0.025</timeConstantDown>\n<maxRotVelocity>3500</maxRotVelocity>\n<motorConstant>8.54858e-06</motorConstant>\n<momentConstant>0.01</momentConstant>\n<commandSubTopic>command/motor_speed</commandSubTopic>\n<motorNumber>0</motorNumber>\n<rotorDragCoefficient>8.06428e-05</rotorDragCoefficient>\n<rollingMomentCoefficient>1e-06</rollingMomentCoefficient>\n<rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>\n<motorType>velocity</motorType>"
}'

The plugin is from examples/worlds/advanced_lift_drag_system.sdf

Output

Stack trace (most recent call last):
#31   Object "gz sim server", at 0x5c3c9b8041d4, in _start
#30   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x775204a2a28a, in __libc_start_main
#29   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x775204a2a1c9, in 
#28   Object "gz sim server", at 0x5c3c9b804186, in 
#27   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x775204eb9192, in ruby_run_node
#26   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x775204eb4e5b, in 
#25   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x775205057b39, in rb_vm_exec
#24   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7752050545db, in 
#23   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7752050500fe, in 
#22   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x77520504d8ef, in 
#21   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x775204f8e099, in 
#20   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x775204eb7216, in rb_protect
#19   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x77520505c2c9, in rb_yield
#18   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x775205057b39, in rb_vm_exec
#17   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7752050545db, in 
#16   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7752050500fe, in 
#15   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x77520504d8ef, in 
#14   Object "/usr/lib/x86_64-linux-gnu/ruby/3.2.0/fiddle.so", at 0x775204c27b13, in 
#13   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7752050163bb, in rb_nogvl
#12   Object "/usr/lib/x86_64-linux-gnu/ruby/3.2.0/fiddle.so", at 0x775204c2743b, in 
#11   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x775204c1b0bd, in ffi_call
#10   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x775204c183ee, in 
#9    Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x775204c1bb15, in 
#8    Object "/data/play/robot/workspace/install/lib/libgz-sim9-gz.so.9.0.0", at 0x7751fe4bdc83, in runServer
#7    Object "/data/play/robot/workspace/install/lib/libgz-sim9.so.9", at 0x7751fcde1707, in gz::sim::v9::Server::Run(bool, unsigned long, bool)
#6    Object "/data/play/robot/workspace/install/lib/libgz-sim9.so.9", at 0x7751fce51bda, in 
#5    Object "/data/play/robot/workspace/install/lib/libgz-sim9.so.9", at 0x7751fce835f3, in gz::sim::v9::SimulationRunner::Run(unsigned long)
#4    Object "/data/play/robot/workspace/install/lib/libgz-sim9.so.9", at 0x7751fce845f8, in gz::sim::v9::SimulationRunner::Step(gz::sim::v9::UpdateInfo const&)
#3    Object "/data/play/robot/workspace/install/lib/libgz-sim9.so.9", at 0x7751fce8082a, in gz::sim::v9::SimulationRunner::UpdateSystems()
#2    Object "/data/play/robot/workspace/install/lib/gz-sim-9/plugins/libgz-sim-multicopter-motor-model-system.so", at 0x7751e56d5585, in 
#1    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7751ff36330c, in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#0    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7751ff362ddc, 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&)
Segmentation fault (Address not mapped to object [0x10])

@gzfuzz gzfuzz added the bug Something isn't working label Oct 10, 2024
@gzfuzz gzfuzz changed the title Crash after adding plugin MulticopterMotorModel to model Crash after adding plugin MulticopterMotorModel Oct 10, 2024
@iche033
Copy link
Contributor

iche033 commented Oct 15, 2024

fix in #2653

@github-project-automation github-project-automation bot moved this from Inbox to Done in Core development Oct 16, 2024
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
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants