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 dynamically adding plugin AckermannSteering #2507

Closed
gzfuzz opened this issue Aug 4, 2024 · 1 comment · Fixed by #2521
Closed

Crash after dynamically adding plugin AckermannSteering #2507

gzfuzz opened this issue Aug 4, 2024 · 1 comment · Fixed by #2521
Labels
bug Something isn't working

Comments

@gzfuzz
Copy link

gzfuzz commented Aug 4, 2024

Environment

  • OS Version: Ubuntu 22.04
  • Source or binary build?
    source build
    gz-sim version: 907efc3
    built with
    gcc version: 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
    build options: -DCMAKE_BUILD_TYPE=Coverage

Description

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

Steps to reproduce

  1. gz sim a.txt -r
  2. add plugin AckermannSteering with gz service command
gz service --timeout 10000 -s /world/world_0/entity/system/add --reptype gz.msgs.Boolean --reqtype gz.msgs.EntityPlugin_V --req 'entity {
  id: 4
}
plugins {
  name: "gz::sim::systems::AckermannSteering"
  filename: "gz-sim-ackermann-steering-system"
  innerxml: "<left_joint>front_left_wheel_joint</left_joint>\n        \n<left_joint>rear_left_wheel_joint</left_joint>\n        \n<right_joint>front_right_wheel_joint</right_joint>\n        \n<right_joint>rear_right_wheel_joint</right_joint>\n        \n<left_steering_joint>front_left_wheel_steering_joint</left_steering_joint>\n        \n<right_steering_joint>front_right_wheel_steering_joint</right_steering_joint>\n        \n<kingpin_width>1.0</kingpin_width>\n        \n<steering_limit>0.5</steering_limit>\n        \n<wheel_base>1.0</wheel_base>\n        \n<wheel_separation>1.25</wheel_separation>\n        \n<wheel_radius>0.3</wheel_radius>\n        \n<min_velocity>-1</min_velocity>\n        \n<max_velocity>1</max_velocity>\n        \n<min_acceleration>-3</min_acceleration>\n        \n<max_acceleration>3</max_acceleration>\n      "
}'

could also be reproduced by extracting a.tar.gz, and then run

bash a.sh

Output

Stack trace (most recent call last) in thread 57857:
#11   Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in 
#10   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f0f952a684f, in 
#9    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f0f95214ac2, in 
#8    Object "/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f0f90f51252, in 
#7    Object "/home/ren/play/robot/workspace/install/lib/libgz-sim8.so.8", at 0x7f0f8ebf0c8f, in 
#6    Object "/home/ren/play/robot/workspace/install/lib/libgz-sim8.so.8", at 0x7f0f8ebf0ccf, in 
#5    Object "/home/ren/play/robot/workspace/install/lib/libgz-sim8.so.8", at 0x7f0f8ebf0d43, in 
#4    Object "/home/ren/play/robot/workspace/install/lib/libgz-sim8.so.8", at 0x7f0f8ebf0e15, in 
#3    Object "/home/ren/play/robot/workspace/install/lib/libgz-sim8.so.8", at 0x7f0f8ebf0ead, in 
#2    Object "/home/ren/play/robot/workspace/install/lib/libgz-sim8.so.8", at 0x7f0f8ebe0fb1, in 
#1    Object "/data/play/robot/workspace/install/lib/gz-sim-8/plugins/libgz-sim-ackermann-steering-system.so", at 0x7f0f50591097, in gz::sim::v8::systems::AckermannSteering::PostUpdate(gz::sim::v8::UpdateInfo const&, gz::sim::v8::EntityComponentManager const&)
#0    Object "/data/play/robot/workspace/install/lib/gz-sim-8/plugins/libgz-sim-ackermann-steering-system.so", at 0x7f0f50593472, in gz::sim::v8::systems::AckermannSteeringPrivate::UpdateVelocity(gz::sim::v8::UpdateInfo const&, gz::sim::v8::EntityComponentManager const&)
Segmentation fault (Address not mapped to object [(nil)])
@iche033
Copy link
Contributor

iche033 commented Aug 7, 2024

sim crashes because the specified joints are not available in the box model. #2521 prevents the crash.

@github-project-automation github-project-automation bot moved this from In progress to Done in Core development Aug 12, 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
2 participants