ros2_quad_sim_python icon indicating copy to clipboard operation
ros2_quad_sim_python copied to clipboard

Waiting for quadsim even after launching headless instance

Open Nunzio03 opened this issue 1 year ago • 1 comments

Hi, as I've never worked with CARLA i'm using the readme as documentation source. I'm trying to reproduce the steps on the README but i get stuck at ros2 launch ros2_quad_sim_python launch_everything.launch.py.

As even if headles instance is running the host it is not found.

I'm using docker containers, in particular: one for the CARLA headles instance and one for ros2 and quadsim.

I think the main problem is on the resolution of the host which is hosting CARLA headles simulation.

logs of the launchfile: [INFO] [launch]: All log files can be found below /home/ros2user/.ros/log/2024-04-30-08-19-58-149329-ros2-f0ad3a4c5a-54 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [bridge-1]: process started with pid [56] [INFO] [carla_spawn_objects-2]: process started with pid [58] [INFO] [quad-3]: process started with pid [60] [INFO] [rviz2-4]: process started with pid [62] [rviz2-4] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-ros2user' [quad-3] Starting QuadSimAndCtrl... [quad-3] [INFO] [1714465198.954649998] [quadsim]: Starting quadsim... [bridge-1] [INFO] [1714465199.011544374] [carla_ros_bridge]: Trying to connect to carla-container.local:2000 [rviz2-4] [INFO] [1714465199.104820667] [rviz2]: Stereo is NOT SUPPORTED [rviz2-4] [INFO] [1714465199.104949330] [rviz2]: OpenGl version: 4.6 (GLSL 4.6) [rviz2-4] [INFO] [1714465199.156224463] [rviz2]: Stereo is NOT SUPPORTED [quad-3] [INFO] [1714465199.960213246] [quadsim]: Waiting for quadsim... [quad-3] [INFO] [1714465200.960448218] [quadsim]: Waiting for quadsim... [quad-3] [INFO] [1714465201.959899643] [quadsim]: Waiting for quadsim... [quad-3] [INFO] [1714465202.960018207] [quadsim]: Waiting for quadsim... [quad-3] [INFO] [1714465203.960076853] [quadsim]: Waiting for quadsim... [bridge-1] [ERROR] [1714465204.020536427] [carla_ros_bridge]: Error: resolve: Host not found (authoritative) [bridge-1] [INFO] [1714465204.020770368] [carla_ros_bridge]: Shutting down... [bridge-1] Traceback (most recent call last): [bridge-1] File "/home/ros2user/carla-ros/install/carla_ros_bridge/lib/carla_ros_bridge/bridge", line 11, in [bridge-1] load_entry_point('carla-ros-bridge', 'console_scripts', 'bridge')() [bridge-1] File "/home/ros2user/carla-ros/build/carla_ros_bridge/src/carla_ros_bridge/bridge.py", line 496, in main [bridge-1] roscomp.shutdown() [bridge-1] File "/home/ros2user/carla-ros/build/ros_compatibility/src/ros_compatibility/init.py", line 83, in shutdown [bridge-1] h() [bridge-1] File "/home/ros2user/carla-ros/build/carla_ros_bridge/src/carla_ros_bridge/bridge.py", line 392, in destroy [bridge-1] self.shutdown.set() [bridge-1] AttributeError: 'CarlaRosBridge' object has no attribute 'shutdown' [ERROR] [bridge-1]: process has died [pid 56, exit code 1, cmd '/home/ros2user/carla-ros/install/carla_ros_bridge/lib/carla_ros_bridge/bridge --ros-args -r __node:=carla_ros_bridge --params-file /tmp/launch_params_mv43lja4 --params-file /tmp/launch_params_c5r1cwjz --params-file /tmp/launch_params_1h9plo07 --params-file /tmp/launch_params_cutvnm1v --params-file /tmp/launch_params__07yk_ml --params-file /tmp/launch_params_e53kz0ij --params-file /tmp/launch_params_actniujz --params-file /tmp/launch_params_siuggxv3 --params-file /tmp/launch_params__dexid5q --params-file /tmp/launch_params_jd8cv72p --params-file /tmp/launch_params_v35w4ykz']. [INFO] [launch]: process[bridge-1] was required: shutting down launched system [INFO] [rviz2-4]: sending signal 'SIGINT' to process[rviz2-4] [INFO] [quad-3]: sending signal 'SIGINT' to process[quad-3] [INFO] [carla_spawn_objects-2]: sending signal 'SIGINT' to process[carla_spawn_objects-2] [rviz2-4] [INFO] [1714465204.278853693] [rclcpp]: signal_handler(signal_value=2) [carla_spawn_objects-2] [ERROR] [1714465204.296089809] [default]: Could not initialize CarlaSpawnObjects. Shutting down. [INFO] [carla_spawn_objects-2]: process has finished cleanly [pid 58] [INFO] [rviz2-4]: process has finished cleanly [pid 62] [INFO] [quad-3]: process has finished cleanly [pid 60] [INFO] [launch]: process[quad-3] was required: shutting down launched system

Nunzio03 avatar Apr 30 '24 08:04 Nunzio03

Did you build your own docker images?

ricardodeazambuja avatar May 12 '24 19:05 ricardodeazambuja

No, I'm using your docker image at the moment

Nunzio03 avatar Jun 24 '24 11:06 Nunzio03

Solved. The docker image provided has a default value for the carla container IP and it is carla-container.local. For some reasons that hostname was not reachable. I put the container IP and it worked.

Nunzio03 avatar Jun 25 '24 15:06 Nunzio03