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

Often, the initial position is not initialized when running, and the auto button is often disabled. #149

Open
minseokim521 opened this issue Feb 3, 2025 · 1 comment

Comments

@minseokim521
Copy link

minseokim521 commented Feb 3, 2025

Hello @evshary ! First of all, thank you for keeping this repository.
I am very interested in v2x communication through the linkage of autoware and carla.

I came across your github and was following that tutorial when I got into trouble.
I've been running zenoh bridge container and autoware container in recent days, and I've been questioning whether the ip addressing and docker container network settings are appropriate in my command.

My environment is Ubuntu 22.04, ROS2 Humble, CARLA 0.9.14 and I want to run the whole system on one machine. I downloaded the main branch of your git hub.

In Run Carla with multiple Autowares scenario,

$HOME/carla/CarlaUE4.sh -quality-level=Epic -world-port=2000 -RenderOffScreen

Go inside "Carla bridge container"

./container/run-bridge-docker.sh

Run zenoh_carla_bridge and Python Agent

cd autoware_carla_launch
source env.sh
./script/run-bridge-two-vehicles.sh

Go inside "Autoware container"

./container/run-autoware-docker.sh

Run zenoh-bridge-ros2dds and Autoware

cd autoware_carla_launch
source env.sh
./script/run-autoware.sh v1 103.218.163.28:7447
./script/run-autoware.sh v2 103.218.163.28:7447

I executed the command as above, and I put the ip address of my local computer in the autoware execution part.

For ROS_DOMAIN_ID, the local computer and all three docker containers are set to 0,
For ROS_LOCALHOST_ONLY, the local computer and car bridge container are set to 0, and the other two auto-care containers are set to 1. And unlike your existing repository, we added and ran --network host settings when running containers on run-autoware-docker.sh .

However, the moment I turned on the first autoware and the second autoware, there was a problem as there seemed to be a conflict between the previously turned on autoware and the newly turned on autoware. As shown in the picture, the problem occurs as the previously turned on autoware tries to get data from the second autoware. I think there was a problem with specifying the network settings between dockers or the ip address, but I couldn't find a solution.

And whenever I run autoware with these commands, sometimes the initial position is initialized well, sometimes it doesn't work, and sometimes I can't test it because the auto button is not automatically activated after I specify the 2d goal pose. This seems to be the biggest problem for me. There were cases where the initial position was not initialized well, and there were cases where the issue with the auto button deactivated was also solved by re-executing it after the completion, but it can't be done every time, so I want to know what the problem is.

So, I think there's a problem, so to try again, I ran the same ./script/run-bridge-two-vehicles.sh as the main branch to build again today,
WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API
WARNING: Client API version = 0.9.13
WARNING: Simulator API version = 0.9.14
As such, an error was printed that the carla version did not match each other, did you modify the carla version during the commit process?

I thought about it every day for the past few days to solve the above problems, but I couldn't find a solution, so I left a question.

Your response would be appreciated. Thank you very much for providing me with a good reference. Below is the execution result log window of my carla bridge and autoware container.

There were cases where the initial position was not initialized well, and there were cases where the issue with the auto button deactivated was also solved by re-executing it after the completion, but it can't be done every time, so I want to know what the problem is.

So, I think there's a problem, so to try again, I ran the same ./script/run-bridge-two-vehicles.sh as the main branch to build again today,
WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API
WARNING: Client API version = 0.9.13
WARNING: Simulator API version = 0.9.14
As such, an error was printed that the carla version did not match each other, did you modify the carla version during the commit process?

I thought about it every day for the past few days to solve the above problems, but I couldn't find a solution, so I left a question.

I'd appreciate it if you could test if the Ubuntu 22.04, ROS2 humble, carla 0.9.14 I'm using works well on the main branch. Or you can recommend another stable version.

Your response would be appreciated. Thank you very much for providing me with a good reference. Below is the execution result log window of my carla bridge and autoware container.

Image

