ros-bridge
ros-bridge copied to clipboard
CARLA crashes after closing the bridge node.
When I shutdown the bridge ROS node with Ctrl+C, the CARLA simulation crashes. I am using CARLA version 0.9.14 and CARLA Ros bridge 0.9.12. The same problem happens when I run the manual controller of the PythonAPI of CARLA and I close it with Ctrl+C instead of using the ESC key.
I deduced that it was because some part of the connection was not closing correctly, and I solved it by saving the original settings of the CARLA world and applying them before the node is shutdown.
79 self.carla_settings = carla_world.get_settings()
80 self.original_settings = carla_world.get_settings()
81 if not self.parameters["passive"]:
356 self.synchronous_mode_update_thread.join()
357 self.carla_world.apply_settings(self.original_settings)
358 self.loginfo("Object update finished.")