cyberbotics / webots_ros2

Webots ROS 2 packages
Apache License 2.0
389 stars 141 forks source link

webots_ros2_turtlebot simulation crashes after clicking reset button #868

Open aihoque2 opened 7 months ago

aihoque2 commented 7 months ago

Describe the Bug When running the turtlebot simulation, I can publish to "/cmd_vel" fine, but when I click the "reset" button in simulation, it crashes and I get this result:

Steps to Reproduce

  1. run ros2 launch webots_ros2_turtlebot robot_launch.py
  2. click the reset button
  3. watch the sim reset, wait a bit, and watch it suddenly shut down.
  4. see terminal for error report that looks like after clicking reset:

Expected behavior as previously mentioned, the simulation will shut down immediately. there are statements about Segmentation Fault that can be seen below. You may refer to the screenshot later as well.

[ros2_supervisor.py-2] [INFO] [1701493944.961800063] [Ros2Supervisor.Ros2Supervisor]: Ros2Supervisor is shutting down...
[webots_controller_TurtleBot3Burger-5] [INFO] [1701493944.962618550] [TurtleBot3Burger]: Controller successfully disconnected from robot in Webots simulation.
[ERROR] [ros2_supervisor.py-2]: process has died [pid 63819, exit code 1, cmd '/opt/ros/humble/lib/webots_ros2_driver/ros2_supervisor.py --ros-args -r __ns:=/Ros2Supervisor -r /Ros2Supervisor/clock:=/clock'].
[INFO] [ros2_supervisor.py-2]: process started with pid [64006]
[ros2_supervisor.py-2] The Webots simulation world is not yet ready, pending until loading is done...
[webots_controller_TurtleBot3Burger-5] [ros2run]: Segmentation fault

Affected Packages List of affected packages:

Screenshots If applicable, add screenshots to help explain your problem. image

System

I will try to run gdb when I launch the file to track the segmentation fault.