ll7 / paf22

Praktikum Autonomes Fahren 2022
MIT License
9 stars 1 forks source link

[Bug]: ROS shuts down during b5 run #134

Closed JoKircher closed 1 year ago

JoKircher commented 1 year ago

Current Behavior

When executing b5 run the container shuts down, because the CARLA_ROS_BRIDGE process has died.

Console output:

paf22-agent-1            | shutdown request: [/carla_ros_bridge] Reason: new node registered with same name
paf22-agent-1            | [INFO] [1673265081.273910, 0.000000]: Shutting down...
paf22-agent-1            | Traceback (most recent call last):
paf22-agent-1            |   File "/opt/ros/noetic/lib/python3/dist-packages/rospy/core.py", line 572, in signal_shutdown
paf22-agent-1            |     h()
paf22-agent-1            |   File "/catkin_ws/src/ros-bridge/carla_ros_bridge/src/carla_ros_bridge/bridge.py", line 349, in destroy
paf22-agent-1            |     self.shutdown.set()
paf22-agent-1            | AttributeError: 'CarlaRosBridge' object has no attribute 'shutdown'
paf22-agent-1            | [INFO] [1673265081.363155, 0.000000]: Loading town 'Town12' (previous: 'Carla/Maps/Town10HD_Opt').
paf22-agent-1            | [INFO] [1673265100.282189, 0.000000]: synchronous_mode: True
paf22-agent-1            | [INFO] [1673265100.283669, 0.000000]: fixed_delta_seconds: 0.05
paf22-agent-1            | [INFO] [1673265100.722353, 0.000000]: Parameters:
paf22-agent-1            | [INFO] [1673265100.723588, 0.000000]:   host: carla-simulator
paf22-agent-1            | [INFO] [1673265100.724325, 0.000000]:   port: 2000
paf22-agent-1            | [INFO] [1673265100.724940, 0.000000]:   timeout: 100
paf22-agent-1            | [INFO] [1673265100.725552, 0.000000]:   passive: 
paf22-agent-1            | [INFO] [1673265100.726146, 0.000000]:   synchronous_mode: True
paf22-agent-1            | [INFO] [1673265100.726777, 0.000000]:   synchronous_mode_wait_for_vehicle_control_command: False
paf22-agent-1            | [INFO] [1673265100.727356, 0.000000]:   fixed_delta_seconds: 0.05
paf22-agent-1            | [INFO] [1673265100.727920, 0.000000]:   register_all_sensors: True
paf22-agent-1            | [INFO] [1673265100.728471, 0.000000]:   town: Town12
paf22-agent-1            | [INFO] [1673265100.729070, 0.000000]:   ego_vehicle: {'role_name': '["hero", "ego_vehicle", "hero0", "hero1", "hero2", "hero3", "hero4", "hero5", "hero6", "hero7", "hero8", "hero9"]'}
paf22-agent-1            | ================================================================================REQUIRED process [carla_ros_bridge-1] has died!
paf22-agent-1            | process has finished cleanly
paf22-agent-1            | log file: /home/carla/.ros/log/e7253454-9013-11ed-a17b-0242ac130002/carla_ros_bridge-1*.log
paf22-agent-1            | Initiating shutdown!
paf22-agent-1            | ================================================================================
paf22-agent-1            | [rviz-8] killing on exit
paf22-agent-1            | [DummyTrajectorySub-7] killing on exit
paf22-agent-1            | [DummyTrajectoryPublisher-6] killing on exit
paf22-agent-1            | [vehicle_controller-5] killing on exit
paf22-agent-1            | [velocity_controller-3] killing on exit
paf22-agent-1            | [carla_spawn_objects_82680a474479_7_4048595160453733233-2] killing on exit
paf22-agent-1            | [carla_ros_bridge-1] killing on exit
paf22-agent-1            | Traceback (most recent call last):
paf22-agent-1            |   File "/catkin_ws/src/ros-bridge/ros_compatibility/src/ros_compatibility/node.py", line 84, in new_client
paf22-agent-1            |     rospy.wait_for_service(srv_name, timeout=timeout)
paf22-agent-1            |   File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 166, in wait_for_service
paf22-agent-1            |     raise ROSInterruptException("rospy shutdown")
paf22-agent-1            | rospy.exceptions.ROSInterruptException: rospy shutdown
paf22-agent-1            | 
paf22-agent-1            | During handling of the above exception, another exception occurred:
paf22-agent-1            | 
paf22-agent-1            | Traceback (most recent call last):
paf22-agent-1            |   File "/catkin_ws/devel/lib/carla_spawn_objects/carla_spawn_objects.py", line 15, in <module>
paf22-agent-1            |     exec(compile(fh.read(), python_script, 'exec'), context)
paf22-agent-1            |   File "/catkin_ws/src/ros-bridge/carla_spawn_objects/src/carla_spawn_objects/carla_spawn_objects.py", line 378, in <module>
paf22-agent-1            |     main()
paf22-agent-1            |   File "/catkin_ws/src/ros-bridge/carla_spawn_objects/src/carla_spawn_objects/carla_spawn_objects.py", line 356, in main
paf22-agent-1            |     spawn_objects_node = CarlaSpawnObjects()
paf22-agent-1            |   File "/catkin_ws/src/ros-bridge/carla_spawn_objects/src/carla_spawn_objects/carla_spawn_objects.py", line 56, in __init__
paf22-agent-1            |     self.spawn_object_service = self.new_client(SpawnObject, "/carla/spawn_object")
paf22-agent-1            |   File "/catkin_ws/src/ros-bridge/ros_compatibility/src/ros_compatibility/node.py", line 89, in new_client
paf22-agent-1            |     raise ROSException(e)
paf22-agent-1            | ros_compatibility.exceptions.ROSException: rospy shutdown
paf22-agent-1            | shutting down processing monitor...
paf22-agent-1            | ... shutting down processing monitor complete
paf22-agent-1            | done
paf22-agent-1 exited with code 0

Expected Behavior

b5 run should run the container without problem.

How to reproduce the issue

on branch main run b5 run

Julian-Graf commented 1 year ago

I've been having the same issue since yesterday

nylser commented 1 year ago

Can you try executing b5 halt --remove-orphans and retry? It looks like there is a duplicate ros bridge launch.

JoKircher commented 1 year ago

This did resolve the problem. I will add it to common problems.