kms@minseokim521:/autoware_carla_launch$ ./script/run-autoware.sh v1 103.218.163.28:7447
ros2 launch autoware_carla_launch autoware_zenoh.launch.xml 2>&1 | tee autoware_log/2025-02-03_20:35:54//autoware.log
/home/kms/autoware_carla_launch/external/zenoh-plugin-ros2dds/target/release/zenoh-bridge-ros2dds -n /v1 -d 0 -c /home/kms/autoware_carla_launch/config/zenoh-bridge-ros2dds-conf.json5 -e tcp/103.218.163.28:7447 -e tcp/'127.0.0.1:7887' 2>&1 | tee autoware_log/2025-02-03_20:35:54//zenoh_bridge_ros2dds.log
2025-02-03T11:35:54.657364Z INFO main ThreadId(01) zenoh_bridge_ros2dds: zenoh-bridge-ros2dds v1.0.2
2025-02-03T11:35:54.664915Z INFO main ThreadId(01) zenoh_bridge_ros2dds: Zenoh Config(Config { id: 4b0d7af301ef3e1bce65d3ad6491731f, metadata: Null, mode: Some(Peer), connect: ConnectConfig { timeout_ms: None, endpoints: Unique([tcp/103.218.163.28:7447, tcp/127.0.0.1:7887]), exit_on_failure: None, retry: None }, listen: ListenConfig { timeout_ms: None, endpoints: Dependent(ModeValues { router: Some([tcp/[::]:7447]), peer: Some([tcp/[::]:0]), client: None }), exit_on_failure: None, retry: None }, open: OpenConf { return_conditions: ReturnConditionsConf { connect_scouted: None, declares: None } }, scouting: ScoutingConf { timeout: None, delay: None, multicast: ScoutingMulticastConf { enabled: None, address: None, interface: None, ttl: None, autoconnect: None, listen: None }, gossip: GossipConf { enabled: None, multihop: None, autoconnect: None } }, timestamping: TimestampingConf { enabled: Some(Unique(true)), drop_future_timestamp: None }, queries_default_timeout: None, routing: RoutingConf { router: RouterRoutingConf { peers_failover_brokering: None }, peer: PeerRoutingConf { mode: None } }, aggregation: AggregationConf { subscribers: [], publishers: [] }, transport: TransportConf { unicast: TransportUnicastConf { accept_timeout: 10000, accept_pending: 100, max_sessions: 1000, max_links: 1, lowlatency: false, qos: QoSUnicastConf { enabled: true }, compression: CompressionUnicastConf { enabled: false } }, multicast: TransportMulticastConf { join_interval: Some(2500), max_sessions: Some(1000), qos: QoSMulticastConf { enabled: false }, compression: CompressionMulticastConf { enabled: false } }, link: TransportLinkConf { protocols: None, tx: LinkTxConf { sequence_number_resolution: U32, lease: 10000, keep_alive: 4, batch_size: 65535, queue: QueueConf { size: QueueSizeConf { control: 1, real_time: 1, interactive_high: 1, interactive_low: 1, data_high: 2, data: 4, data_low: 2, background: 1 }, congestion_control: CongestionControlConf { drop: CongestionControlDropConf { wait_before_drop: 1000 }, block: CongestionControlBlockConf { wait_before_close: 5000000 } }, batching: BatchingConf { enabled: true, time_limit: 1 } }, threads: 4 }, rx: LinkRxConf { buffer_size: 65535, max_message_size: 1073741824 }, tls: TLSConf { root_ca_certificate: None, listen_private_key: None, listen_certificate: None, enable_mtls: None, connect_private_key: None, connect_certificate: None, verify_name_on_connect: None, root_ca_certificate_base64: None, listen_private_key_base64: None, listen_certificate_base64: None, connect_private_key_base64: None, connect_certificate_base64: None }, unixpipe: UnixPipeConf { file_access_mask: None } }, shared_memory: ShmConf { enabled: true }, auth: AuthConf { usrpwd: UsrPwdConf { user: None, password: None, dictionary_file: None }, pubkey: PubKeyConf { public_key_pem: None, private_key_pem: None, public_key_file: None, private_key_file: None, key_size: None, known_keys_file: None } } }, adminspace: AdminSpaceConf { enabled: true, permissions: PermissionsConf { read: true, write: false } }, downsampling: [], access_control: AclConfig { enabled: false, default_permission: Deny, rules: None, subjects: None, policies: None }, plugins_loading: PluginsLoading { enabled: true, search_dirs: LibSearchDirs([Spec(LibSearchSpec { kind: CurrentExeParent, value: None }), Path("."), Path("
/.zenoh/lib"), Path("/opt/homebrew/lib"), Path("/usr/local/lib"), Path("/usr/lib")]) }, plugins: Object {"ros2dds": Object {"allow": Object {"action_clients": Array [String("/all_ignore")], "action_servers": Array [String("/all_ignore")], "publishers": Array [String("/control/command/control_cmd"), String("/control/command/gear_cmd"), String("/control/current_gate_mode"), String("/control/command/turn_indicators_cmd"), String("/control/command/hazard_lights_cmd"), String("/api/external/get/vehicle/status"), String("/api/external/get/cpu_usage"), String("/api/vehicle/kinematics"), String("/api/routing/route")], "service_clients": Array [String("/all_ignore")], "service_servers": Array [String("/api/operation_mode/change_to_autonomous"), String("/api/operation_mode/change_to_remote"), String("/api/routing/clear_route"), String("/api/routing/set_route_points")], "subscribers": Array [String("/vehicle/status/velocity_status"), String("/vehicle/status/steering_status"), String("/vehicle/status/control_mode"), String("/vehicle/status/gear_status"), String("/vehicle/status/turn_indicators_status"), String("/vehicle/status/hazard_lights_status"), String("/sensing/lidar/."), String("/sensing/imu/."), String("/sensing/gnss/."), String("/carla_pointcloud"), String("/clock"), String("/external/selected/gear_cmd"), String("/api/external/set/command/remote/shift"), String("/external/selected/control_cmd"), String("/control/gate_mode_cmd"), String("/sensing/camera/.")]}, "domain": Number(0), "namespace": String("/v1"), "ros_localhost_only": Bool(true)}} })
2025-02-03T11:35:54.666637Z INFO main ThreadId(01) zenoh::net::runtime: Using ZID: 4b0d7af301ef3e1bce65d3ad6491731f
2025-02-03T11:35:54.670004Z INFO main ThreadId(01) zenoh::api::loader: Starting required plugin "ros2dds"
2025-02-03T11:35:54.670646Z INFO main ThreadId(01) zenoh::api::loader: Successfully started plugin ros2dds from "static_lib"
2025-02-03T11:35:54.670652Z INFO main ThreadId(01) zenoh::api::loader: Finished loading plugins
2025-02-03T11:35:54.671246Z INFO tokio-runtime-worker ThreadId(03) zenoh_plugin_ros2dds: ROS2 plugin Config { namespace: "/v1", nodename: "zenoh_bridge_ros2dds", domain: 0, ros_localhost_only: true, allowance: Some(Allow(ROS2InterfacesRegex { publishers: Some(Regex("^/control/command/control_cmd$|^/control/command/gear_cmd$|^/control/current_gate_mode$|^/control/command/turn_indicators_cmd$|^/control/command/hazard_lights_cmd$|^/api/external/get/vehicle/status$|^/api/external/get/cpu_usage$|^/api/vehicle/kinematics$|^/api/routing/route$")), subscribers: Some(Regex("^/vehicle/status/velocity_status$|^/vehicle/status/steering_status$|^/vehicle/status/control_mode$|^/vehicle/status/gear_status$|^/vehicle/status/turn_indicators_status$|^/vehicle/status/hazard_lights_status$|^/sensing/lidar/.$|^/sensing/imu/.$|^/sensing/gnss/.$|^/carla_pointcloud$|^/clock$|^/external/selected/gear_cmd$|^/api/external/set/command/remote/shift$|^/external/selected/control_cmd$|^/control/gate_mode_cmd$|^/sensing/camera/.$")), service_servers: Some(Regex("^/api/operation_mode/change_to_autonomous$|^/api/operation_mode/change_to_remote$|^/api/routing/clear_route$|^/api/routing/set_route_points$")), service_clients: Some(Regex("^/all_ignore$")), action_servers: Some(Regex("^/all_ignore$")), action_clients: Some(Regex("^/all_ignore$")) })), pub_max_frequencies: [], transient_local_cache_multiplier: 10, queries_timeout: None, reliable_routes_blocking: true, pub_priorities: [], work_thread_num: 2, max_block_thread_num: 50, required: None, path: None }
2025-02-03T11:35:54.671946Z INFO main ThreadId(01) zenoh::net::runtime::orchestrator: Zenoh can be reached at: tcp/103.218.163.28:34111
2025-02-03T11:35:54.671958Z INFO main ThreadId(01) zenoh::net::runtime::orchestrator: Zenoh can be reached at: tcp/[fe80::8c38:91ba:5e88:7994]:34111
2025-02-03T11:35:54.672167Z INFO main ThreadId(01) zenoh::net::runtime::orchestrator: zenohd listening scout messages on 224.0.0.224:7446
[INFO] [launch]: All log files can be found below /home/kms/.ros/log/2025-02-03-20-35-54-951408-minseokim521-2451
[INFO] [launch]: Default logging verbosity is set to INFO
2025-02-03T11:35:55.173425Z WARN main ThreadId(01) zenoh::net::runtime::orchestrator: Scouting delay elapsed before start conditions are met.

kms@minseokim521:~/autoware_carla_launch$ ./script/run-bridge.sh --carla-address 127.0.0.1:2000
sleep 5 && RUST_LOG=z=info /home/kms/autoware_carla_launch/external/zenoh_carla_bridge/target/release/zenoh_carla_bridge --mode ros2 --zenoh-listen tcp/0.0.0.0:7447 --zenoh-config /home/kms/autoware_carla_launch/config/zenoh-carla-bridge-conf.json5 --carla-address 127.0.0.1 2>&1 | tee bridge_log/2025-02-03_20:34:10//bridge.log
poetry -C /home/kms/autoware_carla_launch/external/zenoh_carla_bridge/carla_agent run python3 /home/kms/autoware_carla_launch/external/zenoh_carla_bridge/carla_agent/main.py --host 127.0.0.1 --rolename v1 2>&1 | tee bridge_log/2025-02-03_20:34:10//vehicle.log
INFO: listening to server 127.0.0.1:2000
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default
INFO zenoh_carla_bridge > Running Carla Autoware Zenoh bridge...
INFO zenoh::net::runtime > Using ZID: b961b759c33ce9635a3d70b5b174e928
INFO zenoh::net::runtime::orchestrator > Zenoh can be reached at: tcp/103.218.163.28:7447
INFO zenoh::net::runtime::orchestrator > zenohd listening scout messages on 224.0.0.224:7446
INFO zenoh_carla_bridge::bridge::sensor_bridge > Detected a sensor 'traffic_light' on 'v1'
INFO zenoh_carla_bridge > Actor 203 created
INFO zenoh_carla_bridge::bridge::sensor_bridge > Detected a sensor 'tamagawa' on 'v1'
INFO zenoh_carla_bridge > Actor 201 created
INFO zenoh_carla_bridge::bridge::sensor_bridge > Detected a sensor 'godview' on 'v1'
INFO zenoh_carla_bridge > Actor 204 created
INFO zenoh_carla_bridge::bridge::vehicle_bridge > Detect a vehicle v1
INFO zenoh_carla_bridge > Actor 197 created
INFO zenoh_carla_bridge::bridge::sensor_bridge > Detected a sensor 'lane_invasion' on 'v1'
WARN zenoh_carla_bridge::bridge::sensor_bridge > Unsupported sensor type 'sensor.other.lane_invasion'
INFO zenoh_carla_bridge > Actor 199 created
INFO zenoh_carla_bridge::bridge::sensor_bridge > Detected a sensor 'top' on 'v1'
INFO zenoh_carla_bridge > Actor 202 created
INFO zenoh_carla_bridge::bridge::sensor_bridge > Detected a sensor 'collision' on 'v1'
WARN zenoh_carla_bridge::bridge::sensor_bridge > Collision sensor is not supported yet
INFO zenoh_carla_bridge > Actor 198 created
INFO zenoh_carla_bridge::bridge::sensor_bridge > Detected a sensor 'ublox' on 'v1'
INFO zenoh_carla_bridge > Actor 200 created

@evshary
Copy link
Owner

evshary commented Feb 6, 2025

Hi @minseokim521

Would you mind updating the description using Markdown syntax? It's a little difficult to read while the log and code are mixed with your question. Also, it seems there are some duplicate parts in your description.

Based on what you mentioned here, I think you are trying to run two Autoware instances in the same machine and communicate by using V2X.
Let's start with the simple scenario, could you try following the tutorial here without any other modification first?
It will help us know if it works in the default scenario (and it should, at least in my environment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants